Работа над сайтом 228

This commit is contained in:
Arsen Mirzaev Tatyano-Muradovich 2021-08-09 23:48:43 +10:00
parent b7c271141f
commit 5e01240938
41 changed files with 4115 additions and 516 deletions

View File

@ -14,6 +14,7 @@
],
"require": {
"php": "^8.0.0",
"ext-intl": "~8.0",
"twbs/bootstrap": "4.6.0",
"yiisoft/yii2": "2.*",
"yiisoft/yii2-bootstrap": ">=2.0.0",

273
composer.lock generated
View File

@ -4,14 +4,14 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "fcf19d2c1a3e56a85324e01a1c6c55ab",
"content-hash": "1a78355a6b4833b92796884bd4674b5d",
"packages": [
{
"name": "bower-asset/bootstrap",
"version": "v3.4.1",
"source": {
"type": "git",
"url": "https://github.com/twbs/bootstrap.git",
"url": "git@github.com:twbs/bootstrap.git",
"reference": "68b0d231a13201eb14acd3dc84e51543d16e5f7e"
},
"dist": {
@ -53,7 +53,7 @@
"version": "3.5.1",
"source": {
"type": "git",
"url": "https://github.com/jquery/jquery-dist.git",
"url": "git@github.com:jquery/jquery-dist.git",
"reference": "4c0e4becb8263bb5b3e6dadc448d8e7305ef8215"
},
"dist": {
@ -71,7 +71,7 @@
"version": "v1.3.2",
"source": {
"type": "git",
"url": "https://github.com/bestiejs/punycode.js.git",
"url": "git@github.com:bestiejs/punycode.js.git",
"reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3"
},
"dist": {
@ -1063,7 +1063,7 @@
"source": {
"type": "git",
"url": "https://git.hood.su/mirzaev/yii2/arangodb",
"reference": "cbc26916ea54bb767306e4c2750e710b08eecc21"
"reference": "8c8d34f5b213b7d28b874f430f44b319baab3e83"
},
"require": {
"php": "^8.0.0",
@ -1105,7 +1105,7 @@
"ArangoDb",
"yii2"
],
"time": "2021-04-11T19:27:43+00:00"
"time": "2021-07-25T19:29:30+00:00"
},
{
"name": "mirzaev/yii2-arangodb-sessions",
@ -1202,16 +1202,16 @@
},
{
"name": "myclabs/php-enum",
"version": "1.8.0",
"version": "1.8.3",
"source": {
"type": "git",
"url": "https://github.com/myclabs/php-enum.git",
"reference": "46cf3d8498b095bd33727b13fd5707263af99421"
"reference": "b942d263c641ddb5190929ff840c68f78713e937"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/php-enum/zipball/46cf3d8498b095bd33727b13fd5707263af99421",
"reference": "46cf3d8498b095bd33727b13fd5707263af99421",
"url": "https://api.github.com/repos/myclabs/php-enum/zipball/b942d263c641ddb5190929ff840c68f78713e937",
"reference": "b942d263c641ddb5190929ff840c68f78713e937",
"shasum": ""
},
"require": {
@ -1221,7 +1221,7 @@
"require-dev": {
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "1.*",
"vimeo/psalm": "^4.5.1"
"vimeo/psalm": "^4.6.2"
},
"type": "library",
"autoload": {
@ -1246,7 +1246,7 @@
],
"support": {
"issues": "https://github.com/myclabs/php-enum/issues",
"source": "https://github.com/myclabs/php-enum/tree/1.8.0"
"source": "https://github.com/myclabs/php-enum/tree/1.8.3"
},
"funding": [
{
@ -1258,7 +1258,7 @@
"type": "tidelift"
}
],
"time": "2021-02-15T16:11:48+00:00"
"time": "2021-07-05T08:18:36+00:00"
},
{
"name": "npm-asset/jquery",
@ -1959,16 +1959,16 @@
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.23.0",
"version": "v1.23.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1"
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1",
"reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
"shasum": ""
},
"require": {
@ -2019,7 +2019,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
},
"funding": [
{
@ -2035,7 +2035,7 @@
"type": "tidelift"
}
],
"time": "2021-05-27T09:27:20+00:00"
"time": "2021-05-27T12:26:48+00:00"
},
{
"name": "symfony/polyfill-php72",
@ -2115,16 +2115,16 @@
},
{
"name": "triagens/arangodb",
"version": "v3.6.0",
"version": "v3.8.0",
"source": {
"type": "git",
"url": "https://github.com/arangodb/arangodb-php.git",
"reference": "d331f1a493772960c4d0e3d1fb753900eb181ce2"
"reference": "5104c4e2803d8b7fab97a0c80a3abe3f3ff3253e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/arangodb/arangodb-php/zipball/d331f1a493772960c4d0e3d1fb753900eb181ce2",
"reference": "d331f1a493772960c4d0e3d1fb753900eb181ce2",
"url": "https://api.github.com/repos/arangodb/arangodb-php/zipball/5104c4e2803d8b7fab97a0c80a3abe3f3ff3253e",
"reference": "5104c4e2803d8b7fab97a0c80a3abe3f3ff3253e",
"shasum": ""
},
"require": {
@ -2170,9 +2170,9 @@
],
"support": {
"issues": "https://github.com/arangodb/arangodb-php/issues",
"source": "https://github.com/arangodb/arangodb-php/tree/v3.6.0"
"source": "https://github.com/arangodb/arangodb-php/tree/v3.8.0"
},
"time": "2019-12-02T13:11:34+00:00"
"time": "2021-06-18T12:06:02+00:00"
},
{
"name": "twbs/bootstrap",
@ -3383,16 +3383,16 @@
},
{
"name": "fakerphp/faker",
"version": "v1.14.1",
"version": "v1.15.0",
"source": {
"type": "git",
"url": "https://github.com/FakerPHP/Faker.git",
"reference": "ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1"
"reference": "89c6201c74db25fa759ff16e78a4d8f32547770e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/FakerPHP/Faker/zipball/ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1",
"reference": "ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1",
"url": "https://api.github.com/repos/FakerPHP/Faker/zipball/89c6201c74db25fa759ff16e78a4d8f32547770e",
"reference": "89c6201c74db25fa759ff16e78a4d8f32547770e",
"shasum": ""
},
"require": {
@ -3442,9 +3442,9 @@
],
"support": {
"issues": "https://github.com/FakerPHP/Faker/issues",
"source": "https://github.com/FakerPHP/Faker/tree/v.1.14.1"
"source": "https://github.com/FakerPHP/Faker/tree/v1.15.0"
},
"time": "2021-03-30T06:27:33+00:00"
"time": "2021-07-06T20:39:40+00:00"
},
{
"name": "myclabs/deep-copy",
@ -3506,16 +3506,16 @@
},
{
"name": "nikic/php-parser",
"version": "v4.10.5",
"version": "v4.12.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "4432ba399e47c66624bc73c8c0f811e5c109576f"
"reference": "6608f01670c3cc5079e18c1dab1104e002579143"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f",
"reference": "4432ba399e47c66624bc73c8c0f811e5c109576f",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143",
"reference": "6608f01670c3cc5079e18c1dab1104e002579143",
"shasum": ""
},
"require": {
@ -3556,9 +3556,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5"
"source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0"
},
"time": "2021-05-03T19:11:20+00:00"
"time": "2021-07-21T10:44:31+00:00"
},
{
"name": "opis/closure",
@ -3627,16 +3627,16 @@
},
{
"name": "phar-io/manifest",
"version": "2.0.1",
"version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/phar-io/manifest.git",
"reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133"
"reference": "97803eca37d319dfa7826cc2437fc020857acb53"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133",
"reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133",
"url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53",
"reference": "97803eca37d319dfa7826cc2437fc020857acb53",
"shasum": ""
},
"require": {
@ -3681,9 +3681,9 @@
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
"support": {
"issues": "https://github.com/phar-io/manifest/issues",
"source": "https://github.com/phar-io/manifest/tree/master"
"source": "https://github.com/phar-io/manifest/tree/2.0.3"
},
"time": "2020-06-27T14:33:11+00:00"
"time": "2021-07-20T11:28:43+00:00"
},
{
"name": "phar-io/version",
@ -4388,16 +4388,16 @@
},
{
"name": "phpunit/phpunit",
"version": "9.5.5",
"version": "9.5.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "89ff45ea9d70e35522fb6654a2ebc221158de276"
"reference": "191768ccd5c85513b4068bdbe99bb6390c7d54fb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/89ff45ea9d70e35522fb6654a2ebc221158de276",
"reference": "89ff45ea9d70e35522fb6654a2ebc221158de276",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/191768ccd5c85513b4068bdbe99bb6390c7d54fb",
"reference": "191768ccd5c85513b4068bdbe99bb6390c7d54fb",
"shasum": ""
},
"require": {
@ -4409,7 +4409,7 @@
"ext-xml": "*",
"ext-xmlwriter": "*",
"myclabs/deep-copy": "^1.10.1",
"phar-io/manifest": "^2.0.1",
"phar-io/manifest": "^2.0.3",
"phar-io/version": "^3.0.2",
"php": ">=7.3",
"phpspec/prophecy": "^1.12.1",
@ -4427,7 +4427,7 @@
"sebastian/global-state": "^5.0.1",
"sebastian/object-enumerator": "^4.0.3",
"sebastian/resource-operations": "^3.0.3",
"sebastian/type": "^2.3.2",
"sebastian/type": "^2.3.4",
"sebastian/version": "^3.0.2"
},
"require-dev": {
@ -4475,7 +4475,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.5"
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.8"
},
"funding": [
{
@ -4487,7 +4487,7 @@
"type": "github"
}
],
"time": "2021-06-05T04:49:07+00:00"
"time": "2021-07-31T15:17:34+00:00"
},
{
"name": "psr/container",
@ -5553,21 +5553,22 @@
},
{
"name": "symfony/browser-kit",
"version": "v5.3.0",
"version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
"reference": "379984e25eee9811b0a25a2105e1a2b3b8d9b734"
"reference": "c1e3f64fcc631c96e2c5843b666db66679ced11c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/379984e25eee9811b0a25a2105e1a2b3b8d9b734",
"reference": "379984e25eee9811b0a25a2105e1a2b3b8d9b734",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/c1e3f64fcc631c96e2c5843b666db66679ced11c",
"reference": "c1e3f64fcc631c96e2c5843b666db66679ced11c",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/dom-crawler": "^4.4|^5.0"
"symfony/dom-crawler": "^4.4|^5.0",
"symfony/polyfill-php80": "^1.16"
},
"require-dev": {
"symfony/css-selector": "^4.4|^5.0",
@ -5604,7 +5605,7 @@
"description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/browser-kit/tree/v5.3.0"
"source": "https://github.com/symfony/browser-kit/tree/v5.3.4"
},
"funding": [
{
@ -5620,20 +5621,20 @@
"type": "tidelift"
}
],
"time": "2021-05-26T17:43:10+00:00"
"time": "2021-07-21T12:40:44+00:00"
},
{
"name": "symfony/console",
"version": "v5.3.0",
"version": "v5.3.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "058553870f7809087fa80fa734704a21b9bcaeb2"
"reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/058553870f7809087fa80fa734704a21b9bcaeb2",
"reference": "058553870f7809087fa80fa734704a21b9bcaeb2",
"url": "https://api.github.com/repos/symfony/console/zipball/51b71afd6d2dc8f5063199357b9880cea8d8bfe2",
"reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2",
"shasum": ""
},
"require": {
@ -5641,11 +5642,12 @@
"symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php73": "^1.8",
"symfony/polyfill-php80": "^1.15",
"symfony/polyfill-php80": "^1.16",
"symfony/service-contracts": "^1.1|^2",
"symfony/string": "^5.1"
},
"conflict": {
"psr/log": ">=3",
"symfony/dependency-injection": "<4.4",
"symfony/dotenv": "<5.1",
"symfony/event-dispatcher": "<4.4",
@ -5653,10 +5655,10 @@
"symfony/process": "<4.4"
},
"provide": {
"psr/log-implementation": "1.0"
"psr/log-implementation": "1.0|2.0"
},
"require-dev": {
"psr/log": "~1.0",
"psr/log": "^1|^2",
"symfony/config": "^4.4|^5.0",
"symfony/dependency-injection": "^4.4|^5.0",
"symfony/event-dispatcher": "^4.4|^5.0",
@ -5702,7 +5704,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v5.3.0"
"source": "https://github.com/symfony/console/tree/v5.3.6"
},
"funding": [
{
@ -5718,24 +5720,25 @@
"type": "tidelift"
}
],
"time": "2021-05-26T17:43:10+00:00"
"time": "2021-07-27T19:10:22+00:00"
},
{
"name": "symfony/css-selector",
"version": "v5.3.0",
"version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "fcd0b29a7a0b1bb5bfbedc6231583d77fea04814"
"reference": "7fb120adc7f600a59027775b224c13a33530dd90"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/fcd0b29a7a0b1bb5bfbedc6231583d77fea04814",
"reference": "fcd0b29a7a0b1bb5bfbedc6231583d77fea04814",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/7fb120adc7f600a59027775b224c13a33530dd90",
"reference": "7fb120adc7f600a59027775b224c13a33530dd90",
"shasum": ""
},
"require": {
"php": ">=7.2.5"
"php": ">=7.2.5",
"symfony/polyfill-php80": "^1.16"
},
"type": "library",
"autoload": {
@ -5767,7 +5770,7 @@
"description": "Converts CSS selectors to XPath expressions",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/css-selector/tree/v5.3.0"
"source": "https://github.com/symfony/css-selector/tree/v5.3.4"
},
"funding": [
{
@ -5783,7 +5786,7 @@
"type": "tidelift"
}
],
"time": "2021-05-26T17:40:38+00:00"
"time": "2021-07-21T12:38:00+00:00"
},
{
"name": "symfony/deprecation-contracts",
@ -5854,16 +5857,16 @@
},
{
"name": "symfony/dom-crawler",
"version": "v5.3.0",
"version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
"reference": "55fff62b19f413f897a752488ade1bc9c8a19cdd"
"reference": "2dd8890bd01be59a5221999c05ccf0fcafcb354f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/55fff62b19f413f897a752488ade1bc9c8a19cdd",
"reference": "55fff62b19f413f897a752488ade1bc9c8a19cdd",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/2dd8890bd01be59a5221999c05ccf0fcafcb354f",
"reference": "2dd8890bd01be59a5221999c05ccf0fcafcb354f",
"shasum": ""
},
"require": {
@ -5871,7 +5874,7 @@
"symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php80": "^1.15"
"symfony/polyfill-php80": "^1.16"
},
"conflict": {
"masterminds/html5": "<2.6"
@ -5909,7 +5912,7 @@
"description": "Eases DOM navigation for HTML and XML documents",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/dom-crawler/tree/v5.3.0"
"source": "https://github.com/symfony/dom-crawler/tree/v5.3.4"
},
"funding": [
{
@ -5925,27 +5928,27 @@
"type": "tidelift"
}
],
"time": "2021-05-26T17:43:10+00:00"
"time": "2021-07-23T15:55:36+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v5.3.0",
"version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "67a5f354afa8e2f231081b3fa11a5912f933c3ce"
"reference": "f2fd2208157553874560f3645d4594303058c4bd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/67a5f354afa8e2f231081b3fa11a5912f933c3ce",
"reference": "67a5f354afa8e2f231081b3fa11a5912f933c3ce",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f2fd2208157553874560f3645d4594303058c4bd",
"reference": "f2fd2208157553874560f3645d4594303058c4bd",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1",
"symfony/event-dispatcher-contracts": "^2",
"symfony/polyfill-php80": "^1.15"
"symfony/polyfill-php80": "^1.16"
},
"conflict": {
"symfony/dependency-injection": "<4.4"
@ -5955,7 +5958,7 @@
"symfony/event-dispatcher-implementation": "2.0"
},
"require-dev": {
"psr/log": "~1.0",
"psr/log": "^1|^2|^3",
"symfony/config": "^4.4|^5.0",
"symfony/dependency-injection": "^4.4|^5.0",
"symfony/error-handler": "^4.4|^5.0",
@ -5994,7 +5997,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v5.3.0"
"source": "https://github.com/symfony/event-dispatcher/tree/v5.3.4"
},
"funding": [
{
@ -6010,7 +6013,7 @@
"type": "tidelift"
}
],
"time": "2021-05-26T17:43:10+00:00"
"time": "2021-07-23T15:55:36+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
@ -6093,20 +6096,21 @@
},
{
"name": "symfony/finder",
"version": "v5.3.0",
"version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6"
"reference": "17f50e06018baec41551a71a15731287dbaab186"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6",
"reference": "0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6",
"url": "https://api.github.com/repos/symfony/finder/zipball/17f50e06018baec41551a71a15731287dbaab186",
"reference": "17f50e06018baec41551a71a15731287dbaab186",
"shasum": ""
},
"require": {
"php": ">=7.2.5"
"php": ">=7.2.5",
"symfony/polyfill-php80": "^1.16"
},
"type": "library",
"autoload": {
@ -6134,7 +6138,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/finder/tree/v5.3.0"
"source": "https://github.com/symfony/finder/tree/v5.3.4"
},
"funding": [
{
@ -6150,7 +6154,7 @@
"type": "tidelift"
}
],
"time": "2021-05-26T12:52:38+00:00"
"time": "2021-07-23T15:54:19+00:00"
},
{
"name": "symfony/polyfill-ctype",
@ -6233,16 +6237,16 @@
},
{
"name": "symfony/polyfill-intl-grapheme",
"version": "v1.23.0",
"version": "v1.23.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
"reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab"
"reference": "16880ba9c5ebe3642d1995ab866db29270b36535"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/24b72c6baa32c746a4d0840147c9715e42bb68ab",
"reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab",
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535",
"reference": "16880ba9c5ebe3642d1995ab866db29270b36535",
"shasum": ""
},
"require": {
@ -6294,7 +6298,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.0"
"source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1"
},
"funding": [
{
@ -6310,7 +6314,7 @@
"type": "tidelift"
}
],
"time": "2021-05-27T09:17:38+00:00"
"time": "2021-05-27T12:26:48+00:00"
},
{
"name": "symfony/polyfill-php73",
@ -6393,16 +6397,16 @@
},
{
"name": "symfony/polyfill-php80",
"version": "v1.23.0",
"version": "v1.23.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0"
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0",
"reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
"shasum": ""
},
"require": {
@ -6456,7 +6460,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0"
"source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1"
},
"funding": [
{
@ -6472,25 +6476,25 @@
"type": "tidelift"
}
],
"time": "2021-02-19T12:13:01+00:00"
"time": "2021-07-28T13:41:28+00:00"
},
{
"name": "symfony/process",
"version": "v5.3.0",
"version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "53e36cb1c160505cdaf1ef201501669c4c317191"
"reference": "d16634ee55b895bd85ec714dadc58e4428ecf030"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/53e36cb1c160505cdaf1ef201501669c4c317191",
"reference": "53e36cb1c160505cdaf1ef201501669c4c317191",
"url": "https://api.github.com/repos/symfony/process/zipball/d16634ee55b895bd85ec714dadc58e4428ecf030",
"reference": "d16634ee55b895bd85ec714dadc58e4428ecf030",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/polyfill-php80": "^1.15"
"symfony/polyfill-php80": "^1.16"
},
"type": "library",
"autoload": {
@ -6518,7 +6522,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/process/tree/v5.3.0"
"source": "https://github.com/symfony/process/tree/v5.3.4"
},
"funding": [
{
@ -6534,7 +6538,7 @@
"type": "tidelift"
}
],
"time": "2021-05-26T12:52:38+00:00"
"time": "2021-07-23T15:54:19+00:00"
},
{
"name": "symfony/service-contracts",
@ -6617,16 +6621,16 @@
},
{
"name": "symfony/string",
"version": "v5.3.0",
"version": "v5.3.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "a9a0f8b6aafc5d2d1c116dcccd1573a95153515b"
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/a9a0f8b6aafc5d2d1c116dcccd1573a95153515b",
"reference": "a9a0f8b6aafc5d2d1c116dcccd1573a95153515b",
"url": "https://api.github.com/repos/symfony/string/zipball/bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1",
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1",
"shasum": ""
},
"require": {
@ -6680,7 +6684,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v5.3.0"
"source": "https://github.com/symfony/string/tree/v5.3.3"
},
"funding": [
{
@ -6696,20 +6700,20 @@
"type": "tidelift"
}
],
"time": "2021-05-26T17:43:10+00:00"
"time": "2021-06-27T11:44:38+00:00"
},
{
"name": "symfony/yaml",
"version": "v5.3.0",
"version": "v5.3.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "3bbcf262fceb3d8f48175302e6ba0ac96e3a5a11"
"reference": "4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/3bbcf262fceb3d8f48175302e6ba0ac96e3a5a11",
"reference": "3bbcf262fceb3d8f48175302e6ba0ac96e3a5a11",
"url": "https://api.github.com/repos/symfony/yaml/zipball/4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7",
"reference": "4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7",
"shasum": ""
},
"require": {
@ -6755,7 +6759,7 @@
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v5.3.0"
"source": "https://github.com/symfony/yaml/tree/v5.3.6"
},
"funding": [
{
@ -6771,20 +6775,20 @@
"type": "tidelift"
}
],
"time": "2021-05-26T17:43:10+00:00"
"time": "2021-07-29T06:20:01+00:00"
},
{
"name": "theseer/tokenizer",
"version": "1.2.0",
"version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
"reference": "75a63c33a8577608444246075ea0af0d052e452a"
"reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a",
"reference": "75a63c33a8577608444246075ea0af0d052e452a",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
"reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
"shasum": ""
},
"require": {
@ -6813,7 +6817,7 @@
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"support": {
"issues": "https://github.com/theseer/tokenizer/issues",
"source": "https://github.com/theseer/tokenizer/tree/master"
"source": "https://github.com/theseer/tokenizer/tree/1.2.1"
},
"funding": [
{
@ -6821,7 +6825,7 @@
"type": "github"
}
],
"time": "2020-07-12T23:59:07+00:00"
"time": "2021-07-28T10:34:58+00:00"
},
{
"name": "webmozart/assert",
@ -7146,7 +7150,8 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": "^8.0.0"
"php": "^8.0.0",
"ext-intl": "~8.0"
},
"platform-dev": [],
"plugin-api-version": "2.0.0"

