card action
This commit is contained in:
@ -12,11 +12,16 @@ class TgBotRestController extends \kernel\app_modules\tgbot\controllers\TgBotRes
|
||||
public function actionGetScanBtn(int $id): void
|
||||
{
|
||||
$dialog = Tgbot::where("dialog_id", $id)->first();
|
||||
$html = "";
|
||||
if ($dialog){
|
||||
$this->renderApi([
|
||||
'html' => '<a class="btn btn-primary" href="/miniapp/scanner">Сканировать</a>',
|
||||
]);
|
||||
if ($dialog->status === Tgbot::ADMIN_STATUS){
|
||||
$html = '<a class="btn btn-primary" href="/miniapp/scanner">Сканировать</a>';
|
||||
}
|
||||
}
|
||||
|
||||
$this->renderApi([
|
||||
'html' => $html,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user