From 5686a3aec23af50b5dd550b30ae53db647ca69b3 Mon Sep 17 00:00:00 2001 From: Arsen Mirzaev Tatyano-Muradovich Date: Fri, 23 Jun 2023 00:05:08 +0700 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D1=87=D0=B8=D0=BD=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BF=D0=B0=D0=B3=D0=B8=D0=BD=D0=B0=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../viber/registry/requests/system/public/robot.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mirzaev/spetsresurs/viber/registry/requests/system/public/robot.php b/mirzaev/spetsresurs/viber/registry/requests/system/public/robot.php index 5001f09..7def460 100644 --- a/mirzaev/spetsresurs/viber/registry/requests/system/public/robot.php +++ b/mirzaev/spetsresurs/viber/registry/requests/system/public/robot.php @@ -13,7 +13,6 @@ use ArangoDBClient\Document as _document, // Фреймворк для Viber API use Viber\Bot, Viber\Api\Sender, - Viber\Api\Event, Viber\Api\Keyboard, Viber\Api\Keyboard\Button, Viber\Api\Message\Contact, @@ -184,7 +183,7 @@ function requests(int $amount = 5, int $page = 1): Cursor $arangodb->session, [ 'query' => sprintf( - "FOR d IN works FILTER d.confirmed != 'да' SORT d.created DESC LIMIT %d, %d RETURN d", + "FOR d IN works FILTER d.worker == null && d.confirmed != 'да' SORT d.created DESC LIMIT %d, %d RETURN d", $offset, $amount + $offset ), @@ -284,7 +283,7 @@ try { $count = $requests->getCount(); // Проверка существования избытка - $excess = $count === 6; + $excess = $count % 6 === 0; // Обрезка заявок до размера страницы $requests = array_slice($requests->getAll(), 0, 5);