View File

@ -3,25 +3,26 @@
return [
'captcha' => [
'suppliers' => [
'public' => '',
'secret' => ''
'public' => null,
'secret' => null
]
],
'mail' => [
'system' => '',
'info' => ''
'system' => null,
'info' => null
],
'dellin' => [
'nickname' => '',
'password' => '',
'key' => ''
'nickname' => null,
'password' => null,
'key' => null
],
'cdek' => [
'nickname' => '',
'password' => '',
'key' => ''
'nickname' => null,
'password' => null,
'key' => null
],
'dadata' => [
'key' => ''
'key' => null,
'secret' => null
]
];

View File

@ -96,9 +96,9 @@ $config = [
],
'product/<catn:[^/]+>' => 'product/index',
'<section:(product|cart)>/<catn:[^/]+>/<action:(read|write|edit|delete)>/<target:(title|catn|dscr|dmns|wght|image|cover|comm)>' => '<section>/<action>-<target>',
'profile/geolocation/<action:(init)>' => 'profile/geolocation-<action>',
'profile/geolocation/<action:(init|write)>' => 'profile/geolocation-<action>',
'orders' => 'order/index',
'orders/<type:[^/]+>' => 'order/index',
'orders/<filter:[^/]+>' => 'order/index',
'orders/<catn:[^/]+>/<action:(accept)>' => 'order/<action>',
'orders/supply/<catn:[^/]+>/<action:(read|write|edit|delete)>' => 'order/supply-<action>',
'orders/supply/<catn:[^/]+>/<action:(read|write|edit|delete)>/<target:(stts|cost|time|comm)>' => 'order/supply-<action>-<target>',

View File

