Compare commits

..

3 Commits

2 changed files with 31 additions and 23 deletions

View File

@ -1,3 +1,5 @@
# Telegram-robot for registering for tasks
# Telegram chat-robot for task registering
Synchronizes accounts with the site, displays a list of published applications with a selection by date, and also register to tasks
Chat-robot Telegram for accepting applications for employees from [mirzaev/ebala](https://git.mirzaev.sexy/mirzaev/ebala)
**DEVELOPMENT COMPLETED. PROJECT CLOSED.**

View File

@ -348,6 +348,9 @@ function request_confirmed(Context $ctx): void
// Инициализация инстанции task в базе данных (выбранного задания)
$task = collection::search($arangodb->session, sprintf("FOR d IN task FILTER d._key == '%s' && d.published == true && d.completed != true && worker == null RETURN d", $_key));
if ($task instanceof _document) {
// Найдена заявка (подразумевается, что не занята)
if ($worker ??= worker($account->getId())) {
// Найден сотрудник
@ -383,6 +386,9 @@ function request_confirmed(Context $ctx): void
} else $ctx->sendMessage("❎ *Не удалось принять заявку:* \#$_key", ['reply_markup' => ['remove_keyboard' => true]])->then(function () use ($ctx) {
generateMenu($ctx);
});
} else $ctx->sendMessage("❎ *Не удалось принять заявку:* \#$_key", ['reply_markup' => ['remove_keyboard' => true]])->then(function () use ($ctx) {
generateMenu($ctx);
});
});
}
}