diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/composer.json b/composer.json old mode 100644 new mode 100755 diff --git a/composer.lock b/composer.lock old mode 100644 new mode 100755 diff --git a/mirzaev/spetsresurs/viber/registry/requests/system/emojis.txt b/mirzaev/spetsresurs/viber/registry/requests/system/emojis.txt old mode 100644 new mode 100755 diff --git a/mirzaev/spetsresurs/viber/registry/requests/system/public/install.php b/mirzaev/spetsresurs/viber/registry/requests/system/public/install.php old mode 100644 new mode 100755 diff --git a/mirzaev/spetsresurs/viber/registry/requests/system/public/robot.php b/mirzaev/spetsresurs/viber/registry/requests/system/public/robot.php old mode 100644 new mode 100755 index 7def460..315f24f --- a/mirzaev/spetsresurs/viber/registry/requests/system/public/robot.php +++ b/mirzaev/spetsresurs/viber/registry/requests/system/public/robot.php @@ -183,7 +183,9 @@ function requests(int $amount = 5, int $page = 1): Cursor $arangodb->session, [ 'query' => sprintf( - "FOR d IN works FILTER d.worker == null && d.confirmed != 'да' SORT d.created DESC LIMIT %d, %d RETURN d", + "FOR d IN works FILTER d.date >= '%s' && d.date <= '%s' && d.worker == '' && d.confirmed != 'да' SORT d.created DESC LIMIT %d, %d RETURN d", + (new DateTime('now'))->setTime(7, 0)->format('d.m.Y'), + (new DateTime('tomorrow'))->setTime(7, 0)->format('d.m.Y'), $offset, $amount + $offset ), @@ -339,7 +341,7 @@ try { (new Text()) ->setSender($botSender) ->setReceiver($id) - ->setText("**#{$request->getKey()}**\n\n" . $request->date['converted'] . " (" . $request->start['converted'] . " - " . $request->end['converted'] . ")\n**Работа:** \"$request->work\"\n\n**Город:** $market->city\n**Адрес:** $market->address") + ->setText("**#{$request->getKey()}**\n\n" . ($request->date['converted'] ?? $request->date) . " (" . ($request->start['converted'] ?? $request->start) . " - " . ($request->end['converted'] ?? $request->end) . ")\n**Работа:** \"$request->work\"\n\n**Город:** $market->city\n**Адрес:** $market->address") ); // Запись выбора заявки в клавиатуру diff --git a/mirzaev/spetsresurs/viber/registry/requests/system/settings/.gitignore b/mirzaev/spetsresurs/viber/registry/requests/system/settings/.gitignore old mode 100644 new mode 100755 diff --git a/mirzaev/spetsresurs/viber/registry/requests/system/settings/arangodb.php.sample b/mirzaev/spetsresurs/viber/registry/requests/system/settings/arangodb.php.sample old mode 100644 new mode 100755 diff --git a/mirzaev/spetsresurs/viber/registry/requests/system/settings/key.php.sample b/mirzaev/spetsresurs/viber/registry/requests/system/settings/key.php.sample old mode 100644 new mode 100755 diff --git a/mirzaev/spetsresurs/viber/registry/requests/system/settings/url.php.sample b/mirzaev/spetsresurs/viber/registry/requests/system/settings/url.php.sample old mode 100644 new mode 100755