@ -102,7 +102,7 @@ class OrderController extends Controller
// Генерация ответа
yii::$app->response->content = json_encode([
'main' => $this->renderPartial('/account/index'),
'redirect' => '/order',
'redirect' => '/orders',
'_csrf' => yii::$app->request->getCsrfToken()
]);
} else if (yii::$app->request->isGet) {
@ -117,6 +117,9 @@ class OrderController extends Controller
// Инициализация cookie
$cookies = yii::$app->response->cookies;
// Инициализация открытой панели ("Модерация", "Мои заказы")
$panel = yii::$app->request->post('panel') ?? yii::$app->request->get('panel') ?? 'orders_panel_orders';
// Инициализация фильтра по типу
if ($filter === 'last') {
// Запрошено использование прошлых данных о фильтрации по типу
@ -218,7 +221,7 @@ class OrderController extends Controller
$to = DateTime::createFromFormat('U', (string) $to)->format('Y-m-d');
return [
'main' => $this->renderPartial('/orders/index', compact('orders', 'moderator_orders', 'from', 'to')),
'main' => $this->renderPartial('/orders/index', compact('orders', 'moderator_orders', 'from', 'to', 'panel')),
'title' => 'Заказы',
'redirect' => '/orders',
'_csrf' => yii::$app->request->getCsrfToken()
@ -426,26 +429,43 @@ class OrderController extends Controller
foreach (isset($targets[0]) && is_array($targets[0]) ? $targets : [$targets] as $target) {
// Унификация входных параметров
foreach ($target as $catn => $amount) {
foreach ($target as $catn => $data) {
// Перебор целей (переданных объектов в корзине)
foreach ($data as $type => $amount) {
// Перебор данных цели
foreach ($connections as $connection) {
// Перебор объектов в корзине
if ($connection['supply']['catn'] === $catn) {
// Цель найдена
// Цель найдена (продукт)
foreach ($connection['order_edge_supply'] as $order_edge_supply) {
// Перебор связанных поставок
if ($connection['amount'] > $amount) {
if ($order_edge_supply["dlvr"]["type"] === $type) {
// Цель найдена (поставка)
if ($connection['amount'][$type] > $amount) {
// Запрошено уменьшение количества
// Удаление
$order->deleteSupply([$catn => $connection['amount'] - $amount]);
} else if ($connection['amount'] < $amount) {
$order->deleteSupply([
$catn => [
$type => $connection['amount'][$type] - $amount
]
]);
} else if ($connection['amount'][$type] < $amount) {
// Запрошено увеличение количества
// Запись
$order->writeSupply('supply/' . $connection['supply']['_key'], $connection['order_edge_supply']['dlvr'] ?? 'auto', $amount - $connection['amount']);
$order->writeSupply('supply/' . $connection['supply']['_key'], $type, $amount - $connection['amount'][$type]);
}
break;
}
}
}
}
}
@ -681,7 +701,6 @@ class OrderController extends Controller
// Удалось найти инстанцию поставки
var_dump($supply);
}
if ($order_edge_supply = OrderEdgeSupply::searchById($_id = OrderEdgeSupply::collectionName() . '/' . $catn)) {

View File

@ -10,7 +10,9 @@ use yii\web\Controller;
use yii\web\Response;
use yii\web\Cookie;
use yii\web\UploadedFile;
use yii\web\User;
use app\models\Account;
use app\models\Supply;
use app\models\SupplyGroup;
use app\models\Search;
@ -18,8 +20,11 @@ use app\models\Notification;
use app\models\Settings;
use app\models\Dellin;
use app\models\SettingsEdgeSettings;
use app\models\Terminal;
use Dadata\DadataClient as Dadata;
use Exception;
use moonland\phpexcel\Excel;
use Throwable;
class ProfileController extends Controller
{
@ -43,7 +48,8 @@ class ProfileController extends Controller
'supplies',
'import',
'monitoring',
'readGroups'
'readGroups',
'geolocation-write'
]
],
[
@ -467,13 +473,99 @@ class ProfileController extends Controller
*
* @param string|null $account
*
* @return bool
* @return array|bool JSON, в случае успеха
*/
public function actionGeolocationInit(string|null $account = null): bool
public function actionGeolocationInit(): array|bool
{
if (Yii::$app->request->isPost) {
// POST-запрос
// Настройка ответа
yii::$app->response->format = Response::FORMAT_JSON;
// if (is_null($account)) {
// // Данные аккаунта не переданы
// if (yii::$app->user->isGuest) {
// // Аккаунт не аутентифицирован
// return false;
// } else {
// // Аккаунт аутентифицирован
// // Инициализация
// $account = yii::$app->user->identity;
// }
// } else {
// if (is_int($account)) {
// // Передан идентификатор (_key) аккаунта (подразумевается)
// // Инициализация (поиск в базе данных)
// if (!$account = Account::searchById(Account::collectionName() . "/$account")) {
// // Не удалось инициализировать аккаунт
// return false;
// }
// }
// }
// Инициализация аккаунта
if (yii::$app->user->isGuest) {
// Аккаунт не аутентифицирован
return false;
} else {
// Аккаунт аутентифицирован
// Инициализация
$account = yii::$app->user->identity;
}
// Настройка ответа
yii::$app->response->format = Response::FORMAT_JSON;
// Инициализация IP-адреса
$ip = yii::$app->request->userIp === 'localhost' || yii::$app->request->userIp === '127.0.0.1' ? '46.226.227.20' : yii::$app->request->userIp;
// Проверка записи геолокации
if (isset($account->geol)) {
// Удалось найти данные геолокации
} else {
// Не удалось найти данные геолокации
try {
// Инициализация данных геолокации
$dadata = new Dadata(yii::$app->params['dadata']['key'], yii::$app->params['dadata']['secret']);
// Запись в буфер данных о геолокации
$account->geol = $dadata->iplocate($ip);
} catch (Throwable $t) {
return false;
}
// Запись в буфер данных о типе геолокации
$account->geol = ['type' => 'ip'] + $account->geol;
self::syncGeolocationWithDellin($account);
}
return self::geolocationAccuracyCheck($account);
}
return false;
}
/**
* Генерация ответа по данным геолокации
*
* Проверка точности и наличия данных о геолокации
*
* @param Account|string|null $account
*
* @return array|bool JSON, в случае успеха
*/
public static function geolocationAccuracyCheck(Account|int|null $account = null): array|bool
{
if (is_null($account)) {
// Данные аккаунта не переданы
@ -487,36 +579,219 @@ class ProfileController extends Controller
// Инициализация
$account = yii::$app->user->identity;
}
} else {
if (is_int($account)) {
// Передан идентификатор (_key) аккаунта (подразумевается)
// Инициализация (поиск в базе данных)
if (!$account = Account::searchById(Account::collectionName() . "/$account")) {
// Не удалось инициализировать аккаунт
return false;
}
}
}
// Инициализация IP-адреса
$ip = yii::$app->request->userIp === 'localhost' || yii::$app->request->userIp === '127.0.0.1' ? '46.226.227.20' : yii::$app->request->userIp;
if (isset($account->geol)) {
// Данные о геолокации найдены
// Генерация ответа
return [
'requestGps' => match ($account->geol['type'] ?? null) {
'gps' => false,
default => true
},
'_csrf' => yii::$app->request->getCsrfToken()
];
}
return false;
}
/**
* Запись данных о геолокации по ширине и долготе
*
* @param string|null $account Аккаунт
*
* @return array|bool JSON, в случае успеха
*/
public function actionGeolocationWrite(): array|bool
{
if (Yii::$app->request->isPost) {
// POST-запрос
// Настройка ответа
yii::$app->response->format = Response::FORMAT_JSON;
// Проверка записи геолокации
if (isset($account->geol)) {
// Удалось найти данные геолокации
// if (is_null($account)) {
// // Данные аккаунта не переданы
return true;
// if (yii::$app->user->isGuest) {
// // Аккаунт не аутентифицирован
// return false;
// } else {
// // Аккаунт аутентифицирован
// // Инициализация
// $account = yii::$app->user->identity;
// }
// } else {
// if (is_int($account)) {
// // Передан идентификатор (_key) аккаунта (подразумевается)
// // Инициализация (поиск в базе данных)
// if (!$account = Account::searchById(Account::collectionName() . "/$account")) {
// // Не удалось инициализировать аккаунт
// return false;
// }
// }
// }
// Инициализация аккаунта
if (yii::$app->user->isGuest) {
// Аккаунт не аутентифицирован
return false;
} else {
// Не удалось найти данные геолокации
// Аккаунт аутентифицирован
// Инициализация
$account = yii::$app->user->identity;
}
// Настройка ответа
yii::$app->response->format = Response::FORMAT_JSON;
// Инициализация широты
$latitude = yii::$app->request->post('latitude') ?? yii::$app->request->get('latitude');
// Инициализация долготы
$longitude = yii::$app->request->post('longitude') ?? yii::$app->request->get('longitude');
if (empty($latitude) || empty($longitude)) {
// Широта или долгота не передана
return false;
}
try {
// Инициализация данных геолокации
$dadata = new Dadata(yii::$app->params['dadata']['key'], null);
$dadata = new Dadata(yii::$app->params['dadata']['key'], yii::$app->params['dadata']['secret']);
// Запись в буфер
$account->geol = $dadata->iplocate($ip);
// Запись в буфер данных о геолокации
$account->geol = $dadata->geolocate("address", $latitude, $longitude)[0];
} catch (Throwable $t) {
return false;
}
// Синхронизация с базой данных ДеловыеЛинии
// Запись в буфер данных о типе геолокации
$account->geol = ['type' => 'gps'] + $account->geol;
return self::syncGeolocationWithDellin($account);
}
}
/**
* Синхронизация данных о геолокации с данными терминалов ДеловыеЛинии
*
* Присваивает терминал Скиллпартс относительно города пользователя
*
* @param string|null $account Аккаунт
*
* @return bool Статус выполнения
*
* @todo Переделать запись страны как "Россия" в определение по геолокации через DaData
*/
public static function syncGeolocationWithDellin(Account|int|null $account = null): bool
{
if (is_null($account)) {
// Данные аккаунта не переданы
if (yii::$app->user->isGuest) {
// Аккаунт не аутентифицирован
return false;
} else {
// Аккаунт аутентифицирован
// Инициализация
$account = yii::$app->user->identity;
}
} else {
if (is_int($account)) {
// Передан идентификатор (_key) аккаунта (подразумевается)
// Инициализация (поиск в базе данных)
if (!$account = Account::searchById(Account::collectionName() . "/$account")) {
// Не удалось инициализировать аккаунт
return false;
}
}
}
// Синхронизация с базой данных (таблица с ДеловыеЛинии)
if ($dellin = Dellin::searchByCityKladr(str_pad($account->geol['data']['city_kladr_id'], 25, '0000000000000000000000'))) {
// Удалось найти город с терминалами ДеловыеЛинии
foreach ($dellin['data']['terminals']['terminal'] as $dellin) {
// Перебор терминалов ДеловыеЛинии
try {
// Поиск терминала SkillParts
if ($skillparts_buffer = Terminal::searchByDellinTerminalId($dellin['id'], 1)) {
// Удалось найти терминал SkillParts
// Запись данных терминала SkillParts
$skillparts = $skillparts_buffer[0]->dell;
} else {
// Не удалось найти терминал SkillParts
if ($dellin['default'] && !$dellin['isOffice'] && $dellin['receiveCargo'] && $dellin['giveoutCargo']) {
// Терминал ДеловыеЛинии помечен как основной, не является офисом, принимает и отправляет посылки
// Инициализация данных геолокации
$dadata = new Dadata(yii::$app->params['dadata']['key'], yii::$app->params['dadata']['secret']);
// Запись в буфер данных о геолокации
$geolocation = $dadata->geolocate("address", $dellin['latitude'], $dellin['longitude'])[0];
// Инициализация терминала SkillParts
$terminal = new Terminal;
// Настройка
$terminal->cntr = $geolocation['data']['country'];
$terminal->city = $geolocation['data']['city'];
$terminal->comm = 'Недоступен';
$terminal->dell = $dellin['id'];
// Запись в базу данных
if ($terminal->save()) {
// Удалось записать терминал в базу данных
// Запись данных терминала SkillParts
$skillparts = $terminal->dell;
}
}
}
} catch (Throwable $t) {
continue;
}
}
if (empty($skillparts)) {
// Не удалось инициализировать терминал SkillParts
return false;
} else {
// Удалось инициализировать терминал SkillParts
// Запись связанного с городом терминала в настройки пользователя
// !!! Берётся первый попавшийся терминал
$account->opts = [
'delivery_to_terminal' => $dellin['data']['terminals']['terminal'][0]['id']
'delivery_to_terminal' => $skillparts
] + ($account->opts ?? []);
// Отправка данных из буфера в базу данных
@ -526,7 +801,4 @@ class ProfileController extends Controller
return false;
}
return false;
}
}

View File

@ -199,9 +199,9 @@ class SearchController extends Controller
// Инициализация данных геолокации
try {
$from = (int) $connection['account']['opts']['delivery_from_terminal'] ?? Settings::search()->delivery_from_default ?? 36;
$from = (int) $connection['account']['opts']['delivery_from_terminal'] ?? empty(Settings::search()->delivery_from_default) ? 36 : (int) Settings::search()->delivery_from_default;
} catch (Exception $e) {
$from = (int) Settings::search()->delivery_from_default ?? 36;
$from = empty(Settings::search()->delivery_from_default) ? 36 : (int) Settings::search()->delivery_from_default;
}
try {
@ -277,9 +277,9 @@ class SearchController extends Controller
}
try {
$from = (int) $buffer_delivery_avia['account']['opts']['delivery_from_terminal'] ?? Settings::search()->delivery_from_default ?? 36;
$from = (int) $buffer_delivery_avia['account']['opts']['delivery_from_terminal'] ?? empty(Settings::search()->delivery_from_default) ? 36 : (int) Settings::search()->delivery_from_default;
} catch (Exception $e) {
$from = (int) Settings::search()->delivery_from_default ?? 36;
$from = empty(Settings::search()->delivery_from_default) ? 36 : (int) Settings::search()->delivery_from_default;
}
try {
@ -325,6 +325,7 @@ class SearchController extends Controller
} catch (Exception $e) {
$buffer_delivery_avia['delivery']['error'] = true;
// echo '<pre>';
// var_dump($e->getMessage());
// var_dump($e->getTrace());
// var_dump($e->getFile());

View File

@ -486,9 +486,8 @@ class Account extends Document implements IdentityInterface, PartnerInterface
}
// Запись
// empty($terminal->cntr) &&
empty($terminal->city) && empty($terminal->strt) && empty($terminal->hous)
or $list[$terminal->dell] = "$terminal->city ($terminal->strt, $terminal->hous" . (empty($terminal->offs) ? ')' : ", $terminal->offs)");
or $list[$terminal->dell] = (empty($terminal->city) ? '' : "г. $terminal->city"). (empty($terminal->strt) ? '' : ", ул. $terminal->strt") . (empty($terminal->hous) ? '' : ", д. $terminal->hous") . (empty($terminal->offs) ? '' : ", оф. $terminal->offs") . (empty($terminal->comm) ? '' : " ($terminal->comm)");
}
return $this->syncListWithSettings($list, 'delivery_to_terminal');

View File

@ -124,7 +124,7 @@ abstract class Edge extends Document
/**
* Поиск ребра по его вершинам
*/
public static function searchByVertex(string $_from, string $_to, string|null $type = null, int $limit = 1): array|null
public static function searchByVertex(string $_from, string $_to, string|null $type = null, int $limit = 1, array|null $filter = null): array|null
{
$query = self::find()->where([
'_from' => $_from,
@ -135,6 +135,10 @@ abstract class Edge extends Document
$query->where(['type' => $type]);
}
if (isset($filter)) {
$query->where($filter);
}
return $query->limit($limit)->all();
}

View File

@ -183,11 +183,11 @@ class Order extends Document implements DocumentInterface
/**
* Удаление поставки
*
* @param Supply|string|array $supply Товары
* @param Supply|array $supply Товары
*
* @return int Количество удалённых рёбер
*/
public function deleteSupply(Supply|string|array $supply): int
public function deleteSupply(Supply|array $supply): int
{
// Инициализация
$amount = 0;
@ -196,37 +196,61 @@ class Order extends Document implements DocumentInterface
// Передана инстанция класса поставки или второй элемент массива не является числом
// Унификация входных данных
$supply = [$supply->catn => 1];
$supply = [
$supply->catn => [
'auto' => 1
]
];
}
foreach (is_array($supply) ? $supply : [$supply => 1] as $catn => $amount_raw) {
// Перебор товаров
foreach ($supply as $catn => $data) {
// Перебор целей
var_dump('ок');
foreach ($data as $type => $delete_amount) {
// Перебор данных цели
var_dump('да');
if ($supply = Supply::searchByCatn($catn)) {
foreach (OrderEdgeSupply::searchByVertex($this->readId(), $supply->readId(), limit: $amount_raw) as $edge) {
// Перебор рёбер до продукта (если товаров в заказе несколько)
// Поставка найдена
// Удаление
$edge->delete();
$edges = OrderEdgeSupply::searchByVertex($this->readId(), $supply->readId(), limit: $delete_amount, filter: ['order_edge_supply.dlvr.type == \'' . $type . '\'']);
for (; count($edges) > $amount; $amount++) {
var_dump(count($edges), $amount, $delete_amount);
var_dump(PHP_EOL);
// Удаление из базы данных
$edges[$amount]->delete();
// Запись в журнал
$this->journal('delete', ['target' => $supply->readId()]);
$this->journal(
'delete',
[
'target' => [
$supply->readId() => $type
]
]
);
}
}
}
}
// Постинкрементация счётчика удалённых рёбер
$amount++;
}
}
}
// Генерация вставки текста с типом доставки
$type = Supply::DeliveryToRussian($type);
if ($amount === 0) {
// Отправка уведомления
self::notification('Неудачная попытка удалить товар из корзины');
self::notification('Не удалось удалить товар из корзины');
} else if ($amount === 1) {
// Отправка уведомления
self::notification('Товар ' . $supply->catn . ' удалён из корзины');
self::notification("Товар $supply->catn c $type удалён из корзины");
} else {
// Отправка уведомления
self::notification('Удалено ' . $amount . ' товаров из корзины');
self::notification("Удалено $amount товаров из корзины");
}
return $amount;
@ -464,8 +488,19 @@ class Order extends Document implements DocumentInterface
}
}
// Запись количества заказанных поставок
$connection['amount'] = count($connection['order_edge_supply']);
// Инициализация счетчиков
$connection['amount'] = [
'auto' => 0,
'avia' => 0
];
// Подсчет количества поставок
foreach ($connection['order_edge_supply'] as $edge) {
// Перебор связанных поставок
if ($edge['dlvr']['type'] === 'auto') ++$connection['amount']['auto'];
if ($edge['dlvr']['type'] === 'avia') ++$connection['amount']['avia'];
}
}
// Инициализация дополнительных данных
@ -497,15 +532,15 @@ class Order extends Document implements DocumentInterface
// Поиск привязанного товара
$connection['product'] = Product::searchBySupplyId($connection['supply']['_id']);
if (empty(reset($connection['order_edge_supply'])['dlvr']['type']) || reset($connection['order_edge_supply'])['dlvr']['type'] === 'auto') {
// Доставка автоматическая
// if (empty(reset($connection['order_edge_supply'])['dlvr']['type']) || reset($connection['order_edge_supply'])['dlvr']['type'] === 'auto') {
// // Доставка автоматическая
try {
// Инициализация данных геолокации
try {
$from = (int) $connection['account']['opts']['delivery_from_terminal'] ?? Settings::search()->delivery_from_default ?? 36;
$from = (int) $connection['account']['opts']['delivery_from_terminal'] ?? empty(Settings::search()->delivery_from_default) ? 36 : (int) Settings::search()->delivery_from_default;
} catch (Exception $e) {
$from = (int) Settings::search()->delivery_from_default ?? 36;
$from = empty(Settings::search()->delivery_from_default) ? 36 : (int) Settings::search()->delivery_from_default;
}
try {
@ -521,7 +556,7 @@ class Order extends Document implements DocumentInterface
// Срок хранения не превышен, информация актуальна
// Запись в буфер вывода
$connection['delivery'] = $buffer_connection['data'];
$connection['delivery']['auto'] = $buffer_connection['data'];
}
} else {
// Инициализация инстанции продукта в базе данных
@ -530,7 +565,7 @@ class Order extends Document implements DocumentInterface
// Инициализация доставки Dellin (автоматическая)
$product->bffr = ($product->bffr ?? []) + [
"$from-$to" => [
'data' => $connection['delivery'] = Dellin::calcDeliveryAdvanced(
'data' => $connection['delivery']['auto'] = Dellin::calcDeliveryAdvanced(
$from,
$to,
(int) ($connection['product']['wght'] ?? 0),
@ -547,8 +582,9 @@ class Order extends Document implements DocumentInterface
$product->update();
}
} catch (Exception $e) {
$connection['delivery']['error'] = true;
$connection['delivery']['auto']['error'] = true;
// echo '<pre>';
// var_dump($e->getMessage());
// var_dump($e->getTrace());
// var_dump($e->getFile());
@ -558,16 +594,16 @@ class Order extends Document implements DocumentInterface
}
// Запись цены (цена поставки + цена доставки + наша наценка)
$connection['cost'] = ($cost['ЦенаЗаЕдиницу'] ?? $connection['supply']->onec['Цены']['Цена']['ЦенаЗаЕдиницу']) + ($connection['delivery']['price']['all'] ?? $connection['delivery']['price']['one'] ?? 0) + ($settings['increase'] ?? 0) ?? 0;
} else {
$connection['cost']['auto'] = ($cost['ЦенаЗаЕдиницу'] ?? $connection['supply']->onec['Цены']['Цена']['ЦенаЗаЕдиницу']) + ($connection['delivery']['auto']['price']['all'] ?? $connection['delivery']['auto']['price']['one'] ?? 0) + ($settings['increase'] ?? 0) ?? 0;
// } else {
// Доставка самолётом
try {
// Инициализация данных геолокации
try {
$from = (int) $connection['account']['opts']['delivery_from_terminal'] ?? Settings::search()->delivery_from_default ?? 36;
$from = (int) $connection['account']['opts']['delivery_from_terminal'] ?? empty(Settings::search()->delivery_from_default) ? 36 : (int) Settings::search()->delivery_from_default;
} catch (Exception $e) {
$from = (int) Settings::search()->delivery_from_default ?? 36;
$from = empty(Settings::search()->delivery_from_default) ? 36 : (int) Settings::search()->delivery_from_default;
}
try {
@ -583,7 +619,7 @@ class Order extends Document implements DocumentInterface
// Срок хранения не превышен, информация актуальна
// Запись в буфер вывода
$connection['delivery'] = $buffer_connection['data'];
$connection['delivery']['avia'] = $buffer_connection['data'];
}
} else {
// Инициализация инстанции продукта в базе данных
@ -592,7 +628,7 @@ class Order extends Document implements DocumentInterface
// Инициализация доставки Dellin (автоматическая)
$product->bffr = ($product->bffr ?? []) + [
"$from-$to-avia" => [
'data' => $connection['delivery'] = Dellin::calcDeliveryAdvanced(
'data' => $connection['delivery']['avia'] = Dellin::calcDeliveryAdvanced(
$from,
$to,
(int) ($connection['product']['wght'] ?? 0),
@ -610,7 +646,7 @@ class Order extends Document implements DocumentInterface
$product->update();
}
} catch (Exception $e) {
$connection['delivery']['error'] = true;
$connection['delivery']['avia']['error'] = true;
// var_dump($e->getMessage());
// var_dump($e->getTrace());
@ -621,8 +657,8 @@ class Order extends Document implements DocumentInterface
}
// Запись цены (цена поставки + цена доставки + наша наценка)
$connection['cost'] = ($cost['ЦенаЗаЕдиницу'] ?? $connection['supply']->onec['Цены']['Цена']['ЦенаЗаЕдиницу']) + ($connection['delivery']['price']['all'] ?? $connection['delivery']['price']['one'] ?? 0) + ($settings['increase'] ?? 0) ?? 0;
}
$connection['cost']['avia'] = ($cost['ЦенаЗаЕдиницу'] ?? $connection['supply']->onec['Цены']['Цена']['ЦенаЗаЕдиницу']) + ($connection['delivery']['avia']['price']['all'] ?? $connection['delivery']['avia']['price']['one'] ?? 0) + ($settings['increase'] ?? 0) ?? 0;
// }
// Запись валюты
$connection['currency'] = $cost['Валюта'];
@ -638,7 +674,8 @@ class Order extends Document implements DocumentInterface
*
* @return bool Статус подтверждения всех поставок (true если все и false если хотя бы одна из них не подтверждена)
*/
public static function checkSuppliesStts(array $order_edge_supply): bool {
public static function checkSuppliesStts(array $order_edge_supply): bool
{
foreach ($order_edge_supply as $edge) {
// Перебор поставок

View File

@ -445,6 +445,7 @@ class Product extends Document
->in('product_search')
->filter(['catn' => $catn], 'START_SENSETIVE')
->limit($limit)
->orderBy(['catn' => 'ASC'])
->select($select)
->createCommand()
->execute()

View File

@ -601,4 +601,18 @@ class Supply extends Product implements ProductInterface, OfferInterface
{
return static::searchAccountById($this->readId());
}
public static function DeliveryToRussian(string $dlvr, int $type = 1): string {
if ($type === 1) {
return match($dlvr) {
'avia' => 'доставкой самолётом',
default => 'автоматической доставкой'
};
} else {
return match($dlvr) {
'avia' => 'Самолёт',
default => 'Автоматическая'
};
}
}
}

View File

@ -25,6 +25,7 @@ class Terminal extends Document
'strt',
'hous',
'offs',
'comm',
'dell',
'hndl'
]
@ -43,7 +44,8 @@ class Terminal extends Document
'city',
'strt',
'hous',
'offs'
'offs',
'comm'
],
'string'
],
@ -52,20 +54,7 @@ class Terminal extends Document
'dell',
'hndl'
],
'int'
],
[
[
'name',
'cntr',
'city',
'strt',
'hous',
'dell',
'hndl'
],
'required',
'message' => 'Заполните поле: {attribute}'
'integer'
]
]
);
@ -82,9 +71,25 @@ class Terminal extends Document
'strt' => 'Улица',
'hous' => 'Дом',
'offs' => 'Офис',
'comm' => 'Комментарий',
'dell' => 'Терминал ДеловыеЛинии для рассчётов доставки',
'hndl' => 'Количество дней для обработки после получения от ДеловыеЛинии'
]
);
}
/**
* Поиск по индентификатору терминала ДеловыеЛинии
*
* @param string $dell Идентификатор терминала ДеловыеЛинии
* @param int $limit Максимальное количество результатов поиска
*
* @return array|null Терминалы SkillParts, если найдены
*
* @todo Сделать привязку терминалов SkillParts к нескольким терминалам ДеловыеЛинии и переделать под это поиск
*/
public static function searchByDellinTerminalId(string $dell, int $limit = 1): ?array
{
return self::find()->where(['dell' => $dell])->limit($limit)->all();
}
}

View File

@ -86,7 +86,7 @@ class Dellin extends Model
// Значения по умолчанию, если указан 0
$x === 0 and $x = 25;
$y === 0 and $y = 50;
$y === 0 and $y = 40;
$z === 0 and $z = 25;
$weight === 0 and $weight = 300;

View File

@ -89,7 +89,7 @@ use app\models\AccountForm;
</div>
<?php if ($registration ?? false) : ?>
<script defer>
<script async="false">
// Инициализация формы
let form = document.getElementById('<?= $form_id ?>');
@ -101,6 +101,7 @@ use app\models\AccountForm;
// Обработчик события инициализации
$(form).on('afterInit', function(e) {
// Запуск программы регистрации
registration_start(form, 'panel');
});
@ -111,6 +112,7 @@ use app\models\AccountForm;
document.addEventListener('DOMContentLoaded', function() {
// Обработчик события инициализации
$(form).on('afterInit', function(e) {
// Запуск программы регистрации
registration_start(form, 'panel');
});

View File

@ -44,23 +44,22 @@ use DateTime;
// Инициализация цены
$price_raw = $cost;
$price = $price_raw . ' ' . $currency;
// Инициализация типа доставки
$delivery_type = reset($order_edge_supply)['dlvr']['type'] ?? 'auto';
// Инициализация комментария
$comment = $order_edge_supply[0]['comm'] ?? 'Комментарий к заказу';
// Инициализация индикатора
$delivery_icon = match ($delivery_type) {
'avia' => '<i class="mr-1 fas fa-plane"></i>',
default => '<i class="mr-1 fas fa-truck"></i>'
};
if ($amount['auto'] > 0) {
// Найдены поставки с автоматической доставкой
// Инициализация цены
$price_auto = $price_raw['auto'] . ' ' . $currency;
// Инициализация доставки
if (isset($delivery['error']) || $delivery === '?') {
if (!isset($delivery) || (isset($delivery['auto'], $delivery['auto']['error']) || $delivery === '?')) {
// Не удалось рассчитать доставку
// Инициализация времени
$delivery = '?';
$delivery_auto = '?';
} else {
// Удалось рассчитать доставку
@ -68,35 +67,35 @@ use DateTime;
try {
// Взять данные из "arrivalToOspSender" (Дата прибытия на терминал-отправитель)
$delivery_send_date = DateTime::createFromFormat('Y-m-d', $delivery['orderDates']['arrivalToOspSender'])->getTimestamp();
$delivery_auto_send_date = DateTime::createFromFormat('Y-m-d', $delivery['auto']['orderDates']['arrivalToOspSender'])->getTimestamp();
} catch (Throwable $e) {
// Взять данные из "pickup" (Дата передачи груза на адресе отправителя)
$delivery_send_date = DateTime::createFromFormat('Y-m-d', $delivery['orderDates']['pickup'])->getTimestamp();
$delivery_auto_send_date = DateTime::createFromFormat('Y-m-d', $delivery['auto']['orderDates']['pickup'])->getTimestamp();
}
// Инициализация времени доставки
try {
// Доставка по воздуху (подразумевается), данные из "giveoutFromOspReceiver" (Дата и время, с которого груз готов к выдаче на терминале)
$delivery_converted = DateTime::createFromFormat('Y-m-d H:i:s', $delivery['orderDates']['giveoutFromOspReceiver'])->getTimestamp();
// Оставлено на всякий случай для дальнейших разбирательств
$delivery_auto_converted = DateTime::createFromFormat('Y-m-d H:i:s', $delivery['auto']['orderDates']['giveoutFromOspReceiver'])->getTimestamp();
} catch (Throwable $e) {
// Автоматическая доставка (подразумевается), данные из "arrivalToOspReceiver" (Дата прибытия натерминал-получатель)
$delivery_converted = DateTime::createFromFormat('Y-m-d', $delivery['orderDates']['arrivalToOspReceiver'])->getTimestamp();
$delivery_auto_converted = DateTime::createFromFormat('Y-m-d', $delivery['auto']['orderDates']['arrivalToOspReceiver'])->getTimestamp();
}
$delivery = ceil(($delivery_converted - ($delivery_send_date ?? 0)) / 60 / 60 / 24) + 1;
$delivery_auto = ceil(($delivery_auto_converted - ($delivery_auto_send_date ?? 0)) / 60 / 60 / 24) + 1;
}
// Инициализация комментария
$comment = $order_edge_supply[0]['comm'] ?? 'Комментарий к заказу';
// Генерация HTML
echo <<<HTML
<div class="row py-2 cart_list_target">
<div class="col">
<div class="row">
<div class="pl-3 my-auto mr-1">
<input id="cart_list_checkbox_{$supply['catn']}" type="checkbox" onchange="return cart_list_checkbox(this);"/>
<input id="cart_list_checkbox_{$supply['catn']}_auto" type="checkbox" onchange="return cart_list_checkbox(this);"/>
</div>
<div class="col-2 my-auto">
{$supply['catn']}
@ -105,25 +104,102 @@ use DateTime;
{$supply['dscr']}
</div>
<div class="col-1 my-auto ml-auto">
<input id="cart_list_amnt_{$supply['catn']}" class="form-control text-center" type="text" value="{$connection['amount']}" onchange="return cart_list_amount_update('{$supply['catn']}', this)" aria-invalid="false">
<input id="cart_list_amnt_{$supply['catn']}_auto" class="form-control text-center" type="text" value="{$amount['auto']}" onchange="return cart_list_amount_update('{$supply['catn']}', 'auto', this)" aria-invalid="false">
</div>
<div class="col-2 my-auto text-right">
<p title="Ориентировочно">$delivery_icon <b>~</b>$delivery дн</p>
<p title="Ориентировочно"><i class="mr-1 fas fa-truck"></i> <b>~</b>$delivery_auto дн</p>
</div>
<div class="col-2 my-auto mr-3 text-right">
$price
$price_auto
</div>
</div>
<div class="dropdown-divider"></div>
<div class="row mb-1">
<div class="col-12">
<p id="cart_list_comment_{$supply['catn']}" class="mt-0 ml-0 text-break pointer-event" role="button" onclick="return cart_list_comment_edit('{$supply['catn']}', this);">$comment</p>
<p id="cart_list_comment_{$supply['catn']}_auto" class="mt-0 ml-0 text-break pointer-event" role="button" onclick="return cart_list_comment_edit('{$supply['catn']}', 'auto', this);">$comment</p>
</div>
</div>
</div>
</div>
HTML;
}
if ($amount['avia'] > 0) {
// Найдены поставки с доставкой по воздуху
// Инициализация цены
$price_avia = $price_raw['avia'] . ' ' . $currency;
// Инициализация доставки
if (!isset($delivery) || (isset($delivery, $delivery['auto'], $delivery['avia']['error']) || $delivery === '?')) {
// Не удалось рассчитать доставку
// Инициализация времени
$delivery_avia = '?';
} else {
// Удалось рассчитать доставку
// Инициализация даты отправки
try {
// Взять данные из "arrivalToOspSender" (Дата прибытия на терминал-отправитель)
$delivery_avia_send_date = DateTime::createFromFormat('Y-m-d', $delivery['avia']['orderDates']['arrivalToOspSender'])->getTimestamp();
} catch (Throwable $e) {
// Взять данные из "pickup" (Дата передачи груза на адресе отправителя)
$delivery_avia_send_date = DateTime::createFromFormat('Y-m-d', $delivery['avia']['orderDates']['pickup'])->getTimestamp();
}
// Инициализация времени доставки
try {
// Доставка по воздуху (подразумевается), данные из "giveoutFromOspReceiver" (Дата и время, с которого груз готов к выдаче на терминале)
$delivery_avia_converted = DateTime::createFromFormat('Y-m-d H:i:s', $delivery['avia']['orderDates']['giveoutFromOspReceiver'])->getTimestamp();
} catch (Throwable $e) {
// Автоматическая доставка (подразумевается), данные из "arrivalToOspReceiver" (Дата прибытия натерминал-получатель)
// Оставлено на всякий случай для дальнейших разбирательств
$delivery_avia_converted = DateTime::createFromFormat('Y-m-d', $delivery['avia']['orderDates']['arrivalToOspReceiver'])->getTimestamp();
}
$delivery_avia = ceil(($delivery_avia_converted - ($delivery_avia_send_date ?? 0)) / 60 / 60 / 24) + 1;
}
// Генерация HTML
echo <<<HTML
<div class="row py-2 cart_list_target">
<div class="col">
<div class="row">
<div class="pl-3 my-auto mr-1">
<input id="cart_list_checkbox_{$supply['catn']}_avia" type="checkbox" onchange="return cart_list_checkbox(this);"/>
</div>
<div class="col-2 my-auto">
{$supply['catn']}
</div>
<div class="col-4 my-auto">
{$supply['dscr']}
</div>
<div class="col-1 my-auto ml-auto">
<input id="cart_list_amnt_{$supply['catn']}_avia" class="form-control text-center" type="text" value="{$amount['avia']}" onchange="return cart_list_amount_update('{$supply['catn']}', 'avia', this)" aria-invalid="false">
</div>
<div class="col-2 my-auto text-right">
<p title="Ориентировочно"><i class="mr-1 fas fa-plane"></i> <b>~</b>$delivery_avia дн</p>
</div>
<div class="col-2 my-auto mr-3 text-right">
$price_avia
</div>
</div>
<div class="dropdown-divider"></div>
<div class="row mb-1">
<div class="col-12">
<p id="cart_list_comment_{$supply['catn']}_avia" class="mt-0 ml-0 text-break pointer-event" role="button" onclick="return cart_list_comment_edit('{$supply['catn']}', 'avia', this);">$comment</p>
</div>
</div>
</div>
</div>
HTML;
}
}
} else {
echo <<<HTML
<div class="row py-2">

View File

@ -9,20 +9,24 @@ use app\models\AccountEdgeOrder;
use app\models\Order;
use app\models\OrderEdgeSupply;
// Инициализация
if (
// Инициализация открытой панели
if (empty($panel)) {
if (
!yii::$app->user->isGuest
&& yii::$app->user->identity->type === 'administrator'
|| yii::$app->user->identity->type === 'moderator'
) {
) {
$panel ?? $panel = 'orders_panel_moderation';
} else {
} else {
$panel ?? $panel = 'orders_panel_orders';
}
}
?>
<link href="/css/pages/orders.css" rel="stylesheet">
<link href="/css/datepicker.css" rel="stylesheet">
<div id="page_orders" class="container mb-auto py-3">
<?php if ($account_type = (!yii::$app->user->isGuest
@ -153,12 +157,15 @@ if (
<a id="<?= $order['order']['_key'] ?>_button" class="row mt-auto mb-0 text-center text-white btn button_blue button_clean disabled" type="button" onclick="return order_accept('<?= $order['order']['_key'] ?>');">Подтвердить</a>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
<script defer>
document.addEventListener(
'DOMContentLoaded',
function() {
order_init('<?= $order['order']['_key'] ?>');
}, false);
},
false
);
</script>
</div>
<?php endforeach ?>
@ -187,18 +194,10 @@ if (
<a class="btn btn-sm button_white button_clean mb-0 mr-2 l" type="button" onclick="return orders_read('last','<?= time() - 86400 ?>', '<?= time() ?>');">День</a>
<a class="btn btn-sm button_white button_clean mb-0 mr-2" type="button" onclick="return orders_read('last', '<?= time() - 604800 ?>', '<?= time() ?>');">Неделя</a>
<a class="btn btn-sm button_white button_clean mb-0 mr-2" type="button" onclick="return orders_read('last', '<?= time() - 2592000 ?>', '<?= time() ?>');">Месяц</a>
<a class="btn btn-sm button_white button_clean mb-0 mr-2" type="button" onclick="return orders_read('last',' '<?= time() - 31536000 ?>', '<?= time() ?>');">Год</a>
<a class="btn btn-sm button_white button_clean mb-0 mr-2" type="button" onclick="return orders_read('last', '<?= time() - 31536000 ?>', '<?= time() ?>');">Год</a>
</small>
<div class="ml-2 mr-3 d-flex">
<div class="col-5 my-auto ml-auto px-1 py-0 form-control form-control-sm form_control_clean overflow-hidden">
<input id="orders_period_calendar_from" class="ml-auto" type="date" value="<?= $from ?? date('Y-m-d', time() - 604800) ?>" onchange="return orders_read('last', moment(this.value, 'YYYY-MM-DD').unix(), moment(document.getElementById('orders_period_calendar_to').value, 'YYYY-MM-DD').unix());" pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}" />
<i class="far fa-calendar-alt my-auto mr-auto"></i>
</div>
<p class="col-1 p-0 text-center">-</p>
<div class="col-5 mr-auto my-auto px-1 py-0 form-control form-control-sm form_control_clean overflow-hidden">
<input id="orders_period_calendar_to" class="ml-auto" type="date" value="<?= $to ?? date('Y-m-d', time()) ?>" onchange="return orders_read('last', moment(document.getElementById('orders_period_calendar_from').value, 'YYYY-MM-DD').unix(), moment(this.value, 'YYYY-MM-DD').unix());" pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}" />
<i class="far fa-calendar-alt my-auto mr-auto"></i>
</div>
<div class="ml-2 mr-3 px-0 w-auto form-control form-control-sm text-center">
<input id="orders_period_calendar" class="pl-0 form_clean_full text-center" type="text" />
</div>
</div>
<div class="col mb-4 list rounded">
@ -378,6 +377,54 @@ if (
</div>
<script src="/js/orders.js" defer></script>
<script src="/js/calendar/datepicker.js" defer></script>
<script>
// Инициализация индикатора готовности календаря
orders_calendar_ready = false;
if (document.readyState === "complete") {
// Документ загружен
// Инициализация календаря
$('#orders_period_calendar').datepicker({
firstDay: 1,
dateFormat: 'yyyy-mm-dd',
toggleSelected: false,
maxDate: new Date(),
range: true,
multipleDatesSeparator: ' - ',
onSelect: orders_calendar_select
});
$('#orders_period_calendar').data('datepicker').selectDate([new Date('<?= $from ?? date('Y-m-d', time() - 604800) ?>'), new Date('<?= $to ?? date('Y-m-d', time()) ?>')]);
// Активация календаря
orders_calendar_ready = true;
} else {
// Документ не загружен
// Обработчик события загрузки документа
document.addEventListener('DOMContentLoaded', function() {
// Обработчик события инициализации
// Инициализация календаря
$('#orders_period_calendar').datepicker({
firstDay: 1,
dateFormat: 'yyyy-mm-dd',
toggleSelected: false,
maxDate: new Date(),
range: true,
multipleDatesSeparator: ' - ',
onSelect: orders_calendar_select
});
$('#orders_period_calendar').data('datepicker').selectDate([new Date('<?= $from ?? date('Y-m-d', time() - 604800) ?>'), new Date('<?= $to ?? date('Y-m-d', time()) ?>')]);
// Активация календаря
orders_calendar_ready = true;
}, false);
};
</script>
<?php if (
!yii::$app->user->isGuest
&& (yii::$app->user->identity->type === 'administrator'

View File

@ -199,11 +199,10 @@
// Генерация
$supplies_html .= <<<HTML
<div class="row $supply_class_modifier m-0 text-right">
<div class="col-5 mr-4"></div>
<small class="col-1 ml-2 my-auto pl-2 pr-0">$index</small>
<small class="ml-auto col-1 ml-2 my-auto pl-2 pr-0">$index</small>
<small class="col-1 my-auto pl-2 pr-0 text-center">$amount</small>
<small class="col-auto mr-2 my-auto pl-2 pr-0 text-left" title="Ориентировочно">$delivery_icon $delivery дн</small>
<b class="col-2 ml-auto my-auto">$price</b>
<b class="col-auto my-auto my-auto text-center">$price</b>
<a class="col-1 ml-0 py-2 text-dark d-flex button_white rounded" title="Добавить $catn в корзину" role="button" onclick="return cart_write('{$supply['_id']}', '$delivery_type');">
<i class="fas fa-cart-arrow-down pr-1 m-auto"></i>
</a>
@ -225,12 +224,12 @@
<h6 class="m-0"><small><?= $catn ?></small></h6>
</a>
</div>
<div class="col-1 ml-2 p-0 d-flex flex-column row_fixed_height">
<!-- <div class="col-1 ml-2 p-0 d-flex flex-column row_fixed_height">
<a class="my-auto text-dark" href="/product/<?= $catn ?>">
<small><?= $catg ?></small>
</a>
</div>
<div class="col ml-2 p-0 d-flex flex-column">
</div> -->
<div class="col ml-3 p-0 d-flex flex-column">
<?= $supplies_html ?>
</div>
</div>

View File

@ -0,0 +1,622 @@
.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- {
color: #dedede; }
.datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover {
color: #c5c5c5; }
.-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- {
color: #dedede; }
.-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- {
color: #fff;
background: #a2ddf6; }
.-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- {
background: #8ad5f4; }
.-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- {
background-color: rgba(92, 196, 239, 0.1);
color: #cccccc; }
.-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- {
background-color: rgba(92, 196, 239, 0.2); }
.datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty {
background: none;
border: none; }
/* -------------------------------------------------
Datepicker cells
------------------------------------------------- */
.datepicker--cells {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap; }
.datepicker--cell {
border-radius: 4px;
box-sizing: border-box;
cursor: pointer;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
position: relative;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
height: 32px;
z-index: 1; }
.datepicker--cell.-focus- {
background: #f0f0f0; }
.datepicker--cell.-current- {
color: #4EB5E6; }
.datepicker--cell.-current-.-focus- {
color: #4a4a4a; }
.datepicker--cell.-current-.-in-range- {
color: #4EB5E6; }
.datepicker--cell.-in-range- {
background: rgba(92, 196, 239, 0.1);
color: #4a4a4a;
border-radius: 0; }
.datepicker--cell.-in-range-.-focus- {
background-color: rgba(92, 196, 239, 0.2); }
.datepicker--cell.-disabled- {
cursor: default;
color: #aeaeae; }
.datepicker--cell.-disabled-.-focus- {
color: #aeaeae; }
.datepicker--cell.-disabled-.-in-range- {
color: #a1a1a1; }
.datepicker--cell.-disabled-.-current-.-focus- {
color: #aeaeae; }
.datepicker--cell.-range-from- {
border: 1px solid rgba(92, 196, 239, 0.5);
background-color: rgba(92, 196, 239, 0.1);
border-radius: 4px 0 0 4px; }
.datepicker--cell.-range-to- {
border: 1px solid rgba(92, 196, 239, 0.5);
background-color: rgba(92, 196, 239, 0.1);
border-radius: 0 4px 4px 0; }
.datepicker--cell.-range-from-.-range-to- {
border-radius: 4px; }
.datepicker--cell.-selected- {
color: #fff;
border: none;
background: #5cc4ef; }
.datepicker--cell.-selected-.-current- {
color: #fff;
background: #5cc4ef; }
.datepicker--cell.-selected-.-focus- {
background: #45bced; }
.datepicker--cell:empty {
cursor: default; }
.datepicker--days-names {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin: 8px 0 3px; }
.datepicker--day-name {
color: #FF9A19;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
text-align: center;
text-transform: uppercase;
font-size: .8em; }
.datepicker--cell-day {
width: 14.28571%; }
.datepicker--cells-months {
height: 170px; }
.datepicker--cell-month {
width: 33.33%;
height: 25%; }
.datepicker--years {
height: 170px; }
.datepicker--cells-years {
height: 170px; }
.datepicker--cell-year {
width: 25%;
height: 33.33%; }
.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- {
color: #dedede; }
.datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover {
color: #c5c5c5; }
.-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- {
color: #dedede; }
.-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- {
color: #fff;
background: #a2ddf6; }
.-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- {
background: #8ad5f4; }
.-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- {
background-color: rgba(92, 196, 239, 0.1);
color: #cccccc; }
.-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- {
background-color: rgba(92, 196, 239, 0.2); }
.datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty {
background: none;
border: none; }
/* -------------------------------------------------
Datepicker
------------------------------------------------- */
.datepickers-container {
position: absolute;
left: 0;
top: 0; }
@media print {
.datepickers-container {
display: none; } }
.datepicker {
background: #fff;
border: 1px solid #dbdbdb;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
border-radius: 4px;
box-sizing: content-box;
font-family: Tahoma, sans-serif;
font-size: 14px;
color: #4a4a4a;
width: 250px;
position: absolute;
left: -100000px;
opacity: 0;
transition: opacity 0.3s ease, left 0s 0.3s, -webkit-transform 0.3s ease;
transition: opacity 0.3s ease, transform 0.3s ease, left 0s 0.3s;
transition: opacity 0.3s ease, transform 0.3s ease, left 0s 0.3s, -webkit-transform 0.3s ease;
z-index: 100; }
.datepicker.-from-top- {
-webkit-transform: translateY(-8px);
transform: translateY(-8px); }
.datepicker.-from-right- {
-webkit-transform: translateX(8px);
transform: translateX(8px); }
.datepicker.-from-bottom- {
-webkit-transform: translateY(8px);
transform: translateY(8px); }
.datepicker.-from-left- {
-webkit-transform: translateX(-8px);
transform: translateX(-8px); }
.datepicker.active {
opacity: 1;
-webkit-transform: translate(0);
transform: translate(0);
transition: opacity 0.3s ease, left 0s 0s, -webkit-transform 0.3s ease;
transition: opacity 0.3s ease, transform 0.3s ease, left 0s 0s;
transition: opacity 0.3s ease, transform 0.3s ease, left 0s 0s, -webkit-transform 0.3s ease; }
.datepicker-inline .datepicker {
border-color: #d7d7d7;
box-shadow: none;
position: static;
left: auto;
right: auto;
opacity: 1;
-webkit-transform: none;
transform: none; }
.datepicker-inline .datepicker--pointer {
display: none; }
.datepicker--content {
box-sizing: content-box;
padding: 4px; }
.-only-timepicker- .datepicker--content {
display: none; }
.datepicker--pointer {
position: absolute;
background: #fff;
border-top: 1px solid #dbdbdb;
border-right: 1px solid #dbdbdb;
width: 10px;
height: 10px;
z-index: -1; }
.-top-left- .datepicker--pointer, .-top-center- .datepicker--pointer, .-top-right- .datepicker--pointer {
top: calc(100% - 4px);
-webkit-transform: rotate(135deg);
transform: rotate(135deg); }
.-right-top- .datepicker--pointer, .-right-center- .datepicker--pointer, .-right-bottom- .datepicker--pointer {
right: calc(100% - 4px);
-webkit-transform: rotate(225deg);
transform: rotate(225deg); }
.-bottom-left- .datepicker--pointer, .-bottom-center- .datepicker--pointer, .-bottom-right- .datepicker--pointer {
bottom: calc(100% - 4px);
-webkit-transform: rotate(315deg);
transform: rotate(315deg); }
.-left-top- .datepicker--pointer, .-left-center- .datepicker--pointer, .-left-bottom- .datepicker--pointer {
left: calc(100% - 4px);
-webkit-transform: rotate(45deg);
transform: rotate(45deg); }
.-top-left- .datepicker--pointer, .-bottom-left- .datepicker--pointer {
left: 10px; }
.-top-right- .datepicker--pointer, .-bottom-right- .datepicker--pointer {
right: 10px; }
.-top-center- .datepicker--pointer, .-bottom-center- .datepicker--pointer {
left: calc(50% - 10px / 2); }
.-left-top- .datepicker--pointer, .-right-top- .datepicker--pointer {
top: 10px; }
.-left-bottom- .datepicker--pointer, .-right-bottom- .datepicker--pointer {
bottom: 10px; }
.-left-center- .datepicker--pointer, .-right-center- .datepicker--pointer {
top: calc(50% - 10px / 2); }
.datepicker--body {
display: none; }
.datepicker--body.active {
display: block; }
.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- {
color: #dedede; }
.datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover {
color: #c5c5c5; }
.-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- {
color: #dedede; }
.-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- {
color: #fff;
background: #a2ddf6; }
.-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- {
background: #8ad5f4; }
.-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- {
background-color: rgba(92, 196, 239, 0.1);
color: #cccccc; }
.-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- {
background-color: rgba(92, 196, 239, 0.2); }
.datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty {
background: none;
border: none; }
/* -------------------------------------------------
Navigation
------------------------------------------------- */
.datepicker--nav {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
border-bottom: 1px solid #efefef;
min-height: 32px;
padding: 4px; }
.-only-timepicker- .datepicker--nav {
display: none; }
.datepicker--nav-title,
.datepicker--nav-action {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
cursor: pointer;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center; }
.datepicker--nav-action {
width: 32px;
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
.datepicker--nav-action:hover {
background: #f0f0f0; }
.datepicker--nav-action.-disabled- {
visibility: hidden; }
.datepicker--nav-action svg {
width: 32px;
height: 32px; }
.datepicker--nav-action path {
fill: none;
stroke: #9c9c9c;
stroke-width: 2px; }
.datepicker--nav-title {
border-radius: 4px;
padding: 0 8px; }
.datepicker--nav-title i {
font-style: normal;
color: #9c9c9c;
margin-left: 5px; }
.datepicker--nav-title:hover {
background: #f0f0f0; }
.datepicker--nav-title.-disabled- {
cursor: default;
background: none; }
.datepicker--buttons {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
padding: 4px;
border-top: 1px solid #efefef; }
.datepicker--button {
color: #4EB5E6;
cursor: pointer;
border-radius: 4px;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
height: 32px; }
.datepicker--button:hover {
color: #4a4a4a;
background: #f0f0f0; }
.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- {
color: #dedede; }
.datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover {
color: #c5c5c5; }
.-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- {
color: #dedede; }
.-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- {
color: #fff;
background: #a2ddf6; }
.-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- {
background: #8ad5f4; }
.-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- {
background-color: rgba(92, 196, 239, 0.1);
color: #cccccc; }
.-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- {
background-color: rgba(92, 196, 239, 0.2); }
.datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty {
background: none;
border: none; }
/* -------------------------------------------------
Timepicker
------------------------------------------------- */
.datepicker--time {
border-top: 1px solid #efefef;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
padding: 4px;
position: relative; }
.datepicker--time.-am-pm- .datepicker--time-sliders {
-webkit-flex: 0 1 138px;
-ms-flex: 0 1 138px;
flex: 0 1 138px;
max-width: 138px; }
.-only-timepicker- .datepicker--time {
border-top: none; }
.datepicker--time-sliders {
-webkit-flex: 0 1 153px;
-ms-flex: 0 1 153px;
flex: 0 1 153px;
margin-right: 10px;
max-width: 153px; }
.datepicker--time-label {
display: none;
font-size: 12px; }
.datepicker--time-current {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
font-size: 14px;
text-align: center;
margin: 0 0 0 10px; }
.datepicker--time-current-colon {
margin: 0 2px 3px;
line-height: 1; }
.datepicker--time-current-hours,
.datepicker--time-current-minutes {
line-height: 1;
font-size: 19px;
font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
position: relative;
z-index: 1; }
.datepicker--time-current-hours:after,
.datepicker--time-current-minutes:after {
content: '';
background: #f0f0f0;
border-radius: 4px;
position: absolute;
left: -2px;
top: -3px;
right: -2px;
bottom: -2px;
z-index: -1;
opacity: 0; }
.datepicker--time-current-hours.-focus-:after,
.datepicker--time-current-minutes.-focus-:after {
opacity: 1; }
.datepicker--time-current-ampm {
text-transform: uppercase;
-webkit-align-self: flex-end;
-ms-flex-item-align: end;
align-self: flex-end;
color: #9c9c9c;
margin-left: 6px;
font-size: 11px;
margin-bottom: 1px; }
.datepicker--time-row {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
font-size: 11px;
height: 17px;
background: linear-gradient(to right, #dedede, #dedede) left 50%/100% 1px no-repeat; }
.datepicker--time-row:first-child {
margin-bottom: 4px; }
.datepicker--time-row input[type='range'] {
background: none;
cursor: pointer;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
height: 100%;
padding: 0;
margin: 0;
-webkit-appearance: none; }
.datepicker--time-row input[type='range']::-webkit-slider-thumb {
-webkit-appearance: none; }
.datepicker--time-row input[type='range']::-ms-tooltip {
display: none; }
.datepicker--time-row input[type='range']:hover::-webkit-slider-thumb {
border-color: #b8b8b8; }
.datepicker--time-row input[type='range']:hover::-moz-range-thumb {
border-color: #b8b8b8; }
.datepicker--time-row input[type='range']:hover::-ms-thumb {
border-color: #b8b8b8; }
.datepicker--time-row input[type='range']:focus {
outline: none; }
.datepicker--time-row input[type='range']:focus::-webkit-slider-thumb {
background: #5cc4ef;
border-color: #5cc4ef; }
.datepicker--time-row input[type='range']:focus::-moz-range-thumb {
background: #5cc4ef;
border-color: #5cc4ef; }
.datepicker--time-row input[type='range']:focus::-ms-thumb {
background: #5cc4ef;
border-color: #5cc4ef; }
.datepicker--time-row input[type='range']::-webkit-slider-thumb {
box-sizing: border-box;
height: 12px;
width: 12px;
border-radius: 3px;
border: 1px solid #dedede;
background: #fff;
cursor: pointer;
transition: background .2s; }
.datepicker--time-row input[type='range']::-moz-range-thumb {
box-sizing: border-box;
height: 12px;
width: 12px;
border-radius: 3px;
border: 1px solid #dedede;
background: #fff;
cursor: pointer;
transition: background .2s; }
.datepicker--time-row input[type='range']::-ms-thumb {
box-sizing: border-box;
height: 12px;
width: 12px;
border-radius: 3px;
border: 1px solid #dedede;
background: #fff;
cursor: pointer;
transition: background .2s; }
.datepicker--time-row input[type='range']::-webkit-slider-thumb {
margin-top: -6px; }
.datepicker--time-row input[type='range']::-webkit-slider-runnable-track {
border: none;
height: 1px;
cursor: pointer;
color: transparent;
background: transparent; }
.datepicker--time-row input[type='range']::-moz-range-track {
border: none;
height: 1px;
cursor: pointer;
color: transparent;
background: transparent; }
.datepicker--time-row input[type='range']::-ms-track {
border: none;
height: 1px;
cursor: pointer;
color: transparent;
background: transparent; }
.datepicker--time-row input[type='range']::-ms-fill-lower {
background: transparent; }
.datepicker--time-row input[type='range']::-ms-fill-upper {
background: transparent; }
.datepicker--time-row span {
padding: 0 12px; }
.datepicker--time-icon {
color: #9c9c9c;
border: 1px solid;
border-radius: 50%;
font-size: 16px;
position: relative;
margin: 0 5px -1px 0;
width: 1em;
height: 1em; }
.datepicker--time-icon:after, .datepicker--time-icon:before {
content: '';
background: currentColor;
position: absolute; }
.datepicker--time-icon:after {
height: .4em;
width: 1px;
left: calc(50% - 1px);
top: calc(50% + 1px);
-webkit-transform: translateY(-100%);
transform: translateY(-100%); }
.datepicker--time-icon:before {
width: .4em;
height: 1px;
top: calc(50% + 1px);
left: calc(50% - 1px); }
.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- {
color: #dedede; }
.datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover {
color: #c5c5c5; }
.-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- {
color: #dedede; }
.-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- {
color: #fff;
background: #a2ddf6; }
.-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- {
background: #8ad5f4; }
.-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- {
background-color: rgba(92, 196, 239, 0.1);
color: #cccccc; }
.-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- {
background-color: rgba(92, 196, 239, 0.2); }
.datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty {
background: none;
border: none; }

View File

@ -1,7 +1,7 @@
@font-face {
font-family: 'Gilroy';
font-weight: 600;
src : local('/fonts/Gilroy/gilroy-semibold.ttf'), url('/fonts/Gilroy/gilroy-semibold.ttf');
src: local('/fonts/Gilroy/gilroy-semibold.ttf'), url('/fonts/Gilroy/gilroy-semibold.ttf');
}
* {
@ -34,14 +34,14 @@ button {
}
body {
min-height : 100vh;
display : flex;
min-height: 100vh;
display: flex;
flex-direction: column;
overflow-x : hidden;
overflow-x: hidden;
}
main {
flex-grow : 1;
flex-grow: 1;
background-color: #f0eefb;
}
@ -68,16 +68,24 @@ main {
.button_clean_full,
.button_clean_full:hover,
.button_clean_full:focus,
.button_clean_full:active {
outline : none !important;
.button_clean_full:active,
.form_clean_full,
.form_clean_full:hover,
.form_clean_full:focus,
.form_clean_full:active {
outline: none !important;
box-shadow: none !important;
}
.button_clean_full,
.button_clean_full:hover,
.button_clean_full:focus,
.button_clean_full:active {
border : none !important;
.button_clean_full:active,
.form_clean_full,
.form_clean_full:hover,
.form_clean_full:focus,
.form_clean_full:active {
border: none !important;
background: none !important;
}
@ -89,56 +97,56 @@ main {
}
.button_blue_simple {
color : #eee;
color: #eee;
background-color: #123EAB;
transition : 0s;
transition: 0s;
}
.button_blue_simple:hover {
color : #fff;
color: #fff;
transition: 0s;
}
.button_blue_simple:active {
color : #ddd;
color: #ddd;
background-color: #391e97;
transition : 0s;
transition: 0s;
}
.button_blue {
color : #eee;
color: #eee;
background-color: #123EAB;
transition : 0s;
transition: 0s;
}
.button_blue:hover {
color : #fff;
color: #fff;
background-color: #244db5;
transition : 0s;
transition: 0s;
}
.button_blue:active {
color : #ddd;
color: #ddd;
background-color: #391e97;
transition : 0s;
transition: 0s;
}
.button_red {
color : #eee;
color: #eee;
background-color: #c40000;
transition : 0s;
transition: 0s;
}
.button_red:hover {
color : #fff;
color: #fff;
background-color: #d81313;
transition : 0s;
transition: 0s;
}
.button_red:active {
color : #ddd;
color: #ddd;
background-color: #971e1e;
transition : 0s;
transition: 0s;
}
.button_white {
@ -147,17 +155,17 @@ main {
.button_white:hover {
background-color: #eaebee;
transition : 0s;
transition: 0s;
}
.button_white:active {
background-color: #cfd3dd;
transition : 0s;
transition: 0s;
}
.button_white_hover {
background-color: #eaebee !important;
transition : 0s;
transition: 0s;
}
.button_grey {
@ -166,12 +174,12 @@ main {
.button_grey:hover {
background-color: #a6aebf;
transition : 0s;
transition: 0s;
}
.button_grey:active {
background-color: #8c94a8;
transition : 0s;
transition: 0s;
}
.alert_white {
@ -190,7 +198,7 @@ main {
font-family: 'Gilroy';
}
.form_account .has-error > .checkbox {
.form_account .has-error>.checkbox {
color: #d90000
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
;(function ($) { $.fn.datepicker.language['cs'] = {
days: ['Neděle', 'Pondělí', 'Úterý', 'Středa', 'Čtvrtek', 'Pátek', 'Sobota'],
daysShort: ['Ne', 'Po', 'Út', 'St', 'Čt', 'Pá', 'So'],
daysMin: ['Ne', 'Po', 'Út', 'St', 'Čt', 'Pá', 'So'],
months: ['Leden', 'Únor', 'Březen', 'Duben', 'Květen', 'Červen', 'Červenec', 'Srpen', 'Září', 'Říjen', 'Listopad', 'Prosinec'],
monthsShort: ['Led', 'Úno', 'Bře', 'Dub', 'Kvě', 'Čvn', 'Čvc', 'Srp', 'Zář', 'Říj', 'Lis', 'Pro'],
today: 'Dnes',
clear: 'Vymazat',
dateFormat: 'dd.mm.yyyy',
timeFormat: 'hh:ii',
firstDay: 1
}; })(jQuery);

View File

@ -0,0 +1,12 @@
;(function ($) { $.fn.datepicker.language['da'] = {
days: ['Søndag', 'Mandag', 'Tirsdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lørdag'],
daysShort: ['Søn', 'Man', 'Tir', 'Ons', 'Tor', 'Fre', 'Lør'],
daysMin: ['Sø', 'Ma', 'Ti', 'On', 'To', 'Fr', 'Lø'],
months: ['Januar','Februar','Marts','April','Maj','Juni', 'Juli','August','September','Oktober','November','December'],
monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'],
today: 'I dag',
clear: 'Nulstil',
dateFormat: 'dd/mm/yyyy',
timeFormat: 'hh:ii',
firstDay: 1
}; })(jQuery);

View File

@ -0,0 +1,13 @@
;(function ($) { $.fn.datepicker.language['de'] = {
days: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
daysShort: ['Son', 'Mon', 'Die', 'Mit', 'Don', 'Fre', 'Sam'],
daysMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
months: ['Januar','Februar','März','April','Mai','Juni', 'Juli','August','September','Oktober','November','Dezember'],
monthsShort: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
today: 'Heute',
clear: 'Aufräumen',
dateFormat: 'dd.mm.yyyy',
timeFormat: 'hh:ii',
firstDay: 1
};
})(jQuery);

View File

@ -0,0 +1,12 @@
;(function ($) { $.fn.datepicker.language['en'] = {
days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
daysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
daysMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
months: ['January','February','March','April','May','June', 'July','August','September','October','November','December'],
monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
today: 'Today',
clear: 'Clear',
dateFormat: 'mm/dd/yyyy',
timeFormat: 'hh:ii aa',
firstDay: 0
}; })(jQuery);

View File

@ -0,0 +1,12 @@
;(function ($) { $.fn.datepicker.language['es'] = {
days: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'],
daysShort: ['Dom', 'Lun', 'Mar', 'Mie', 'Jue', 'Vie', 'Sab'],
daysMin: ['Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sa'],
months: ['Enero','Febrero','Marzo','Abril','Mayo','Junio', 'Julio','Augosto','Septiembre','Octubre','Noviembre','Diciembre'],
monthsShort: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
today: 'Hoy',
clear: 'Limpiar',
dateFormat: 'dd/mm/yyyy',
timeFormat: 'hh:ii aa',
firstDay: 1
}; })(jQuery);

View File

@ -0,0 +1,13 @@
;(function ($) { $.fn.datepicker.language['fi'] = {
days: ['Sunnuntai', 'Maanantai', 'Tiistai', 'Keskiviikko', 'Torstai', 'Perjantai', 'Lauantai'],
daysShort: ['Su', 'Ma', 'Ti', 'Ke', 'To', 'Pe', 'La'],
daysMin: ['Su', 'Ma', 'Ti', 'Ke', 'To', 'Pe', 'La'],
months: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu', 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
monthsShort: ['Tammi', 'Helmi', 'Maalis', 'Huhti', 'Touko', 'Kesä', 'Heinä', 'Elo', 'Syys', 'Loka', 'Marras', 'Joulu'],
today: 'Tänään',
clear: 'Tyhjennä',
dateFormat: 'dd.mm.yyyy',
timeFormat: 'hh:ii',
firstDay: 1
};
})(jQuery);

View File

@ -0,0 +1,12 @@
;(function ($) { $.fn.datepicker.language['fr'] = {
days: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'],
daysShort: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'],
daysMin: ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa'],
months: ['Janvier','Février','Mars','Avril','Mai','Juin', 'Juillet','Août','Septembre','Octobre','Novembre','Decembre'],
monthsShort: ['Jan', 'Fév', 'Mars', 'Avr', 'Mai', 'Juin', 'Juil', 'Août', 'Sep', 'Oct', 'Nov', 'Dec'],
today: "Aujourd'hui",
clear: 'Effacer',
dateFormat: 'dd/mm/yyyy',
timeFormat: 'hh:ii',
firstDay: 1
}; })(jQuery);

View File

@ -0,0 +1,12 @@
;(function ($) { ;(function ($) { $.fn.datepicker.language['hu'] = {
days: ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
daysShort: ['Va', 'Hé', 'Ke', 'Sze', 'Cs', 'Pé', 'Szo'],
daysMin: ['V', 'H', 'K', 'Sz', 'Cs', 'P', 'Sz'],
months: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június', 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
monthsShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún', 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
today: 'Ma',
clear: 'Törlés',
dateFormat: 'yyyy-mm-dd',
timeFormat: 'hh:ii aa',
firstDay: 1
}; })(jQuery); })(jQuery);

View File

@ -0,0 +1,12 @@
;(function ($) { $.fn.datepicker.language['nl'] = {
days: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
daysShort: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
daysMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
months: ['Januari', 'Februari', 'Maart', 'April', 'Mei', 'Juni', 'Juli', 'Augustus', 'September', 'Oktober', 'November', 'December'],
monthsShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'],
today: 'Vandaag',
clear: 'Legen',
dateFormat: 'dd-MM-yy',
timeFormat: 'hh:ii',
firstDay: 0
}; })(jQuery);

View File

@ -0,0 +1,13 @@
;(function ($) { $.fn.datepicker.language['pl'] = {
days: ['Niedziela', 'Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota'],
daysShort: ['Nie', 'Pon', 'Wto', 'Śro', 'Czw', 'Pią', 'Sob'],
daysMin: ['Nd', 'Pn', 'Wt', 'Śr', 'Czw', 'Pt', 'So'],
months: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec', 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
monthsShort: ['Sty', 'Lut', 'Mar', 'Kwi', 'Maj', 'Cze', 'Lip', 'Sie', 'Wrz', 'Paź', 'Lis', 'Gru'],
today: 'Dzisiaj',
clear: 'Wyczyść',
dateFormat: 'yyyy-mm-dd',
timeFormat: 'hh:ii:aa',
firstDay: 1
};
})(jQuery);

View File

@ -0,0 +1,12 @@
;(function ($) { $.fn.datepicker.language['pt-BR'] = {
days: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado'],
daysShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
daysMin: ['Do', 'Se', 'Te', 'Qu', 'Qu', 'Se', 'Sa'],
months: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
monthsShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
today: 'Hoje',
clear: 'Limpar',
dateFormat: 'dd/mm/yyyy',
timeFormat: 'hh:ii',
firstDay: 0
}; })(jQuery);

View File

@ -0,0 +1,12 @@
;(function ($) { $.fn.datepicker.language['pt'] = {
days: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado'],
daysShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
daysMin: ['Do', 'Se', 'Te', 'Qa', 'Qi', 'Sx', 'Sa'],
months: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
monthsShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
today: 'Hoje',
clear: 'Limpar',
dateFormat: 'dd/mm/yyyy',
timeFormat: 'hh:ii',
firstDay: 1
}; })(jQuery);

View File

@ -0,0 +1,13 @@
;(function ($) { $.fn.datepicker.language['ro'] = {
days: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'],
daysShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
daysMin: ['D', 'L', 'Ma', 'Mi', 'J', 'V', 'S'],
months: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie','Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],
monthsShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun', 'Iul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'],
today: 'Azi',
clear: 'Şterge',
dateFormat: 'dd.mm.yyyy',
timeFormat: 'hh:ii',
firstDay: 1
};
})(jQuery);

View File

@ -0,0 +1,12 @@
;(function ($) { $.fn.datepicker.language['sk'] = {
days: ['Nedeľa', 'Pondelok', 'Utorok', 'Streda', 'Štvrtok', 'Piatok', 'Sobota'],
daysShort: ['Ned', 'Pon', 'Uto', 'Str', 'Štv', 'Pia', 'Sob'],
daysMin: ['Ne', 'Po', 'Ut', 'St', 'Št', 'Pi', 'So'],
months: ['Január','Február','Marec','Apríl','Máj','Jún', 'Júl','August','September','Október','November','December'],
monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'Máj', 'Jún', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'],
today: 'Dnes',
clear: 'Vymazať',
dateFormat: 'dd.mm.yyyy',
timeFormat: 'hh:ii',
firstDay: 1
}; })(jQuery);

View File

@ -0,0 +1,12 @@
;(function ($) { $.fn.datepicker.language['zh'] = {
days: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
daysShort: ['日', '一', '二', '三', '四', '五', '六'],
daysMin: ['日', '一', '二', '三', '四', '五', '六'],
months: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
monthsShort: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
today: '今天',
clear: '清除',
dateFormat: 'yyyy-mm-dd',
timeFormat: 'hh:ii',
firstDay: 1
}; })(jQuery);

View File

@ -143,13 +143,14 @@ function cart_list_delete(target, amount = 0) {
/**
* Изменить количество товара в корзине
*/
function cart_list_amount_update(target, input) {
if (target !== undefined && input !== undefined) {
function cart_list_amount_update(target, type, input) {
if (target !== undefined && target !== null && type !== undefined && type !== null && input !== undefined && input !== null) {
// Обработка входных параметров
// Инициализация
let targets = {};
targets[target] = input.value;
targets[target] = {};
targets[target][type] = input.value;
$.ajax({
url: '/order/amount-update',
@ -162,10 +163,10 @@ function cart_list_amount_update(target, input) {
success: cart_response_success,
error: cart_response_error
});
};
// Пересчитывание стоимости
cart_cost_calculate();
};
return false;
};
@ -191,10 +192,10 @@ function cart_cost_calculate() {
/**
* Изменить количество товара в корзине
*/
function cart_list_comment_edit(catn, element) {
if (catn !== null && catn !== undefined && element !== null && element !== undefined) {
function cart_list_comment_edit(catn, type, element) {
if (catn !== undefined && catn !== null && type !== undefined && type !== null && element !== undefined && element !== null) {
// Инициализация textarea
element.innerHTML = '<textarea id="' + element.id + '-textarea" class="mb-1 form-control" cols="50" rows="5" maxlength="300" onchange="return cart_list_comment_save(\'' + catn + '\', this.parentElement)">' + element.innerText + '</textarea>';
element.innerHTML = '<textarea id="' + element.id + '-textarea" class="mb-1 form-control" cols="50" rows="5" maxlength="300" onchange="return cart_list_comment_save(\'' + catn + '\', \'' + type + '\', this.parentElement)">' + element.innerText + '</textarea>';
element.removeAttribute('onclick');
@ -242,7 +243,7 @@ function cart_list_comment_edit(catn, element) {
function () {
let textarea = document.getElementById(element.id + '-textarea');
textarea.setAttribute('onchange', 'return cart_list_comment_save(\'' + catn + '\', this.parentElement)');
textarea.setAttribute('onchange', 'return cart_list_comment_save(\'' + catn + '\', \'' + type + '\', this.parentElement)');
});
return false;
@ -251,8 +252,8 @@ function cart_list_comment_edit(catn, element) {
return true;
};
function cart_list_comment_save(catn, element) {
if (catn !== null && catn !== undefined && element !== null && element !== undefined) {
function cart_list_comment_save(catn, type, element) {
if (catn !== null && catn !== undefined && type !== null && type !== undefined && element !== null && element !== undefined) {
// Инициализация
let text = element.children[0].value;
@ -275,6 +276,7 @@ function cart_list_comment_save(catn, element) {
dataType: 'json',
data: {
'_csrf': yii.getCsrfToken(),
'type': type,
'text': text
},
success: function (data, status, xhr) {

View File

@ -1,4 +1,4 @@
// Инициализация геолокации
// Инициализация геолокации (запись геолокации по айпи, если не существует)
function geolocation_init() {
$.ajax({
url: '/profile/geolocation/init',
@ -12,6 +12,44 @@ function geolocation_init() {
geolocation_init();
// Запись геолокации (точный режим из браузера по запросу)
function geolocation_gps() {
// Запрос геолокации у пользователя
navigator.geolocation.getCurrentPosition(
geolocation_gps_success,
geolocation_gps_error,
{
enableHighAccuracy: true
}
);
};
// Получено подтверждение выдачи геолокации от пользователя
function geolocation_gps_success({ coords }) {
// Инициализация
const { latitude, longitude } = coords;
// Запрос
$.ajax({
url: '/profile/geolocation/write',
type: 'post',
dataType: 'json',
data: {
'latitude': latitude,
'longitude': longitude,
'_csrf': yii.getCsrfToken()
},
success: geolocation_success,
error: geolocation_error
});
};
// Не получено подтверждение выдачи геолокации от пользователя
function geolocation_gps_error({ message }) {
};
function geolocation_responce(data, status, xhr) {
// Обработка ответов
@ -21,6 +59,17 @@ function geolocation_responce(data, status, xhr) {
function geolocation_success(data, status, xhr) {
// Обработка ответов от удавшихся запросов
if (data !== undefined) {
// Получены данные с сервера
// Запрос более точной геолокации
if (data.requestGps !== undefined && data.requestGps === true) {
geolocation_gps();
}
};
geolocation_responce(data, status, xhr);
};

View File

@ -6,6 +6,7 @@ function main_response(data, status, xhr) {
// Основной блок
if (data.main !== undefined) {
// Инициализация
main = document.getElementsByTagName('main')[0];
@ -18,18 +19,21 @@ function main_response(data, status, xhr) {
// Заголовок
if (data.title !== undefined) {
// Запись
document.title = data.title;
};
// Перенаправление
if (data.redirect !== undefined) {
// Перенаправление
history.pushState({}, document.title, data.redirect);
};
// CSRF-токен
if (data._csrf !== undefined) {
// Обновление документа
$('meta[name=csrf-token]').prop("content", data._csrf);
};
@ -41,7 +45,6 @@ var page_loaded_for_history = window.history.state;
window.addEventListener('popstate', function() {
if (page_loaded_for_history) {
console.log('сработало');
window.location.reload();
};
}, false);

View File

@ -1,5 +1,5 @@
// Запросить заказы
function orders_read(type = 'all', from, to) {
function orders_read(type = 'all', from, to, panel = 'orders_panel_orders') {
// type = 'last' (оставить без изменений и взять данные из cookie
// Пустые from и to тоже возьмутся из текущих значений в cookie
@ -10,14 +10,16 @@ function orders_read(type = 'all', from, to) {
data = {
'_csrf': yii.getCsrfToken(),
'from': from,
'to': to
'to': to,
'panel': panel
};
} else {
// Данные периода не переданы
// Инициализация буфера с данными запроса
data = {
'_csrf': yii.getCsrfToken()
'_csrf': yii.getCsrfToken(),
'panel': panel
};
};
@ -31,11 +33,21 @@ function orders_read(type = 'all', from, to) {
error: orders_response_error
});
// Пересчитывание стоимости
cart_cost_calculate();
// // Пересчитывание стоимости
// cart_cost_calculate();
return false;
}
};
function orders_calendar_select(formattedDate, date, inst) {
if (orders_calendar_ready === true && date[0] !== undefined && date[1] !== undefined) {
// Обе даты получены
// Поиск заказов
orders_read('last', date[0] / 1000, date[1] / 1000);
}
};
function orders_response(data, status, xhr) {
// Обработка ответов

View File

@ -136,12 +136,6 @@ function page_profile_monitoring(change = 1, panel) {
function page_profile_response(data, status, xhr) {
// Обработка ответов
main_response(data, status, xhr);
};
function page_profile_response_success(data, status, xhr) {
// Обработка ответов от удавшихся запросов
if (data !== undefined) {
// Получены данные с сервера
@ -152,6 +146,12 @@ function page_profile_response_success(data, status, xhr) {
};
};
main_response(data, status, xhr);
};
function page_profile_response_success(data, status, xhr) {
// Обработка ответов от удавшихся запросов
page_profile_response(data, status, xhr);
};