Backup
This commit is contained in:
parent
6382621ee5
commit
918e4f9455
9295
dev_db/backup.sql
Normal file
9295
dev_db/backup.sql
Normal file
File diff suppressed because one or more lines are too long
BIN
dev_db/db.dump
Normal file
BIN
dev_db/db.dump
Normal file
Binary file not shown.
@ -1,205 +1,205 @@
|
||||
{
|
||||
"name": "psc/printshop_creator_suite",
|
||||
"description": "Shop System",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PSC\\": "src/PSC",
|
||||
"Plugin\\": "var/plugins"
|
||||
}
|
||||
"name": "psc/printshop_creator_suite",
|
||||
"description": "Shop System",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PSC\\": "src/PSC",
|
||||
"Plugin\\": "var/plugins"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"php": "8.4.*",
|
||||
"ext-ctype": "*",
|
||||
"ext-iconv": "*",
|
||||
"ext-mongodb": "^2",
|
||||
"azuyalabs/yasumi": "^2.5",
|
||||
"behat/transliterator": "^1.2@dev",
|
||||
"bitandblack/colors": "^2.13",
|
||||
"brick/money": "^0.7.0",
|
||||
"chillerlan/php-qrcode": "v5.0.x-dev",
|
||||
"cocur/slugify": "v3.1",
|
||||
"composer/package-versions-deprecated": "^1.8",
|
||||
"ddeboer/imap": "1.21.*",
|
||||
"doctrine/annotations": "^2",
|
||||
"doctrine/cache": "^2",
|
||||
"doctrine/doctrine-bundle": "^2",
|
||||
"doctrine/mongodb-odm-bundle": "^5",
|
||||
"doctrine/orm": "^2.7",
|
||||
"gabrielbull/ups-api": "dev-master",
|
||||
"gesdinet/jwt-refresh-token-bundle": "^1.5",
|
||||
"gregwar/captcha-bundle": "^2.2",
|
||||
"guzzlehttp/guzzle": "^7",
|
||||
"horstoeko/zugferd": "^1.0",
|
||||
"incenteev/composer-parameter-handler": "^2.0",
|
||||
"jms/serializer-bundle": "5.*",
|
||||
"knplabs/knp-gaufrette-bundle": "0.7.*",
|
||||
"knplabs/knp-menu-bundle": "^3",
|
||||
"knplabs/knp-paginator-bundle": "5.9.*",
|
||||
"lexik/form-filter-bundle": "^7",
|
||||
"lexik/jwt-authentication-bundle": "^3",
|
||||
"liip/imagine-bundle": "2.9.*",
|
||||
"mistic100/randomcolor": "^1.1",
|
||||
"mobiledetect/mobiledetectlib": "^2.8",
|
||||
"mpdf/mpdf": "dev-qrcode",
|
||||
"mpdf/qrcode": "^1.2",
|
||||
"nelmio/api-doc-bundle": "^5",
|
||||
"nelmio/cors-bundle": "^2.2",
|
||||
"nicolab/php-ftp-client": "^1.4",
|
||||
"oneup/uploader-bundle": "^3",
|
||||
"oyejorge/less.php": "~1.5",
|
||||
"paypal/paypal-checkout-sdk": "dev-master",
|
||||
"paypal/rest-api-sdk-php": "dev-master",
|
||||
"phpoffice/phpspreadsheet": "^1.28",
|
||||
"phpseclib/phpseclib": "~3.0",
|
||||
"picqer/sendcloud-php-client": "v2.8.1",
|
||||
"portphp/csv": ">=1.1.0",
|
||||
"portphp/excel": ">=1.1.0",
|
||||
"portphp/steps": ">=1.3",
|
||||
"psc/calc": "dev-master",
|
||||
"ramsey/uuid": "4.5.1",
|
||||
"sauladam/shipment-tracker": "dev-master",
|
||||
"scssphp/scssphp": "v1.11.1",
|
||||
"sensio/framework-extra-bundle": "^6.1",
|
||||
"sofort/sofortlib-php": "3.3.2",
|
||||
"spatie/array-to-xml": "^3.4",
|
||||
"symfony/asset": "*",
|
||||
"symfony/asset-mapper": "6.4.*",
|
||||
"symfony/console": "*",
|
||||
"symfony/dotenv": "*",
|
||||
"symfony/expression-language": "*",
|
||||
"symfony/flex": "^1.3.1",
|
||||
"symfony/form": "*",
|
||||
"symfony/framework-bundle": "*",
|
||||
"symfony/http-client": "*",
|
||||
"symfony/intl": "*",
|
||||
"symfony/lock": "6.4.*",
|
||||
"symfony/mailer": "*",
|
||||
"symfony/mime": "*",
|
||||
"symfony/monolog-bundle": "^3.8",
|
||||
"symfony/notifier": "*",
|
||||
"symfony/process": "*",
|
||||
"symfony/property-access": "6.4.4",
|
||||
"symfony/property-info": "*",
|
||||
"symfony/proxy-manager-bridge": "*",
|
||||
"symfony/runtime": "*",
|
||||
"symfony/security-bundle": "*",
|
||||
"symfony/serializer": "*",
|
||||
"symfony/string": "*",
|
||||
"symfony/translation": "*",
|
||||
"symfony/twig-bundle": "*",
|
||||
"symfony/ux-autocomplete": "^2.14",
|
||||
"symfony/ux-chartjs": "^2.19",
|
||||
"symfony/ux-live-component": "^2.12",
|
||||
"symfony/ux-twig-component": "^2.12",
|
||||
"symfony/ux-vue": "^2.23",
|
||||
"symfony/validator": "*",
|
||||
"symfony/web-link": "*",
|
||||
"symfony/yaml": "*",
|
||||
"symfonycasts/dynamic-forms": "^0.1.1",
|
||||
"symfonycasts/sass-bundle": "^0.8.2",
|
||||
"symfonycasts/tailwind-bundle": "^0.7.0",
|
||||
"tp/paydirekt-php": "^4.0",
|
||||
"twig/extra-bundle": "^3",
|
||||
"twig/intl-extra": "^3",
|
||||
"twig/string-extra": "^3",
|
||||
"twig/twig": "^3",
|
||||
"zfb/zfb-vm": "dev-master"
|
||||
},
|
||||
"require-dev": {
|
||||
"dbrekelmans/bdi": "^1.4",
|
||||
"hautelook/alice-bundle": "^2.11",
|
||||
"maglnet/composer-require-checker": "4.*",
|
||||
"mockery/mockery": "^1.5",
|
||||
"php-parallel-lint/php-parallel-lint": "dev-develop",
|
||||
"phpstan/phpstan": "^1",
|
||||
"phpunit/phpunit": "^10",
|
||||
"rector/rector": "0.19.2",
|
||||
"squizlabs/php_codesniffer": "*",
|
||||
"symfony/browser-kit": "*",
|
||||
"symfony/css-selector": "*",
|
||||
"symfony/debug-bundle": "*",
|
||||
"symfony/panther": "^2.1",
|
||||
"symfony/phpunit-bridge": "^7",
|
||||
"symfony/stopwatch": "*",
|
||||
"symfony/web-profiler-bundle": "*",
|
||||
"symplify/config-transformer": "^11.1",
|
||||
"tomasvotruba/symfony-config-generator": "^0.1.5",
|
||||
"vincentlanglet/twig-cs-fixer": "^3.5"
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": {
|
||||
"*": "dist"
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Tests\\": "tests/"
|
||||
}
|
||||
"sort-packages": true,
|
||||
"optimize-autoloader": true,
|
||||
"platform": {
|
||||
"php": "8.4"
|
||||
},
|
||||
"require": {
|
||||
"php": "8.4.*",
|
||||
"ext-ctype": "*",
|
||||
"ext-iconv": "*",
|
||||
"ext-mongodb": "^2",
|
||||
"azuyalabs/yasumi": "^2.5",
|
||||
"behat/transliterator": "^1.2@dev",
|
||||
"bitandblack/colors": "^2.13",
|
||||
"brick/money": "^0.7.0",
|
||||
"chillerlan/php-qrcode": "v5.0.x-dev",
|
||||
"cocur/slugify": "v3.1",
|
||||
"composer/package-versions-deprecated": "^1.8",
|
||||
"ddeboer/imap": "1.21.*",
|
||||
"doctrine/annotations": "^2",
|
||||
"doctrine/cache": "^2",
|
||||
"doctrine/doctrine-bundle": "^2",
|
||||
"doctrine/mongodb-odm-bundle": "^5",
|
||||
"doctrine/orm": "^2.7",
|
||||
"mistic100/randomcolor": "^1.1",
|
||||
"spatie/array-to-xml": "^3.4",
|
||||
"gabrielbull/ups-api": "dev-master",
|
||||
"gregwar/captcha-bundle": "^2.2",
|
||||
"guzzlehttp/guzzle": "^7",
|
||||
"horstoeko/zugferd": "^1.0",
|
||||
"incenteev/composer-parameter-handler": "^2.0",
|
||||
"jms/serializer-bundle": "5.*",
|
||||
"knplabs/knp-gaufrette-bundle": "0.7.*",
|
||||
"knplabs/knp-menu-bundle": "^3",
|
||||
"knplabs/knp-paginator-bundle": "5.9.*",
|
||||
"lexik/form-filter-bundle": "^7",
|
||||
"lexik/jwt-authentication-bundle": "^3",
|
||||
"liip/imagine-bundle": "2.9.*",
|
||||
"mobiledetect/mobiledetectlib": "^2.8",
|
||||
"mpdf/mpdf": "dev-qrcode",
|
||||
"mpdf/qrcode": "^1.2",
|
||||
"nelmio/api-doc-bundle": "v4.11.1",
|
||||
"nelmio/cors-bundle": "^2.2",
|
||||
"nicolab/php-ftp-client": "^1.4",
|
||||
"oneup/uploader-bundle": "^3",
|
||||
"oyejorge/less.php": "~1.5",
|
||||
"paypal/paypal-checkout-sdk": "dev-master",
|
||||
"paypal/rest-api-sdk-php": "dev-master",
|
||||
"phpoffice/phpspreadsheet": "^1.28",
|
||||
"phpseclib/phpseclib": "~3.0",
|
||||
"picqer/sendcloud-php-client": "v2.8.1",
|
||||
"portphp/csv": ">=1.1.0",
|
||||
"portphp/excel": ">=1.1.0",
|
||||
"portphp/steps": ">=1.3",
|
||||
"psc/calc": "dev-master",
|
||||
"ramsey/uuid": "4.5.1",
|
||||
"sauladam/shipment-tracker": "dev-master",
|
||||
"scssphp/scssphp": "v1.11.1",
|
||||
"sensio/framework-extra-bundle": "^6.1",
|
||||
"sofort/sofortlib-php": "3.3.2",
|
||||
"symfony/asset": "*",
|
||||
"symfony/asset-mapper": "6.4.*",
|
||||
"symfony/console": "*",
|
||||
"symfony/dotenv": "*",
|
||||
"symfony/expression-language": "*",
|
||||
"symfony/flex": "^1.3.1",
|
||||
"symfony/form": "*",
|
||||
"symfony/framework-bundle": "*",
|
||||
"symfony/http-client": "*",
|
||||
"symfony/intl": "*",
|
||||
"symfony/lock": "6.4.*",
|
||||
"symfony/mailer": "*",
|
||||
"symfony/mime": "*",
|
||||
"symfony/monolog-bundle": "^3.8",
|
||||
"symfony/notifier": "*",
|
||||
"symfony/process": "*",
|
||||
"symfony/property-access": "6.4.4",
|
||||
"symfony/property-info": "*",
|
||||
"symfony/proxy-manager-bridge": "*",
|
||||
"symfony/runtime": "*",
|
||||
"symfony/security-bundle": "*",
|
||||
"symfony/serializer": "*",
|
||||
"symfony/string": "*",
|
||||
"symfony/translation": "*",
|
||||
"symfony/twig-bundle": "*",
|
||||
"symfony/ux-autocomplete": "^2.14",
|
||||
"symfony/ux-chartjs": "^2.19",
|
||||
"symfony/ux-live-component": "^2.12",
|
||||
"symfony/ux-twig-component": "^2.12",
|
||||
"symfony/ux-vue": "^2.23",
|
||||
"symfony/validator": "*",
|
||||
"symfony/web-link": "*",
|
||||
"symfony/yaml": "*",
|
||||
"symfonycasts/dynamic-forms": "^0.1.1",
|
||||
"symfonycasts/sass-bundle": "^0.8.2",
|
||||
"symfonycasts/tailwind-bundle": "^0.7.0",
|
||||
"tp/paydirekt-php": "^4.0",
|
||||
"twig/extra-bundle": "^3",
|
||||
"twig/intl-extra": "^3",
|
||||
"twig/string-extra": "^3",
|
||||
"twig/twig": "^3",
|
||||
"zfb/zfb-vm": "dev-master"
|
||||
"allow-plugins": {
|
||||
"symfony/flex": true,
|
||||
"symfony/runtime": true
|
||||
}
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/boonkerz/mpdf.git"
|
||||
},
|
||||
"require-dev": {
|
||||
"dbrekelmans/bdi": "^1.4",
|
||||
"hautelook/alice-bundle": "^2.11",
|
||||
"maglnet/composer-require-checker": "4.*",
|
||||
"mockery/mockery": "^1.5",
|
||||
"php-parallel-lint/php-parallel-lint": "dev-develop",
|
||||
"phpstan/phpstan": "^1",
|
||||
"phpunit/phpunit": "^10",
|
||||
"rector/rector": "0.19.2",
|
||||
"squizlabs/php_codesniffer": "*",
|
||||
"symfony/browser-kit": "*",
|
||||
"symfony/css-selector": "*",
|
||||
"symfony/debug-bundle": "*",
|
||||
"symfony/panther": "^2.1",
|
||||
"symfony/phpunit-bridge": "^7",
|
||||
"symfony/stopwatch": "*",
|
||||
"symfony/web-profiler-bundle": "*",
|
||||
"symplify/config-transformer": "^11.1",
|
||||
"tomasvotruba/symfony-config-generator": "^0.1.5",
|
||||
"vincentlanglet/twig-cs-fixer": "^3.5"
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/boonkerz/php-qrcode.git"
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": {
|
||||
"*": "dist"
|
||||
},
|
||||
"sort-packages": true,
|
||||
"optimize-autoloader": true,
|
||||
"platform": {
|
||||
"php": "8.4"
|
||||
},
|
||||
"allow-plugins": {
|
||||
"symfony/flex": true,
|
||||
"symfony/runtime": true
|
||||
}
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/boonkerz/mpdf.git"
|
||||
{
|
||||
"type": "package",
|
||||
"package": {
|
||||
"name": "psc/calc",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"url": "https://gitlab.com/printshopcreator/calc.git",
|
||||
"type": "git",
|
||||
"reference": "master"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/boonkerz/php-qrcode.git"
|
||||
},
|
||||
{
|
||||
"type": "package",
|
||||
"package": {
|
||||
"name": "psc/calc",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"url": "https://gitlab.com/printshopcreator/calc.git",
|
||||
"type": "git",
|
||||
"reference": "master"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PSC\\Library\\Calc\\": "src/"
|
||||
}
|
||||
}
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PSC\\Library\\Calc\\": "src/"
|
||||
}
|
||||
}
|
||||
],
|
||||
"replace": {
|
||||
"paragonie/random_compat": "2.*",
|
||||
"symfony/polyfill-ctype": "*",
|
||||
"symfony/polyfill-iconv": "*",
|
||||
"symfony/polyfill-php71": "*",
|
||||
"symfony/polyfill-php70": "*",
|
||||
"symfony/polyfill-php56": "*"
|
||||
},
|
||||
"scripts": {
|
||||
"auto-scripts": {
|
||||
"cache:clear --no-warmup": "symfony-cmd",
|
||||
"cache:clear": "symfony-cmd",
|
||||
"assets:install %PUBLIC_DIR%": "symfony-cmd",
|
||||
"importmap:install": "symfony-cmd"
|
||||
},
|
||||
"post-install-cmd": [
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"@auto-scripts"
|
||||
]
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/symfony": "*"
|
||||
},
|
||||
"extra": {
|
||||
"symfony": {
|
||||
"allow-contrib": false,
|
||||
"require": "6.4.*"
|
||||
},
|
||||
"public-dir": "web/"
|
||||
}
|
||||
}
|
||||
],
|
||||
"replace": {
|
||||
"paragonie/random_compat": "2.*",
|
||||
"symfony/polyfill-ctype": "*",
|
||||
"symfony/polyfill-iconv": "*",
|
||||
"symfony/polyfill-php71": "*",
|
||||
"symfony/polyfill-php70": "*",
|
||||
"symfony/polyfill-php56": "*"
|
||||
},
|
||||
"scripts": {
|
||||
"auto-scripts": {
|
||||
"cache:clear --no-warmup": "symfony-cmd",
|
||||
"cache:clear": "symfony-cmd",
|
||||
"assets:install %PUBLIC_DIR%": "symfony-cmd",
|
||||
"importmap:install": "symfony-cmd"
|
||||
},
|
||||
"post-install-cmd": [],
|
||||
"post-update-cmd": [
|
||||
"@auto-scripts"
|
||||
]
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/symfony": "*"
|
||||
},
|
||||
"extra": {
|
||||
"symfony": {
|
||||
"allow-contrib": false,
|
||||
"require": "6.4.*"
|
||||
},
|
||||
"public-dir": "web/"
|
||||
}
|
||||
}
|
||||
|
||||
445
src/new/composer.lock
generated
445
src/new/composer.lock
generated
@ -4,34 +4,34 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "165c392e6106046b8c285f0211498131",
|
||||
"content-hash": "9b481d5b6c4b610b15183e3afe963bd1",
|
||||
"packages": [
|
||||
{
|
||||
"name": "azuyalabs/yasumi",
|
||||
"version": "2.7.0",
|
||||
"version": "2.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/azuyalabs/yasumi.git",
|
||||
"reference": "37d1215d4f4012d3185bb9990c76ca17a4ff1c30"
|
||||
"reference": "cc07874da062070fdc201a4297a7724f7d6aafb2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/azuyalabs/yasumi/zipball/37d1215d4f4012d3185bb9990c76ca17a4ff1c30",
|
||||
"reference": "37d1215d4f4012d3185bb9990c76ca17a4ff1c30",
|
||||
"url": "https://api.github.com/repos/azuyalabs/yasumi/zipball/cc07874da062070fdc201a4297a7724f7d6aafb2",
|
||||
"reference": "cc07874da062070fdc201a4297a7724f7d6aafb2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"php": ">=8.0"
|
||||
"php": ">=8.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"azuyalabs/php-cs-fixer-config": "^0.3",
|
||||
"ext-intl": "*",
|
||||
"friendsofphp/php-cs-fixer": "^2.19 || ^3.40",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"phan/phan": "^5.4",
|
||||
"phpstan/phpstan": "^1.10",
|
||||
"phpstan/phpstan": "^2.1",
|
||||
"phpstan/phpstan-deprecation-rules": "^2.0",
|
||||
"phpunit/phpunit": "^8.5 || ^9.6",
|
||||
"vimeo/psalm": "^5.16"
|
||||
"vimeo/psalm": "^6.12"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-calendar": "For calculating the date of Easter"
|
||||
@ -50,10 +50,11 @@
|
||||
{
|
||||
"name": "Sacha Telgenhof",
|
||||
"email": "me@sachatelgenhof.com",
|
||||
"homepage": "https://www.sachatelgenhof.com",
|
||||
"role": "Maintainer"
|
||||
}
|
||||
],
|
||||
"description": "The easy PHP Library for calculating holidays.",
|
||||
"description": "The easy PHP Library for calculating holidays",
|
||||
"homepage": "https://www.yasumi.dev",
|
||||
"keywords": [
|
||||
"Bank",
|
||||
@ -77,7 +78,7 @@
|
||||
"type": "other"
|
||||
}
|
||||
],
|
||||
"time": "2024-01-07T14:12:44+00:00"
|
||||
"time": "2025-07-13T15:40:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "behat/transliterator",
|
||||
@ -2709,6 +2710,86 @@
|
||||
},
|
||||
"time": "2022-07-12T08:47:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "gesdinet/jwt-refresh-token-bundle",
|
||||
"version": "v1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/markitosgv/JWTRefreshTokenBundle.git",
|
||||
"reference": "8706b0d8dcb26610358ba3328ec412315b55c3cd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/markitosgv/JWTRefreshTokenBundle/zipball/8706b0d8dcb26610358ba3328ec412315b55c3cd",
|
||||
"reference": "8706b0d8dcb26610358ba3328ec412315b55c3cd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/persistence": "^1.3.3|^2.0|^3.0|^4.0",
|
||||
"lexik/jwt-authentication-bundle": "^2.0|^3.0",
|
||||
"php": ">=7.4",
|
||||
"symfony/config": "^5.4|^6.0|^7.0",
|
||||
"symfony/console": "^5.4|^6.0|^7.0",
|
||||
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
|
||||
"symfony/deprecation-contracts": "^2.1|^3.0",
|
||||
"symfony/event-dispatcher": "^5.4|^6.0|^7.0",
|
||||
"symfony/http-foundation": "^5.4|^6.0|^7.0",
|
||||
"symfony/http-kernel": "^5.4|^6.0|^7.0",
|
||||
"symfony/polyfill-php80": "^1.15",
|
||||
"symfony/property-access": "^5.4|^6.0|^7.0",
|
||||
"symfony/security-bundle": "^5.4|^6.0|^7.0",
|
||||
"symfony/security-core": "^5.4|^6.0|^7.0",
|
||||
"symfony/security-http": "^5.4|^6.0|^7.0"
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/mongodb-odm": "<2.2",
|
||||
"doctrine/orm": "<2.7"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/annotations": "^1.13|^2.0",
|
||||
"doctrine/cache": "^1.11|^2.0",
|
||||
"doctrine/mongodb-odm": "^2.2",
|
||||
"doctrine/orm": "^2.7|^3.0",
|
||||
"matthiasnoback/symfony-config-test": "^4.2|^5.0",
|
||||
"matthiasnoback/symfony-dependency-injection-test": "^4.2|^5.0",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"symfony/cache": "^5.4|^6.0|^7.0",
|
||||
"symfony/security-guard": "^5.4"
|
||||
},
|
||||
"type": "symfony-bundle",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Gesdinet\\JWTRefreshTokenBundle\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Marcos Gómez Vilches",
|
||||
"email": "marcos@gesdinet.com"
|
||||
}
|
||||
],
|
||||
"description": "Implements a refresh token system over Json Web Tokens in Symfony",
|
||||
"keywords": [
|
||||
"jwt refresh token bundle symfony json web"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/markitosgv/JWTRefreshTokenBundle/issues",
|
||||
"source": "https://github.com/markitosgv/JWTRefreshTokenBundle/tree/v1.5.0"
|
||||
},
|
||||
"time": "2025-06-24T13:08:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "goetas-webservices/xsd2php-runtime",
|
||||
"version": "v0.2.17",
|
||||
@ -4758,22 +4839,22 @@
|
||||
},
|
||||
{
|
||||
"name": "maennchen/zipstream-php",
|
||||
"version": "3.1.2",
|
||||
"version": "3.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/maennchen/ZipStream-PHP.git",
|
||||
"reference": "aeadcf5c412332eb426c0f9b4485f6accba2a99f"
|
||||
"reference": "9712d8fa4cdf9240380b01eb4be55ad8dcf71416"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/aeadcf5c412332eb426c0f9b4485f6accba2a99f",
|
||||
"reference": "aeadcf5c412332eb426c0f9b4485f6accba2a99f",
|
||||
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/9712d8fa4cdf9240380b01eb4be55ad8dcf71416",
|
||||
"reference": "9712d8fa4cdf9240380b01eb4be55ad8dcf71416",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*",
|
||||
"ext-zlib": "*",
|
||||
"php-64bit": "^8.2"
|
||||
"php-64bit": "^8.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"brianium/paratest": "^7.7",
|
||||
@ -4782,7 +4863,7 @@
|
||||
"guzzlehttp/guzzle": "^7.5",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"php-coveralls/php-coveralls": "^2.5",
|
||||
"phpunit/phpunit": "^11.0",
|
||||
"phpunit/phpunit": "^12.0",
|
||||
"vimeo/psalm": "^6.0"
|
||||
},
|
||||
"suggest": {
|
||||
@ -4824,7 +4905,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/maennchen/ZipStream-PHP/issues",
|
||||
"source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.2"
|
||||
"source": "https://github.com/maennchen/ZipStream-PHP/tree/3.2.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -4832,7 +4913,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-01-27T12:07:53+00:00"
|
||||
"time": "2025-07-17T11:15:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "markbaker/complex",
|
||||
@ -5613,61 +5694,71 @@
|
||||
},
|
||||
{
|
||||
"name": "nelmio/api-doc-bundle",
|
||||
"version": "v4.11.1",
|
||||
"version": "v5.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nelmio/NelmioApiDocBundle.git",
|
||||
"reference": "d40c4eb0c090675f3685f75712af331f02924462"
|
||||
"reference": "49098f9e3f5e7a466b95b1d108d45857ba533c96"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nelmio/NelmioApiDocBundle/zipball/d40c4eb0c090675f3685f75712af331f02924462",
|
||||
"reference": "d40c4eb0c090675f3685f75712af331f02924462",
|
||||
"url": "https://api.github.com/repos/nelmio/NelmioApiDocBundle/zipball/49098f9e3f5e7a466b95b1d108d45857ba533c96",
|
||||
"reference": "49098f9e3f5e7a466b95b1d108d45857ba533c96",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/annotations": "^1.11|^2.0",
|
||||
"ext-json": "*",
|
||||
"php": ">=7.2",
|
||||
"phpdocumentor/reflection-docblock": "^3.1|^4.0|^5.0",
|
||||
"psr/cache": "^1.0|^2.0|^3.0",
|
||||
"psr/container": "^1.0|^2.0",
|
||||
"psr/log": "^1.0|^2.0|^3.0",
|
||||
"symfony/config": "^4.4|^5.0|^6.0",
|
||||
"symfony/console": "^4.4|^5.0|^6.0",
|
||||
"symfony/dependency-injection": "^4.4|^5.0|^6.0",
|
||||
"symfony/framework-bundle": "^4.4|^5.0|^6.0",
|
||||
"symfony/http-foundation": "^4.4|^5.0|^6.0",
|
||||
"symfony/http-kernel": "^4.4|^5.0|^6.0",
|
||||
"symfony/options-resolver": "^4.4|^5.0|^6.0",
|
||||
"symfony/property-info": "^4.4|^5.0|^6.0",
|
||||
"symfony/routing": "^4.4|^5.0|^6.0",
|
||||
"zircote/swagger-php": "^4.2.15"
|
||||
"php": ">=8.1",
|
||||
"phpdocumentor/reflection-docblock": "^5.0",
|
||||
"phpdocumentor/type-resolver": "^1.8.2",
|
||||
"psr/cache": "^1.0 || ^2.0 || ^3.0",
|
||||
"psr/container": "^1.0 || ^2.0",
|
||||
"psr/log": "^1.0 || ^2.0 || ^3.0",
|
||||
"symfony/config": "^6.4 || ^7.1",
|
||||
"symfony/console": "^6.4 || ^7.1",
|
||||
"symfony/dependency-injection": "^6.4 || ^7.1",
|
||||
"symfony/deprecation-contracts": "^2.1 || ^3",
|
||||
"symfony/framework-bundle": "^6.4 || ^7.1",
|
||||
"symfony/http-foundation": "^6.4 || ^7.1",
|
||||
"symfony/http-kernel": "^6.4 || ^7.1",
|
||||
"symfony/options-resolver": "^6.4 || ^7.1",
|
||||
"symfony/property-info": "^6.4 || ^7.1",
|
||||
"symfony/routing": "^6.4 || ^7.1",
|
||||
"zircote/swagger-php": "^4.11.1 || ^5.0"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/framework-bundle": "4.2.7"
|
||||
"zircote/swagger-php": "4.8.7"
|
||||
},
|
||||
"require-dev": {
|
||||
"api-platform/core": "^2.7.0|^3@dev",
|
||||
"composer/package-versions-deprecated": "1.11.99.1",
|
||||
"friendsofsymfony/rest-bundle": "^2.8|^3.0",
|
||||
"jms/serializer": "^1.14|^3.0",
|
||||
"jms/serializer-bundle": "^2.3|^3.0|^4.0|^5.0@beta",
|
||||
"sensio/framework-extra-bundle": "^4.4|^5.2|^6.0",
|
||||
"symfony/asset": "^4.4|^5.2|^6.0",
|
||||
"symfony/browser-kit": "^4.4|^5.2|^6.0",
|
||||
"symfony/cache": "^4.4|^5.2|^6.0",
|
||||
"symfony/deprecation-contracts": "^2.1|^3",
|
||||
"symfony/dom-crawler": "^4.4|^5.2|^6.0",
|
||||
"symfony/form": "^4.4|^5.2|^6.0",
|
||||
"symfony/phpunit-bridge": "^5.2",
|
||||
"symfony/property-access": "^4.4|^5.2|^6.0",
|
||||
"symfony/serializer": "^4.4|^5.2|^6.0",
|
||||
"symfony/stopwatch": "^4.4|^5.2|^6.0",
|
||||
"symfony/templating": "^4.4|^5.2|^6.0",
|
||||
"symfony/twig-bundle": "^4.4|^5.2|^6.0",
|
||||
"symfony/validator": "^4.4|^5.2|^6.0",
|
||||
"willdurand/hateoas-bundle": "^1.0|^2.0"
|
||||
"api-platform/core": "^3.2",
|
||||
"friendsofphp/php-cs-fixer": "^3.52",
|
||||
"friendsofsymfony/rest-bundle": "^3.2.0",
|
||||
"jms/serializer": "^3.32",
|
||||
"jms/serializer-bundle": "^5.5",
|
||||
"phpstan/phpstan": "^1.10",
|
||||
"phpstan/phpstan-phpunit": "^1.3",
|
||||
"phpstan/phpstan-strict-rules": "^1.5",
|
||||
"phpstan/phpstan-symfony": "^1.3",
|
||||
"phpunit/phpunit": "^10.5",
|
||||
"symfony/asset": "^6.4 || ^7.1",
|
||||
"symfony/browser-kit": "^6.4 || ^7.1",
|
||||
"symfony/cache": "^6.4 || ^7.1",
|
||||
"symfony/dom-crawler": "^6.4 || ^7.1",
|
||||
"symfony/expression-language": "^6.4 || ^7.1",
|
||||
"symfony/finder": "^6.4 || ^7.1",
|
||||
"symfony/form": "^6.4 || ^7.1",
|
||||
"symfony/phpunit-bridge": "^6.4 || ^7.1",
|
||||
"symfony/property-access": "^6.4 || ^7.1",
|
||||
"symfony/security-csrf": "^6.4 || ^7.1",
|
||||
"symfony/security-http": "^6.4 || ^7.1",
|
||||
"symfony/serializer": "^6.4 || ^7.1",
|
||||
"symfony/stopwatch": "^6.4 || ^7.1",
|
||||
"symfony/templating": "^6.4 || ^7.1",
|
||||
"symfony/translation": "^6.4 || ^7.1",
|
||||
"symfony/twig-bundle": "^6.4 || ^7.1",
|
||||
"symfony/uid": "^6.4 || ^7.1",
|
||||
"symfony/validator": "^6.4 || ^7.1",
|
||||
"willdurand/hateoas-bundle": "^2.7",
|
||||
"willdurand/negotiation": "^3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"api-platform/core": "For using an API oriented framework.",
|
||||
@ -5677,6 +5768,7 @@
|
||||
"symfony/cache": "For using a PSR-6 compatible cache implementation with the API doc generator.",
|
||||
"symfony/form": "For describing your form type models.",
|
||||
"symfony/monolog-bundle": "For using a PSR-3 compatible logger implementation with the API PHP describer.",
|
||||
"symfony/security-csrf": "For using csrf protection tokens in forms.",
|
||||
"symfony/serializer": "For describing your models.",
|
||||
"symfony/twig-bundle": "For using the Swagger UI.",
|
||||
"symfony/validator": "For describing the validation constraints in your models.",
|
||||
@ -5685,32 +5777,26 @@
|
||||
"type": "symfony-bundle",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.x-dev"
|
||||
"dev-4.x": "4.x-dev",
|
||||
"dev-5.x": "5.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Nelmio\\ApiDocBundle\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"Tests/"
|
||||
]
|
||||
"Nelmio\\ApiDocBundle\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nelmio",
|
||||
"homepage": "http://nelm.io"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://github.com/nelmio/NelmioApiDocBundle/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Generates documentation for your REST API from annotations",
|
||||
"description": "Generates documentation for your REST API from attributes",
|
||||
"keywords": [
|
||||
"api",
|
||||
"doc",
|
||||
@ -5719,9 +5805,15 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nelmio/NelmioApiDocBundle/issues",
|
||||
"source": "https://github.com/nelmio/NelmioApiDocBundle/tree/v4.11.1"
|
||||
"source": "https://github.com/nelmio/NelmioApiDocBundle/tree/v5.4.0"
|
||||
},
|
||||
"time": "2023-02-01T07:18:39+00:00"
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/DjordyKoert",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-06-26T15:03:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nelmio/cors-bundle",
|
||||
@ -5942,6 +6034,64 @@
|
||||
},
|
||||
"time": "2022-03-22T15:42:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
"version": "v5.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||
"reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/221b0d0fdf1369c71047ad1d18bb5880017bbc56",
|
||||
"reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-ctype": "*",
|
||||
"ext-json": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"php": ">=7.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"ircmaxell/php-yacc": "^0.0.7",
|
||||
"phpunit/phpunit": "^9.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/php-parse"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PhpParser\\": "lib/PhpParser"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nikita Popov"
|
||||
}
|
||||
],
|
||||
"description": "A PHP parser written in PHP",
|
||||
"keywords": [
|
||||
"parser",
|
||||
"php"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
||||
"source": "https://github.com/nikic/PHP-Parser/tree/v5.6.0"
|
||||
},
|
||||
"time": "2025-07-27T20:03:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "oneup/uploader-bundle",
|
||||
"version": "3.2.1",
|
||||
@ -6560,16 +6710,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpoffice/phpspreadsheet",
|
||||
"version": "1.29.11",
|
||||
"version": "1.29.12",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
|
||||
"reference": "05b6c4378ddf3e81b460ea645c42b46432c0db25"
|
||||
"reference": "7c06eed662cce7ecab88f6f9f7626b443f5285df"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/05b6c4378ddf3e81b460ea645c42b46432c0db25",
|
||||
"reference": "05b6c4378ddf3e81b460ea645c42b46432c0db25",
|
||||
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/7c06eed662cce7ecab88f6f9f7626b443f5285df",
|
||||
"reference": "7c06eed662cce7ecab88f6f9f7626b443f5285df",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -6660,9 +6810,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
|
||||
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.11"
|
||||
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.12"
|
||||
},
|
||||
"time": "2025-06-23T01:22:06+00:00"
|
||||
"time": "2025-07-23T04:40:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpseclib/phpseclib",
|
||||
@ -6776,16 +6926,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpdoc-parser",
|
||||
"version": "2.1.0",
|
||||
"version": "2.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpdoc-parser.git",
|
||||
"reference": "9b30d6fd026b2c132b3985ce6b23bec09ab3aa68"
|
||||
"reference": "b9e61a61e39e02dd90944e9115241c7f7e76bfd8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/9b30d6fd026b2c132b3985ce6b23bec09ab3aa68",
|
||||
"reference": "9b30d6fd026b2c132b3985ce6b23bec09ab3aa68",
|
||||
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/b9e61a61e39e02dd90944e9115241c7f7e76bfd8",
|
||||
"reference": "b9e61a61e39e02dd90944e9115241c7f7e76bfd8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -6817,9 +6967,9 @@
|
||||
"description": "PHPDoc parser with support for nullable, intersection and generic types",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
|
||||
"source": "https://github.com/phpstan/phpdoc-parser/tree/2.1.0"
|
||||
"source": "https://github.com/phpstan/phpdoc-parser/tree/2.2.0"
|
||||
},
|
||||
"time": "2025-02-19T13:28:12+00:00"
|
||||
"time": "2025-07-13T07:04:09+00:00"
|
||||
},
|
||||
{
|
||||
"name": "picqer/sendcloud-php-client",
|
||||
@ -15016,36 +15166,41 @@
|
||||
},
|
||||
{
|
||||
"name": "zircote/swagger-php",
|
||||
"version": "4.11.1",
|
||||
"version": "5.1.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zircote/swagger-php.git",
|
||||
"reference": "7df10e8ec47db07c031db317a25bef962b4e5de1"
|
||||
"reference": "471f2e7c24c9508a2ee08df245cab64b62dbf721"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/zircote/swagger-php/zipball/7df10e8ec47db07c031db317a25bef962b4e5de1",
|
||||
"reference": "7df10e8ec47db07c031db317a25bef962b4e5de1",
|
||||
"url": "https://api.github.com/repos/zircote/swagger-php/zipball/471f2e7c24c9508a2ee08df245cab64b62dbf721",
|
||||
"reference": "471f2e7c24c9508a2ee08df245cab64b62dbf721",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"php": ">=7.2",
|
||||
"nikic/php-parser": "^4.19 || ^5.0",
|
||||
"php": ">=7.4",
|
||||
"psr/log": "^1.1 || ^2.0 || ^3.0",
|
||||
"symfony/deprecation-contracts": "^2 || ^3",
|
||||
"symfony/finder": ">=2.2",
|
||||
"symfony/yaml": ">=3.3"
|
||||
"symfony/finder": "^5.0 || ^6.0 || ^7.0",
|
||||
"symfony/yaml": "^5.0 || ^6.0 || ^7.0"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/process": ">=6, <6.4.14"
|
||||
},
|
||||
"require-dev": {
|
||||
"composer/package-versions-deprecated": "^1.11",
|
||||
"doctrine/annotations": "^1.7 || ^2.0",
|
||||
"friendsofphp/php-cs-fixer": "^2.17 || 3.62.0",
|
||||
"phpstan/phpstan": "^1.6",
|
||||
"phpunit/phpunit": ">=8",
|
||||
"vimeo/psalm": "^4.23"
|
||||
"doctrine/annotations": "^2.0",
|
||||
"friendsofphp/php-cs-fixer": "^3.62.0",
|
||||
"phpstan/phpstan": "^1.6 || ^2.0",
|
||||
"phpunit/phpunit": "^9.0",
|
||||
"rector/rector": "^1.0 || ^2.0",
|
||||
"vimeo/psalm": "^4.30 || ^5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"doctrine/annotations": "^1.7 || ^2.0"
|
||||
"doctrine/annotations": "^2.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/openapi"
|
||||
@ -15053,7 +15208,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.x-dev"
|
||||
"dev-master": "5.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -15081,8 +15236,8 @@
|
||||
"homepage": "https://radebatz.net"
|
||||
}
|
||||
],
|
||||
"description": "swagger-php - Generate interactive documentation for your RESTful API using phpdoc annotations",
|
||||
"homepage": "https://github.com/zircote/swagger-php/",
|
||||
"description": "Generate interactive documentation for your RESTful API using PHP attributes (preferred) or PHPDoc annotations",
|
||||
"homepage": "https://github.com/zircote/swagger-php",
|
||||
"keywords": [
|
||||
"api",
|
||||
"json",
|
||||
@ -15091,9 +15246,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/zircote/swagger-php/issues",
|
||||
"source": "https://github.com/zircote/swagger-php/tree/4.11.1"
|
||||
"source": "https://github.com/zircote/swagger-php/tree/5.1.4"
|
||||
},
|
||||
"time": "2024-10-15T19:20:02+00:00"
|
||||
"time": "2025-07-15T23:54:13+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
@ -15503,16 +15658,16 @@
|
||||
},
|
||||
{
|
||||
"name": "masterminds/html5",
|
||||
"version": "2.9.0",
|
||||
"version": "2.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Masterminds/html5-php.git",
|
||||
"reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6"
|
||||
"reference": "fcf91eb64359852f00d921887b219479b4f21251"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6",
|
||||
"reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6",
|
||||
"url": "https://api.github.com/repos/Masterminds/html5-php/zipball/fcf91eb64359852f00d921887b219479b4f21251",
|
||||
"reference": "fcf91eb64359852f00d921887b219479b4f21251",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -15564,9 +15719,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/Masterminds/html5-php/issues",
|
||||
"source": "https://github.com/Masterminds/html5-php/tree/2.9.0"
|
||||
"source": "https://github.com/Masterminds/html5-php/tree/2.10.0"
|
||||
},
|
||||
"time": "2024-03-31T07:05:07+00:00"
|
||||
"time": "2025-07-25T09:04:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mockery/mockery",
|
||||
@ -15747,64 +15902,6 @@
|
||||
],
|
||||
"time": "2025-02-26T09:01:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
"version": "v5.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||
"reference": "ae59794362fe85e051a58ad36b289443f57be7a9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ae59794362fe85e051a58ad36b289443f57be7a9",
|
||||
"reference": "ae59794362fe85e051a58ad36b289443f57be7a9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-ctype": "*",
|
||||
"ext-json": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"php": ">=7.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"ircmaxell/php-yacc": "^0.0.7",
|
||||
"phpunit/phpunit": "^9.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/php-parse"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PhpParser\\": "lib/PhpParser"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nikita Popov"
|
||||
}
|
||||
],
|
||||
"description": "A PHP parser written in PHP",
|
||||
"keywords": [
|
||||
"parser",
|
||||
"php"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
||||
"source": "https://github.com/nikic/PHP-Parser/tree/v5.5.0"
|
||||
},
|
||||
"time": "2025-05-31T08:24:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phar-io/manifest",
|
||||
"version": "2.0.4",
|
||||
@ -16057,16 +16154,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "1.12.27",
|
||||
"version": "1.12.28",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
"reference": "3a6e423c076ab39dfedc307e2ac627ef579db162"
|
||||
"reference": "fcf8b71aeab4e1a1131d1783cef97b23a51b87a9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/3a6e423c076ab39dfedc307e2ac627ef579db162",
|
||||
"reference": "3a6e423c076ab39dfedc307e2ac627ef579db162",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/fcf8b71aeab4e1a1131d1783cef97b23a51b87a9",
|
||||
"reference": "fcf8b71aeab4e1a1131d1783cef97b23a51b87a9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -16111,7 +16208,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-05-21T20:51:45+00:00"
|
||||
"time": "2025-07-17T17:15:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
|
||||
@ -51,6 +51,7 @@ return [
|
||||
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
|
||||
Nelmio\ApiDocBundle\NelmioApiDocBundle::class => ['all' => true],
|
||||
Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
|
||||
Gesdinet\JWTRefreshTokenBundle\GesdinetJWTRefreshTokenBundle::class => ['all' => true],
|
||||
Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle::class => ['dev' => true, 'test' => true],
|
||||
Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle::class => ['dev' => true, 'test' => true],
|
||||
Hautelook\AliceBundle\HautelookAliceBundle::class => ['dev' => true, 'test' => true],
|
||||
|
||||
13
src/new/config/packages/refresh_token.php
Normal file
13
src/new/config/packages/refresh_token.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use PSC\Shop\EntityBundle\Document\RefreshToken;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->extension('gesdinet_jwt_refresh_token', [
|
||||
'manager_type' => 'mongodb',
|
||||
'refresh_token_class' => RefreshToken::class,
|
||||
]);
|
||||
};
|
||||
@ -6,172 +6,168 @@ use PSC\Shop\EntityBundle\Document\Instance;
|
||||
use PSC\Shop\EntityBundle\Entity\Contact;
|
||||
use PSC\Shop\EntityBundle\Entity\Shop;
|
||||
use PSC\Shop\UserBundle\Model\ApiUser;
|
||||
use PSC\Shop\UserBundle\Security\ApiKeyAuthenticator;
|
||||
use PSC\Shop\UserBundle\Security\ApiKeyExtractor;
|
||||
use PSC\Shop\UserBundle\Security\ApiKeyHandler;
|
||||
use PSC\Shop\UserBundle\Security\ApiKey\ApiKeyProvider;
|
||||
use PSC\Shop\UserBundle\Security\ApiKey\InstanceProvider;
|
||||
use PSC\Shop\UserBundle\Security\ApiKey\ShopProvider;
|
||||
use PSC\Shop\UserBundle\Security\ApiKeyAuthenticator;
|
||||
use PSC\Shop\UserBundle\Security\ApiKeyExtractor;
|
||||
use PSC\Shop\UserBundle\Security\ApiKeyHandler;
|
||||
use PSC\Shop\UserBundle\Security\User\UserProvider;
|
||||
use PSC\Shop\UserBundle\Security\ZendAuthenticator;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->extension(
|
||||
'security',
|
||||
[
|
||||
'session_fixation_strategy' => SessionAuthenticationStrategy::NONE,
|
||||
'password_hashers' =>
|
||||
[
|
||||
Contact::class =>
|
||||
['algorithm' => 'auto']
|
||||
],
|
||||
'role_hierarchy' =>
|
||||
[
|
||||
'ROLE_SHOP' => 'ROLE_USER',
|
||||
'ROLE_PRODUCT_EDITOR' => ['ROLE_SHOP'],
|
||||
'ROLE_SHOP_OPERATOR' => [
|
||||
'ROLE_SHOP',
|
||||
'ROLE_PRODUCTION',
|
||||
'ROLE_PRODUCT_EDITOR'
|
||||
],
|
||||
'ROLE_SHOP_ADMIN' => [
|
||||
'ROLE_SHOP',
|
||||
'ROLE_SHOP_OPERATOR'
|
||||
],
|
||||
'ROLE_ADMIN' => [
|
||||
'ROLE_SHOP',
|
||||
'ROLE_SHOP_OPERATOR',
|
||||
'ROLE_SHOP_ADMIN'
|
||||
],
|
||||
'ROLE_WAREHOUSE' => [
|
||||
'ROLE_USER',
|
||||
'ROLE_ADMIN'
|
||||
],
|
||||
'ROLE_PRODUCTION' => [
|
||||
'ROLE_USER',
|
||||
'ROLE_ADMIN',
|
||||
'ROLE_WAREHOUSE'
|
||||
],
|
||||
'ROLE_SUPER_SHOP' => [
|
||||
'ROLE_USER',
|
||||
'ROLE_SHOP',
|
||||
'ROLE_ADMIN',
|
||||
'ROLE_PRODUCTION',
|
||||
'ROLE_WAREHOUSE'
|
||||
],
|
||||
'ROLE_SUPER_ADMIN' => [
|
||||
'ROLE_USER',
|
||||
'ROLE_SHOP',
|
||||
'ROLE_ADMIN',
|
||||
'ROLE_WAREHOUSE',
|
||||
'ROLE_PRODUCTION',
|
||||
'ROLE_SUPER_SHOP',
|
||||
'ROLE_ALLOWED_TO_SWITCH'
|
||||
],
|
||||
'ROLE_API' => [
|
||||
'ROLE_SHOP'
|
||||
]
|
||||
],
|
||||
'providers' => [
|
||||
//'database' => ['entity' => ['class' => Contact::class]],
|
||||
'user_provider' => ['id' => UserProvider::class ],
|
||||
'shop_provider' => ['id' => ShopProvider::class ],
|
||||
'instance_provider' => ['id' => InstanceProvider::class ],
|
||||
'all' => [
|
||||
'chain' =>
|
||||
[
|
||||
'providers' =>
|
||||
['user_provider', 'shop_provider', 'instance_provider']
|
||||
]
|
||||
]
|
||||
// 'database_token' => ['entity' => ['class' => Shop::class]],
|
||||
// 'database_api_key' => ['entity' => ['class' => Instance::class]],
|
||||
$containerConfigurator->extension('security', [
|
||||
'session_fixation_strategy' => SessionAuthenticationStrategy::NONE,
|
||||
'password_hashers' => [
|
||||
Contact::class => ['algorithm' => 'auto'],
|
||||
],
|
||||
'role_hierarchy' => [
|
||||
'ROLE_SHOP' => 'ROLE_USER',
|
||||
'ROLE_PRODUCT_EDITOR' => ['ROLE_SHOP'],
|
||||
'ROLE_SHOP_OPERATOR' => [
|
||||
'ROLE_SHOP',
|
||||
'ROLE_PRODUCTION',
|
||||
'ROLE_PRODUCT_EDITOR',
|
||||
],
|
||||
'firewalls' => [
|
||||
'dev' => [
|
||||
'security' => false,
|
||||
'pattern' => '^/(_(profiler|wdt)|css|images|js)/',
|
||||
],
|
||||
'admin_secured_area' => [
|
||||
'pattern' => '^/backend',
|
||||
'provider' => 'user_provider',
|
||||
'form_login' => [
|
||||
'check_path' => 'psc_backend_login',
|
||||
'login_path' => 'psc_backend_login',
|
||||
'enable_csrf' => true,
|
||||
'default_target_path' => 'psc_backend_dashboard_index',
|
||||
'username_parameter' => 'username',
|
||||
'password_parameter' => 'password'
|
||||
],
|
||||
'logout' => [
|
||||
'invalidate_session' => false,
|
||||
'path' => 'psc_backend_logout',
|
||||
'target' => 'psc_backend_login'
|
||||
]
|
||||
],
|
||||
'api_login' => [
|
||||
'pattern' => '/api/login',
|
||||
'stateless' => false,
|
||||
'provider' => 'all',
|
||||
'json_login' => [
|
||||
'check_path' => '/api/login_check',
|
||||
'success_handler' => 'lexik_jwt_authentication.handler.authentication_success',
|
||||
'failure_handler' => 'lexik_jwt_authentication.handler.authentication_failure'
|
||||
]
|
||||
],
|
||||
'api' => [
|
||||
'pattern' => '^/api',
|
||||
'stateless' => false,
|
||||
'provider' => 'all',
|
||||
'jwt' => null,
|
||||
'access_token' => [
|
||||
'token_handler' => ApiKeyHandler::class,
|
||||
'token_extractors' => ApiKeyExtractor::class
|
||||
],
|
||||
'custom_authenticators' => [
|
||||
ApiKeyAuthenticator::class,
|
||||
ZendAuthenticator::class,
|
||||
]
|
||||
],
|
||||
'storefront' => [
|
||||
'pattern' => '^/',
|
||||
'provider' => 'user_provider',
|
||||
'stateless' => false,
|
||||
'jwt' => null,
|
||||
'custom_authenticators' => [
|
||||
ApiKeyAuthenticator::class,
|
||||
ZendAuthenticator::class,
|
||||
]
|
||||
]
|
||||
'ROLE_SHOP_ADMIN' => [
|
||||
'ROLE_SHOP',
|
||||
'ROLE_SHOP_OPERATOR',
|
||||
],
|
||||
'access_control' => [
|
||||
[
|
||||
'path' => '^/production',
|
||||
'roles' => 'ROLE_SHOP'
|
||||
'ROLE_ADMIN' => [
|
||||
'ROLE_SHOP',
|
||||
'ROLE_SHOP_OPERATOR',
|
||||
'ROLE_SHOP_ADMIN',
|
||||
],
|
||||
'ROLE_WAREHOUSE' => [
|
||||
'ROLE_USER',
|
||||
'ROLE_ADMIN',
|
||||
],
|
||||
'ROLE_PRODUCTION' => [
|
||||
'ROLE_USER',
|
||||
'ROLE_ADMIN',
|
||||
'ROLE_WAREHOUSE',
|
||||
],
|
||||
'ROLE_SUPER_SHOP' => [
|
||||
'ROLE_USER',
|
||||
'ROLE_SHOP',
|
||||
'ROLE_ADMIN',
|
||||
'ROLE_PRODUCTION',
|
||||
'ROLE_WAREHOUSE',
|
||||
],
|
||||
'ROLE_SUPER_ADMIN' => [
|
||||
'ROLE_USER',
|
||||
'ROLE_SHOP',
|
||||
'ROLE_ADMIN',
|
||||
'ROLE_WAREHOUSE',
|
||||
'ROLE_PRODUCTION',
|
||||
'ROLE_SUPER_SHOP',
|
||||
'ROLE_ALLOWED_TO_SWITCH',
|
||||
],
|
||||
'ROLE_API' => [
|
||||
'ROLE_SHOP',
|
||||
],
|
||||
],
|
||||
'providers' => [
|
||||
//'database' => ['entity' => ['class' => Contact::class]],
|
||||
'user_provider' => ['id' => UserProvider::class],
|
||||
'shop_provider' => ['id' => ShopProvider::class],
|
||||
'instance_provider' => ['id' => InstanceProvider::class],
|
||||
'all' => [
|
||||
'chain' => [
|
||||
'providers' => ['user_provider', 'shop_provider', 'instance_provider'],
|
||||
],
|
||||
[
|
||||
'path' => '^/backend/login',
|
||||
'roles' => 'PUBLIC_ACCESS'
|
||||
],
|
||||
// 'database_token' => ['entity' => ['class' => Shop::class]],
|
||||
// 'database_api_key' => ['entity' => ['class' => Instance::class]],
|
||||
],
|
||||
'firewalls' => [
|
||||
'dev' => [
|
||||
'security' => false,
|
||||
'pattern' => '^/(_(profiler|wdt)|css|images|js)/',
|
||||
],
|
||||
'admin_secured_area' => [
|
||||
'pattern' => '^/backend',
|
||||
'provider' => 'user_provider',
|
||||
'form_login' => [
|
||||
'check_path' => 'psc_backend_login',
|
||||
'login_path' => 'psc_backend_login',
|
||||
'enable_csrf' => true,
|
||||
'default_target_path' => 'psc_backend_dashboard_index',
|
||||
'username_parameter' => 'username',
|
||||
'password_parameter' => 'password',
|
||||
],
|
||||
[
|
||||
'path' => '^/backend/order/detail/package/printpartner',
|
||||
'roles' => 'PUBLIC_ACCESS'
|
||||
'logout' => [
|
||||
'invalidate_session' => false,
|
||||
'path' => 'psc_backend_logout',
|
||||
'target' => 'psc_backend_login',
|
||||
],
|
||||
[
|
||||
'path' => '^/backend/order/detail/package/download',
|
||||
'roles' => 'PUBLIC_ACCESS'
|
||||
],
|
||||
'api_login' => [
|
||||
'pattern' => '/api/login',
|
||||
'stateless' => false,
|
||||
'provider' => 'all',
|
||||
'json_login' => [
|
||||
'check_path' => '/api/login_check',
|
||||
'success_handler' => 'lexik_jwt_authentication.handler.authentication_success',
|
||||
'failure_handler' => 'lexik_jwt_authentication.handler.authentication_failure',
|
||||
],
|
||||
[
|
||||
'path' => '^/backend',
|
||||
'roles' => 'ROLE_SHOP'
|
||||
],
|
||||
'api' => [
|
||||
'pattern' => '^/api',
|
||||
'stateless' => false,
|
||||
'provider' => 'all',
|
||||
'entry_point' => 'jwt',
|
||||
'jwt' => null,
|
||||
'refresh_jwt' => [
|
||||
'check_path' => '/api/token/refresh',
|
||||
],
|
||||
[
|
||||
'path' => '^/',
|
||||
'roles' => 'PUBLIC_ACCESS'
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
||||
'access_token' => [
|
||||
'token_handler' => ApiKeyHandler::class,
|
||||
'token_extractors' => ApiKeyExtractor::class,
|
||||
],
|
||||
'custom_authenticators' => [
|
||||
ApiKeyAuthenticator::class,
|
||||
ZendAuthenticator::class,
|
||||
],
|
||||
],
|
||||
'storefront' => [
|
||||
'pattern' => '^/',
|
||||
'provider' => 'user_provider',
|
||||
'stateless' => false,
|
||||
'jwt' => null,
|
||||
'custom_authenticators' => [
|
||||
ApiKeyAuthenticator::class,
|
||||
ZendAuthenticator::class,
|
||||
],
|
||||
],
|
||||
],
|
||||
'access_control' => [
|
||||
[
|
||||
'path' => '^/production',
|
||||
'roles' => 'ROLE_SHOP',
|
||||
],
|
||||
[
|
||||
'path' => '^/backend/login',
|
||||
'roles' => 'PUBLIC_ACCESS',
|
||||
],
|
||||
[
|
||||
'path' => '^/backend/order/detail/package/printpartner',
|
||||
'roles' => 'PUBLIC_ACCESS',
|
||||
],
|
||||
[
|
||||
'path' => '^/backend/order/detail/package/download',
|
||||
'roles' => 'PUBLIC_ACCESS',
|
||||
],
|
||||
[
|
||||
'path' => '^/backend',
|
||||
'roles' => 'ROLE_SHOP',
|
||||
],
|
||||
[
|
||||
'path' => '^/',
|
||||
'roles' => 'PUBLIC_ACCESS',
|
||||
],
|
||||
],
|
||||
]);
|
||||
};
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
ux_autocomplete:
|
||||
resource: '@AutocompleteBundle/config/routes.php'
|
||||
prefix: '/autocomplete'
|
||||
api_refresh_token:
|
||||
path: /api/token/refresh
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ PSC\Shop\EntityBundle\Entity\Install:
|
||||
install_1:
|
||||
# uid: 1
|
||||
colordb: "TEST"
|
||||
paperdb: >
|
||||
paperContainer: >
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Dokument: Papiercontainer -->
|
||||
<container>
|
||||
|
||||
11
src/new/src/PSC/Shop/EntityBundle/Document/RefreshToken.php
Normal file
11
src/new/src/PSC/Shop/EntityBundle/Document/RefreshToken.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace PSC\Shop\EntityBundle\Document;
|
||||
|
||||
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
|
||||
use Gesdinet\JWTRefreshTokenBundle\Document\RefreshToken as BaseRefreshToken;
|
||||
|
||||
#[ODM\Document(collection: 'refresh_tokens')]
|
||||
class RefreshToken extends BaseRefreshToken
|
||||
{
|
||||
}
|
||||
27
src/new/src/PSC/Shop/MediaBundle/Api/Folder/Add.php
Normal file
27
src/new/src/PSC/Shop/MediaBundle/Api/Folder/Add.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace PSC\Shop\MediaBundle\Api\Folder;
|
||||
|
||||
use OpenApi\Attributes\RequestBody;
|
||||
use OpenApi\Attributes\Response;
|
||||
use OpenApi\Attributes\Tag;
|
||||
use PSC\Shop\MediaBundle\Dto\Folder\Input;
|
||||
use PSC\Shop\MediaBundle\Model\Folder;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
|
||||
class Add extends AbstractController
|
||||
{
|
||||
#[Response(response: 200, description: 'add Folder', ref: Folder::class)]
|
||||
#[Route(path: '/folder/add', methods: ['POST'])]
|
||||
#[Tag('Media')]
|
||||
#[RequestBody(content: new Model(type: Input::class))]
|
||||
#[ParamConverter('data', class: Input::class, converter: 'psc_rest.request_body')]
|
||||
#[IsGranted('SHOP_ADMIN')]
|
||||
public function add(Input $data)
|
||||
{
|
||||
return $this->json($data);
|
||||
}
|
||||
}
|
||||
11
src/new/src/PSC/Shop/MediaBundle/Dto/Folder/Input.php
Normal file
11
src/new/src/PSC/Shop/MediaBundle/Dto/Folder/Input.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace PSC\Shop\MediaBundle\Dto\Folder;
|
||||
|
||||
use OpenApi\Attributes\Property;
|
||||
|
||||
final class Input
|
||||
{
|
||||
#[Property(type: 'string')]
|
||||
public string $name;
|
||||
}
|
||||
48
src/new/src/PSC/Shop/MediaBundle/Model/Folder.php
Normal file
48
src/new/src/PSC/Shop/MediaBundle/Model/Folder.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace PSC\Shop\MediaBundle\Model;
|
||||
|
||||
use Nelmio\ApiDocBundle\Annotation\Model;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
class Folder
|
||||
{
|
||||
#[OA\Property(type: 'string')]
|
||||
private string $title = '';
|
||||
|
||||
#[OA\Property(type: 'string')]
|
||||
private string $uuid = '';
|
||||
|
||||
#[OA\Property(type: 'array', items: new OA\Items(ref: new Model(type: Folder::class)))]
|
||||
private array $subFolders = [];
|
||||
|
||||
public function getTitle(): string
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
public function setTitle(string $title): void
|
||||
{
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
public function getUuid(): string
|
||||
{
|
||||
return $this->uuid;
|
||||
}
|
||||
|
||||
public function setUuid(string $uuid): void
|
||||
{
|
||||
$this->uuid = $uuid;
|
||||
}
|
||||
|
||||
public function getSubFolders(): array
|
||||
{
|
||||
return $this->subFolders;
|
||||
}
|
||||
|
||||
public function setSubFolders(array $subFolders): void
|
||||
{
|
||||
$this->subFolders = $subFolders;
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class QRImagick
|
||||
*
|
||||
@ -61,7 +62,6 @@ class QRImagickCMYK extends QROutputAbstract
|
||||
*/
|
||||
public function __construct(SettingsContainerInterface $options, QRMatrix $matrix)
|
||||
{
|
||||
|
||||
foreach (['fileinfo', 'imagick'] as $ext) {
|
||||
if (!extension_loaded($ext)) {
|
||||
throw new QRCodeOutputException(sprintf('ext-%s not loaded', $ext)); // @codeCoverageIgnore
|
||||
@ -79,7 +79,6 @@ class QRImagickCMYK extends QROutputAbstract
|
||||
*/
|
||||
public static function moduleValueIsValid($value): bool
|
||||
{
|
||||
|
||||
if (!is_string($value)) {
|
||||
return false;
|
||||
}
|
||||
@ -91,7 +90,10 @@ class QRImagickCMYK extends QROutputAbstract
|
||||
// #rrggbb(aa)
|
||||
// #rrrrggggbbbb(aaaa)
|
||||
// ...
|
||||
if (preg_match('/^#[a-f\d]+$/i', $value) && in_array((strlen($value) - 1), [3, 4, 6, 8, 9, 12, 16, 24, 32], true)) {
|
||||
if (
|
||||
preg_match('/^#[a-f\d]+$/i', $value) &&
|
||||
in_array(strlen($value) - 1, [3, 4, 6, 8, 9, 12, 16, 24, 32], true)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -123,7 +125,7 @@ class QRImagickCMYK extends QROutputAbstract
|
||||
*/
|
||||
protected function getDefaultModuleValue(bool $isDark): ImagickPixel
|
||||
{
|
||||
return $this->prepareModuleValue(($isDark) ? '#000' : '#fff');
|
||||
return $this->prepareModuleValue($isDark ? '#000' : '#fff');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -131,7 +133,7 @@ class QRImagickCMYK extends QROutputAbstract
|
||||
*
|
||||
* @return string|\Imagick
|
||||
*/
|
||||
public function dump(string $file = null)
|
||||
public function dump(null|string $file = null)
|
||||
{
|
||||
$this->setBgColor();
|
||||
|
||||
@ -153,7 +155,7 @@ class QRImagickCMYK extends QROutputAbstract
|
||||
$this->saveToFile($imageData, $file);
|
||||
|
||||
if ($this->options->outputBase64) {
|
||||
$imageData = $this->toBase64DataURI($imageData, (new finfo(FILEINFO_MIME_TYPE))->buffer($imageData));
|
||||
$imageData = $this->toBase64DataURI($imageData, new finfo(FILEINFO_MIME_TYPE)->buffer($imageData));
|
||||
}
|
||||
|
||||
return $imageData;
|
||||
@ -164,7 +166,6 @@ class QRImagickCMYK extends QROutputAbstract
|
||||
*/
|
||||
protected function setBgColor(): void
|
||||
{
|
||||
|
||||
if ($this::moduleValueIsValid($this->options->bgColor)) {
|
||||
$this->backgroundColor = $this->prepareModuleValue($this->options->bgColor);
|
||||
|
||||
@ -179,10 +180,10 @@ class QRImagickCMYK extends QROutputAbstract
|
||||
*/
|
||||
protected function createImage(): Imagick
|
||||
{
|
||||
$imagick = new Imagick();
|
||||
$imagick = new Imagick();
|
||||
[$width, $height] = $this->getOutputDimensions();
|
||||
|
||||
$imagick->newImage($width, $height, $this->backgroundColor, $this->options->imagickFormat);
|
||||
$imagick->newImage($width, $height, 'none', $this->options->imagickFormat);
|
||||
$imagick->setColorSpace(Imagick::COLORSPACE_CMYK);
|
||||
if ($this->options->quality > -1) {
|
||||
$imagick->setImageCompressionQuality(max(0, min(100, $this->options->quality)));
|
||||
@ -196,7 +197,6 @@ class QRImagickCMYK extends QROutputAbstract
|
||||
*/
|
||||
protected function setTransparencyColor(): void
|
||||
{
|
||||
|
||||
if (!$this->options->imageTransparent) {
|
||||
return;
|
||||
}
|
||||
@ -232,7 +232,6 @@ class QRImagickCMYK extends QROutputAbstract
|
||||
*/
|
||||
protected function module(int $x, int $y, int $M_TYPE): void
|
||||
{
|
||||
|
||||
if (!$this->drawLightModules && !$this->matrix->isDark($M_TYPE)) {
|
||||
return;
|
||||
}
|
||||
@ -241,21 +240,20 @@ class QRImagickCMYK extends QROutputAbstract
|
||||
|
||||
if ($this->drawCircularModules && !$this->matrix->checkTypeIn($x, $y, $this->keepAsSquare)) {
|
||||
$this->imagickDraw->circle(
|
||||
(($x + 0.5) * $this->scale),
|
||||
(($y + 0.5) * $this->scale),
|
||||
(($x + 0.5 + $this->circleRadius) * $this->scale),
|
||||
(($y + 0.5) * $this->scale)
|
||||
($x + 0.5) * $this->scale,
|
||||
($y + 0.5) * $this->scale,
|
||||
($x + 0.5 + $this->circleRadius) * $this->scale,
|
||||
($y + 0.5) * $this->scale,
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->imagickDraw->rectangle(
|
||||
($x * $this->scale),
|
||||
($y * $this->scale),
|
||||
((($x + 1) * $this->scale) - 1),
|
||||
((($y + 1) * $this->scale) - 1)
|
||||
$x * $this->scale,
|
||||
$y * $this->scale,
|
||||
(($x + 1) * $this->scale) - 1,
|
||||
(($y + 1) * $this->scale) - 1,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -12,10 +12,10 @@ class Barcode extends Node
|
||||
|
||||
public function __construct(
|
||||
Node $annotation,
|
||||
AbstractExpression $parameters = null,
|
||||
null|AbstractExpression $parameters = null,
|
||||
Node $body,
|
||||
$lineno,
|
||||
$tag = null
|
||||
$tag = null,
|
||||
) {
|
||||
$nodes = [
|
||||
'body' => $body,
|
||||
@ -36,18 +36,53 @@ class Barcode extends Node
|
||||
$compiler->raw('$_options = [];');
|
||||
}
|
||||
$node = $this->getNode('body');
|
||||
$compiler->subcompile($node)
|
||||
->raw(PHP_EOL);
|
||||
$compiler->raw(
|
||||
'
|
||||
$options = new \PSC\System\SettingsBundle\Barcode\QRGdWithLogoOptions();
|
||||
$options->version = -1;
|
||||
$options->versionMax = 40;
|
||||
$options->eccLevel = \chillerlan\QRCode\Common\EccLevel::H;
|
||||
$options->outputType = \chillerlan\QRCode\Output\QROutputInterface::CUSTOM;
|
||||
if(isset($_options["cmyk"]) && $_options["cmyk"] == true) {
|
||||
$compiler->subcompile($node)->raw(PHP_EOL);
|
||||
$compiler->raw('
|
||||
if(isset($_options["svg"]) && $_options["svg"] == true) {
|
||||
$options = new chillerlan\QRCode\QROptions;
|
||||
|
||||
$options->outputType = \chillerlan\QRCode\Output\QROutputInterface::MARKUP_SVG;
|
||||
$options->outputBase64 = true;
|
||||
$options->drawLightModules = false;
|
||||
$options->moduleValues = [
|
||||
// finder
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_FINDER_DARK => $_options["finderdotdark"]?? [0, 0, 0],
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_FINDER_DOT => $_options["finderdot"]?? [0, 0, 0],
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_FINDER => $_options["bgcolor"]?? [255, 255, 255],
|
||||
// alignment
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_ALIGNMENT_DARK => $_options["color"]?? [0, 0, 0],
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_ALIGNMENT => $_options["bgcolor"]?? [255, 255, 255],
|
||||
// timing
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_TIMING_DARK => $_options["color"]?? [0, 0, 0],
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_TIMING => $_options["bgcolor"]?? [255, 255, 255],
|
||||
// format
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_FORMAT_DARK => $_options["color"]?? [0, 0, 0],
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_FORMAT => $_options["bgcolor"]?? [255, 255, 255],
|
||||
// version
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_VERSION_DARK => $_options["color"]?? [0, 0, 0],
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_VERSION => $_options["bgcolor"]?? [255, 255, 255],
|
||||
// data
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_DATA_DARK => $_options["color"]?? [0, 0, 0],
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_DATA => $_options["bgcolor"]?? [255, 255, 255],
|
||||
// darkmodule
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_DARKMODULE => $_options["color"]?? [0, 0, 0],
|
||||
// separator
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_QUIETZONE => $_options["bgcolor"]?? [255, 255, 255],
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_SEPARATOR => $_options["bgcolor"]?? [255, 255, 255],
|
||||
];
|
||||
$str = "<img width=\"" . $_options["width"] . "\" src=\"" .
|
||||
(new \chillerlan\QRCode\QRCode($options))->render(trim($context["barcode"])) . "\" />";
|
||||
|
||||
file_put_contents("/data/www/old/cache/test.svg", $str);
|
||||
echo $str;
|
||||
}elseif(isset($_options["cmyk"]) && $_options["cmyk"] == true) {
|
||||
$options = new \PSC\System\SettingsBundle\Barcode\QRGdWithLogoOptions();
|
||||
$options->version = -1;
|
||||
$options->versionMax = 40;
|
||||
$options->eccLevel = \chillerlan\QRCode\Common\EccLevel::H;
|
||||
$options->outputType = \chillerlan\QRCode\Output\QROutputInterface::CUSTOM;
|
||||
$options->outputInterface = \PSC\System\SettingsBundle\Barcode\QRImagickCMYK::class;
|
||||
$options->imagickFormat = "jpeg";
|
||||
$options->imagickFormat = "jpg";
|
||||
$options->moduleValues = [
|
||||
// finder
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_FINDER_DARK => $_options["finderdotdark"]?? [0, 0, 0],
|
||||
@ -75,9 +110,14 @@ if(isset($_options["cmyk"]) && $_options["cmyk"] == true) {
|
||||
\chillerlan\QRCode\Data\QRMatrix::M_SEPARATOR => $_options["bgcolor"]?? [255, 255, 255],
|
||||
];
|
||||
$filename = md5(trim($context["barcode"])).".jpeg";
|
||||
(new \chillerlan\QRCode\QRCode($options))->render(trim($context["barcode"]), "/data/www/old/" . $filename);
|
||||
echo "<img src=\"/data/www/old/$filename\" />";
|
||||
(new \chillerlan\QRCode\QRCode($options))->render(trim($context["barcode"]), "/data/www/old/cache/" . $filename);
|
||||
echo "<img src=\"/data/www/old/cache/$filename\" />";
|
||||
}else{
|
||||
$options = new \PSC\System\SettingsBundle\Barcode\QRGdWithLogoOptions();
|
||||
$options->version = -1;
|
||||
$options->versionMax = 40;
|
||||
$options->eccLevel = \chillerlan\QRCode\Common\EccLevel::H;
|
||||
$options->outputType = \chillerlan\QRCode\Output\QROutputInterface::CUSTOM;
|
||||
if(isset($_options["logo"]) && $_options["logo"] == true) {
|
||||
$options->logo = $_options["logo"];
|
||||
if(isset($_options["melt"]) && $_options["melt"] == true) {
|
||||
@ -143,8 +183,6 @@ if(isset($_options["cmyk"]) && $_options["cmyk"] == true) {
|
||||
(new \chillerlan\QRCode\QRCode($options))->render(trim($context["barcode"]), "/tmp/" . $filename);
|
||||
echo "<img src=\"/tmp/$filename\" />";
|
||||
}
|
||||
'
|
||||
);
|
||||
|
||||
');
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,6 +106,15 @@
|
||||
"gabrielbull/ups-api": {
|
||||
"version": "dev-master"
|
||||
},
|
||||
"gesdinet/jwt-refresh-token-bundle": {
|
||||
"version": "1.5",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes-contrib",
|
||||
"branch": "main",
|
||||
"version": "1.0",
|
||||
"ref": "2390b4ed5c195e0b3f6dea45221f3b7c0af523a0"
|
||||
}
|
||||
},
|
||||
"gregwar/captcha-bundle": {
|
||||
"version": "v2.2.0"
|
||||
},
|
||||
|
||||
36
src/new/tests/PSC/Shop/Media/Api/FolderTest.php
Normal file
36
src/new/tests/PSC/Shop/Media/Api/FolderTest.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tests\PSC\Shop\Media\Api;
|
||||
|
||||
use PSC\Shop\ContactBundle\Repository\ContactRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
use Tests\RefreshDatabaseTrait;
|
||||
|
||||
class FolderTest extends WebTestCase
|
||||
{
|
||||
use RefreshDatabaseTrait;
|
||||
|
||||
public function testCreateFolder(): void
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$userRepository = static::getContainer()->get(ContactRepository::class);
|
||||
|
||||
$testUser = $userRepository->loadUserByUsername('admin@shop.de');
|
||||
|
||||
$client->loginUser($testUser, 'api');
|
||||
|
||||
$client->request(
|
||||
'POST',
|
||||
'/api/media/folder/create',
|
||||
[
|
||||
'name' => 'Test1',
|
||||
],
|
||||
[],
|
||||
);
|
||||
|
||||
self::assertResponseIsSuccessful($client->getResponse());
|
||||
$media = json_decode($client->getResponse()->getContent(), true);
|
||||
}
|
||||
}
|
||||
@ -21,7 +21,6 @@ class PaperDBTest extends WebTestCase
|
||||
$client->jsonRequest('GET', '/api/system/papercontainer', [], []);
|
||||
$this->assertResponseIsSuccessful();
|
||||
|
||||
var_dump($client->getResponse()->getContent());
|
||||
self::assertJson($client->getResponse()->getContent());
|
||||
}
|
||||
|
||||
@ -33,9 +32,25 @@ class PaperDBTest extends WebTestCase
|
||||
|
||||
$client->loginUser($testUser, 'api');
|
||||
|
||||
$client->jsonRequest('GET', '/api/system/papercontainer', [], []);
|
||||
$str = '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Dokument: Papiercontainer -->
|
||||
<container>
|
||||
<papiercontainer id="innen">
|
||||
<papier id="ct120"/>
|
||||
<papier id="ct220"/>
|
||||
</papiercontainer>
|
||||
</container>';
|
||||
|
||||
$client->jsonRequest('PUT', '/api/system/papercontainer', ['content' => $str], []);
|
||||
$this->assertResponseIsSuccessful();
|
||||
|
||||
self::assertJson($client->getResponse()->getContent());
|
||||
|
||||
$client->jsonRequest('GET', '/api/system/papercontainer', [], []);
|
||||
$this->assertResponseIsSuccessful();
|
||||
self::assertStringEqualsStringIgnoringLineEndings(
|
||||
json_decode($client->getResponse()->getContent(), true)['content'],
|
||||
$str,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
namespace Plugins\System\PSC\XmlCalc\Api;
|
||||
|
||||
use PSC\Shop\ContactBundle\Repository\ContactRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
use Tests\RefreshDatabaseTrait;
|
||||
|
||||
class UpdateProductTest extends WebTestCase
|
||||
{
|
||||
use RefreshDatabaseTrait;
|
||||
|
||||
public function testUpdateXml(): void
|
||||
{
|
||||
$client = static::createClient();
|
||||
$userRepository = static::getContainer()->get(ContactRepository::class);
|
||||
$testUser = $userRepository->loadUserByUsername('company@shop.de');
|
||||
|
||||
$client->loginUser($testUser, 'api');
|
||||
|
||||
$calcXml = '<?xml version="1.0" encoding="utf-8"?>
|
||||
<kalkulation>
|
||||
<artikel>
|
||||
<name>SD-Durchschreibesätze A4-Blocks</name>
|
||||
<kommentar>210 mm x 297 mm</kommentar>
|
||||
|
||||
<option id="auflage" name="Auflage" type="Input" default="10"/>
|
||||
|
||||
<option id="calc_rabatt" type="Hidden">
|
||||
<contact.accountType default="1">
|
||||
<grenze calc_value="1">0-1</grenze>
|
||||
<grenze calc_value="0.8">2</grenze>
|
||||
<grenze calc_value="0.5">3</grenze>
|
||||
</contact.accountType>
|
||||
</option>
|
||||
|
||||
<option id="calc_rabatt_account" type="Hidden">
|
||||
<contact.account default="1">
|
||||
<grenze calc_value="1">1</grenze>
|
||||
<grenze calc_value="8">2</grenze>
|
||||
<grenze calc_value="5">3</grenze>
|
||||
</contact.account>
|
||||
</option>
|
||||
|
||||
<option id="selectTest" name="selectTest" type="Select" default="1">
|
||||
<opt id="1" name="eins"></opt>
|
||||
<opt id="2" name="zwei"></opt>
|
||||
</option>
|
||||
|
||||
<option id="calc" type="Hidden">
|
||||
<auflage>
|
||||
<grenze formel="0.26*$Vauflage$V">1-</grenze>
|
||||
</auflage>
|
||||
</option>
|
||||
|
||||
</artikel>
|
||||
</kalkulation>';
|
||||
|
||||
$client->jsonRequest(
|
||||
'PUT',
|
||||
'/api/plugin/system/psc/xmlcalc/product/01938686-0e4d-7da9-bae3-b2e1b1681f9f',
|
||||
[
|
||||
'calcXml' => $calcXml,
|
||||
],
|
||||
[],
|
||||
);
|
||||
$this->assertResponseIsSuccessful();
|
||||
|
||||
self::assertJson($client->getResponse()->getContent());
|
||||
}
|
||||
}
|
||||
@ -23,20 +23,31 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
class Settings extends AbstractController
|
||||
{
|
||||
|
||||
public function __construct(private EntityManagerInterface $entityManager, private DocumentManager $documentManager, private SerializerInterface $serializer)
|
||||
{
|
||||
}
|
||||
public function __construct(
|
||||
private EntityManagerInterface $entityManager,
|
||||
private DocumentManager $documentManager,
|
||||
private SerializerInterface $serializer,
|
||||
) {}
|
||||
|
||||
#[Route(path: '/settings/{uuid}', methods: ['GET'])]
|
||||
#[Tag('Plugin/Custom/PSC/CollectLayouter')]
|
||||
#[Response(response: 200, description: 'return settings', content: new JsonContent(ref: new Model(type: Setting::class)))]
|
||||
public function generatePreview(string $uuid = ""): JsonResponse {
|
||||
|
||||
#[Response(
|
||||
response: 200,
|
||||
description: 'return settings',
|
||||
content: new JsonContent(ref: new Model(type: Setting::class)),
|
||||
)]
|
||||
public function generatePreview(string $uuid = ''): JsonResponse
|
||||
{
|
||||
$product = $this->entityManager->getRepository(Product::class)->findOneBy(['uuid' => $uuid]);
|
||||
|
||||
$productDoc = $this->documentManager->getRepository(\PSC\Shop\EntityBundle\Document\Product::class)->findOneBy(['uid' => $product->getUID()]);
|
||||
$settings = $this->serializer->deserialize($productDoc->getPluginSettingModule('collectlayouter', 'config')?? '{}', Setting::class, 'json');
|
||||
$productDoc = $this->documentManager
|
||||
->getRepository(\PSC\Shop\EntityBundle\Document\Product::class)
|
||||
->findOneBy(['uid' => $product->getUID()]);
|
||||
$settings = $this->serializer->deserialize(
|
||||
$productDoc->getPluginSettingModule('collectlayouter', 'config') ?? '{}',
|
||||
Setting::class,
|
||||
'json',
|
||||
);
|
||||
|
||||
return $this->json($settings);
|
||||
}
|
||||
@ -44,16 +55,27 @@ class Settings extends AbstractController
|
||||
#[Route(path: '/settings/{uuid}', methods: ['PUT'])]
|
||||
#[Tag('Plugin/Custom/PSC/CollectLayouter')]
|
||||
#[ParamConverter('data', class: Setting::class, converter: 'psc_rest.request_body')]
|
||||
#[RequestBody(description: 'content',content: new JsonContent(ref: Setting::class))]
|
||||
#[Response(response: 200, description: 'return settings', content: new JsonContent(ref: new Model(type: Setting::class)))]
|
||||
public function save(string $uuid, Setting $data): JsonResponse {
|
||||
|
||||
#[RequestBody(description: 'content', content: new JsonContent(ref: Setting::class))]
|
||||
#[Response(
|
||||
response: 200,
|
||||
description: 'return settings',
|
||||
content: new JsonContent(ref: new Model(type: Setting::class)),
|
||||
)]
|
||||
public function save(string $uuid, Setting $data): JsonResponse
|
||||
{
|
||||
$product = $this->entityManager->getRepository(Product::class)->findOneBy(['uuid' => $uuid]);
|
||||
|
||||
$productDoc = $this->documentManager->getRepository(\PSC\Shop\EntityBundle\Document\Product::class)->findOneBy(['uid' => $product->getUID()]);
|
||||
$settings = $this->serializer->deserialize($productDoc->getPluginSettingModule('collectlayouter', 'config')?? '{}', Setting::class, 'json');
|
||||
$productDoc = $this->documentManager
|
||||
->getRepository(\PSC\Shop\EntityBundle\Document\Product::class)
|
||||
->findOneBy(['uid' => $product->getUID()]);
|
||||
$settings = $this->serializer->deserialize(
|
||||
$productDoc->getPluginSettingModule('collectlayouter', 'config') ?? '{}',
|
||||
Setting::class,
|
||||
'json',
|
||||
);
|
||||
|
||||
$data->setFonts($settings->getFonts());
|
||||
$data->setSpotColors($settings->getSpotColors());
|
||||
$data->setCustomerForm($settings->getCustomerForm());
|
||||
|
||||
$productDoc->setPluginSettingModule('collectlayouter', 'config', $this->serializer->serialize($data, 'json'));
|
||||
@ -62,5 +84,5 @@ class Settings extends AbstractController
|
||||
|
||||
return $this->json($data);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace Plugin\Custom\PSC\CollectLayouter\Controller\Backend;
|
||||
|
||||
use Doctrine\ODM\MongoDB\DocumentManager;
|
||||
@ -17,55 +18,80 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
#[Route('/product')]
|
||||
class IndexController extends AbstractController
|
||||
{
|
||||
|
||||
public function __construct(private EntityManagerInterface $entityManager, private DocumentManager $documentManager, private SerializerInterface $serializer)
|
||||
{
|
||||
|
||||
}
|
||||
public function __construct(
|
||||
private EntityManagerInterface $entityManager,
|
||||
private DocumentManager $documentManager,
|
||||
private SerializerInterface $serializer,
|
||||
) {}
|
||||
|
||||
#[Template]
|
||||
#[Security("is_granted('ROLE_ADMIN')")]
|
||||
#[Route('/edit/{uuid}', defaults: ['uuid' => '', 'test' => false], name: 'psc_plugin_custom_collectlayouter_backend_index')]
|
||||
public function indexAction(
|
||||
Request $request,
|
||||
JWTTokenManagerInterface $JWTTokenManager,
|
||||
$uuid)
|
||||
#[Route(
|
||||
'/edit/{uuid}',
|
||||
defaults: ['uuid' => '', 'test' => false],
|
||||
name: 'psc_plugin_custom_collectlayouter_backend_index',
|
||||
)]
|
||||
public function indexAction(Request $request, JWTTokenManagerInterface $JWTTokenManager, $uuid)
|
||||
{
|
||||
|
||||
$product = $this->entityManager->getRepository(Product::class)->findOneBy(['uuid' => $uuid]);
|
||||
|
||||
$productDoc = $this->documentManager->getRepository(\PSC\Shop\EntityBundle\Document\Product::class)->findOneBy(['uid' => $product->getUID()]);
|
||||
$productDoc = $this->documentManager
|
||||
->getRepository(\PSC\Shop\EntityBundle\Document\Product::class)
|
||||
->findOneBy(['uid' => $product->getUID()]);
|
||||
|
||||
$setting = $this->serializer->deserialize($productDoc->getPluginSettingModule('collectlayouter', 'config')?? '{}', Setting::class, 'json');
|
||||
$setting = $this->serializer->deserialize(
|
||||
$productDoc->getPluginSettingModule('collectlayouter', 'config') ?? '{}',
|
||||
Setting::class,
|
||||
'json',
|
||||
);
|
||||
|
||||
$formFonts = $this->createForm(\Plugin\Custom\PSC\CollectLayouter\Form\Fonts::class, $setting);
|
||||
$formFonts->handleRequest($request);
|
||||
|
||||
$formSpotColors = $this->createForm(\Plugin\Custom\PSC\CollectLayouter\Form\SpotColors::class, $setting);
|
||||
$formSpotColors->handleRequest($request);
|
||||
|
||||
$formCustomer = $this->createForm(\Plugin\Custom\PSC\CollectLayouter\Form\CustomerForm::class, $setting);
|
||||
$formCustomer->handleRequest($request);
|
||||
|
||||
if($formFonts->isSubmitted() && $formFonts->isValid()) {
|
||||
$productDoc->setPluginSettingModule('collectlayouter', 'config', $this->serializer->serialize($setting, 'json'));
|
||||
if ($formFonts->isSubmitted() && $formFonts->isValid()) {
|
||||
$productDoc->setPluginSettingModule(
|
||||
'collectlayouter',
|
||||
'config',
|
||||
$this->serializer->serialize($setting, 'json'),
|
||||
);
|
||||
$this->documentManager->persist($productDoc);
|
||||
$this->documentManager->flush();
|
||||
}
|
||||
|
||||
if($formCustomer->isSubmitted() && $formCustomer->isValid()) {
|
||||
$productDoc->setPluginSettingModule('collectlayouter', 'config', $this->serializer->serialize($setting, 'json'));
|
||||
if ($formSpotColors->isSubmitted() && $formSpotColors->isValid()) {
|
||||
$productDoc->setPluginSettingModule(
|
||||
'collectlayouter',
|
||||
'config',
|
||||
$this->serializer->serialize($setting, 'json'),
|
||||
);
|
||||
$this->documentManager->persist($productDoc);
|
||||
$this->documentManager->flush();
|
||||
}
|
||||
|
||||
return array(
|
||||
if ($formCustomer->isSubmitted() && $formCustomer->isValid()) {
|
||||
$productDoc->setPluginSettingModule(
|
||||
'collectlayouter',
|
||||
'config',
|
||||
$this->serializer->serialize($setting, 'json'),
|
||||
);
|
||||
$this->documentManager->persist($productDoc);
|
||||
$this->documentManager->flush();
|
||||
}
|
||||
|
||||
return [
|
||||
'customerForm' => $formCustomer->createView(),
|
||||
'fontsForm' => $formFonts->createView(),
|
||||
'spotColorsForm' => $formSpotColors->createView(),
|
||||
'product' => $product,
|
||||
'setting' => $setting,
|
||||
'contactUuid' => $this->getUser()->getUuid(),
|
||||
'jwt' => $JWTTokenManager->create($this->getUser())
|
||||
);
|
||||
'jwt' => $JWTTokenManager->create($this->getUser()),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Plugin\Custom\PSC\CollectLayouter\Form;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class SpotColor extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder->add('name', TextType::class, [
|
||||
'label' => 'Name',
|
||||
]);
|
||||
$builder->add('c', TextType::class, [
|
||||
'label' => 'C',
|
||||
]);
|
||||
$builder->add('m', TextType::class, [
|
||||
'label' => 'M',
|
||||
]);
|
||||
$builder->add('y', TextType::class, [
|
||||
'label' => 'Y',
|
||||
]);
|
||||
$builder->add('k', TextType::class, [
|
||||
'label' => 'K',
|
||||
]);
|
||||
return $builder;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => \Plugin\Custom\PSC\CollectLayouter\Model\SpotColor::class,
|
||||
'allow_extra_fields' => true,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Plugin\Custom\PSC\CollectLayouter\Form;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\UX\LiveComponent\Form\Type\LiveCollectionType;
|
||||
|
||||
class SpotColors extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder->add('spotColors', LiveCollectionType::class, [
|
||||
'entry_type' => SpotColor::class,
|
||||
'entry_options' => ['label' => false],
|
||||
'label' => false,
|
||||
'allow_add' => true,
|
||||
'allow_delete' => true,
|
||||
'by_reference' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => \Plugin\Custom\PSC\CollectLayouter\Model\Setting::class,
|
||||
'allow_extra_fields' => true,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@ -11,92 +11,93 @@ use Twig\Environment;
|
||||
|
||||
class MPDF
|
||||
{
|
||||
private ?\Mpdf\Mpdf $mpdf = null;
|
||||
private null|\Mpdf\Mpdf $mpdf = null;
|
||||
private string $imageName;
|
||||
private string $pdfFile;
|
||||
private array $previewFiles;
|
||||
private Setting $setting;
|
||||
private ?Contact $contact = null;
|
||||
private null|Contact $contact = null;
|
||||
private array $data = [];
|
||||
|
||||
public function __construct(private DocumentManager $documentManager, private Environment $twig)
|
||||
{
|
||||
|
||||
}
|
||||
public function __construct(
|
||||
private DocumentManager $documentManager,
|
||||
private Environment $twig,
|
||||
) {}
|
||||
|
||||
private function init(): void
|
||||
{
|
||||
|
||||
$config = array_merge(
|
||||
[
|
||||
$config = array_merge([
|
||||
'mode' => 'utf-8',
|
||||
'format' => [$this->setting->getSheetWidth(), $this->setting->getSheetHeight()],
|
||||
'img_dpi' => 300,
|
||||
'tempDir' => sys_get_temp_dir()
|
||||
],
|
||||
$this->buildFontArray()
|
||||
);
|
||||
'tempDir' => sys_get_temp_dir(),
|
||||
], $this->buildFontArray());
|
||||
|
||||
$this->mpdf = new \Mpdf\Mpdf($config);
|
||||
foreach ($this->setting->getSpotColors() as $spotColor) {
|
||||
$this->mpdf->addSpotColor(
|
||||
$spotColor->getName(),
|
||||
$spotColor->getC(),
|
||||
$spotColor->getM(),
|
||||
$spotColor->getY(),
|
||||
$spotColor->getK(),
|
||||
);
|
||||
}
|
||||
$this->mpdf->PDFX = $this->setting->isPdfx();
|
||||
$this->mpdf->PDFXauto = true;
|
||||
$this->mpdf->useKerning = true;
|
||||
$this->mpdf->SetDisplayMode('fullpage');
|
||||
$this->imageName = sys_get_temp_dir() . '/' . uniqid();
|
||||
$this->pdfFile = $this->imageName . ".pdf";
|
||||
$this->pdfFile = $this->imageName . '.pdf';
|
||||
$this->previewFiles = [];
|
||||
}
|
||||
|
||||
public function clearTempFiles(): void
|
||||
{
|
||||
unlink($this->pdfFile);
|
||||
array_walk(
|
||||
$this->previewFiles,
|
||||
function ($file) {
|
||||
unlink($file);
|
||||
}
|
||||
);
|
||||
array_walk($this->previewFiles, function ($file) {
|
||||
unlink($file);
|
||||
});
|
||||
$this->previewFiles = [];
|
||||
$this->pdfFile = "";
|
||||
$this->pdfFile = '';
|
||||
}
|
||||
|
||||
private function buildPageCss(Setting $setting): string
|
||||
{
|
||||
$width = $setting->getWidth().'mm';
|
||||
$height = $setting->getHeight().'mm';
|
||||
$width = $setting->getWidth() . 'mm';
|
||||
$height = $setting->getHeight() . 'mm';
|
||||
|
||||
return <<<EOD
|
||||
@page {
|
||||
margin: 0mm;
|
||||
size: $width $height;
|
||||
marks: NONE;
|
||||
}
|
||||
EOD;
|
||||
|
||||
@page {
|
||||
margin: 0mm;
|
||||
size: {$width} {$height};
|
||||
marks: NONE;
|
||||
}
|
||||
EOD;
|
||||
}
|
||||
|
||||
private function buildFontArray(): array
|
||||
{
|
||||
$defaultConfig = (new \Mpdf\Config\ConfigVariables())->getDefaults();
|
||||
$defaultConfig = new \Mpdf\Config\ConfigVariables()->getDefaults();
|
||||
$fontDirs = $defaultConfig['fontDir'];
|
||||
|
||||
$defaultFontConfig = (new \Mpdf\Config\FontVariables())->getDefaults();
|
||||
$defaultFontConfig = new \Mpdf\Config\FontVariables()->getDefaults();
|
||||
$fontData = $defaultFontConfig['fontdata'];
|
||||
|
||||
$temp = [
|
||||
'fontDir' => $fontDirs,
|
||||
'fontdata' => $fontData
|
||||
'fontdata' => $fontData,
|
||||
];
|
||||
|
||||
foreach ($this->setting->getFonts() as $font) {
|
||||
if ($font->getName() != "") {
|
||||
if ($font->getFontR() != "") {
|
||||
if ($font->getName() != '') {
|
||||
if ($font->getFontR() != '') {
|
||||
$media = $this->documentManager->getRepository(Media::class)->find(new ObjectId($font->getFontR()));
|
||||
if ($media) {
|
||||
$filename = pathinfo('/data/www/new/web'. $media->getUrl());
|
||||
$filename = pathinfo('/data/www/new/web' . $media->getUrl());
|
||||
$temp['fontDir'][] = $filename['dirname'];
|
||||
$temp['fontdata'][$font->getName()] = [
|
||||
'R' => $filename['basename']
|
||||
'R' => $filename['basename'],
|
||||
];
|
||||
if ($font->getUseOtl() || $font->getUseOtl() === null) {
|
||||
$temp['fontdata'][$font->getName()]['useOTL'] = 0xFF;
|
||||
@ -126,13 +127,29 @@ EOD;
|
||||
public function generate(bool $print = false): void
|
||||
{
|
||||
$this->init();
|
||||
if ($this->setting->getBackgroundFile() && ((!$print && $this->setting->isDisplayBackgroundInPreview()) || ($print && $this->setting->isDisplayBackgroundInPrint()))) {
|
||||
$media = $this->documentManager->getRepository(Media::class)->find(new ObjectId($this->setting->getBackgroundFile()));
|
||||
$this->mpdf->SetDocTemplate('/data/www/new/web'. $media->getUrl());
|
||||
if (
|
||||
$this->setting->getBackgroundFile() &&
|
||||
(
|
||||
!$print && $this->setting->isDisplayBackgroundInPreview() ||
|
||||
$print && $this->setting->isDisplayBackgroundInPrint()
|
||||
)
|
||||
) {
|
||||
$media = $this->documentManager
|
||||
->getRepository(Media::class)
|
||||
->find(new ObjectId($this->setting->getBackgroundFile()));
|
||||
$this->mpdf->SetDocTemplate('/data/www/new/web' . $media->getUrl());
|
||||
}
|
||||
if ($this->setting->getBackgroundFile2() && ((!$print && $this->setting->isDisplayBackgroundInPreview2()) || ($print && $this->setting->isDisplayBackgroundInPrint2()))) {
|
||||
$media = $this->documentManager->getRepository(Media::class)->find(new ObjectId($this->setting->getBackgroundFile2()));
|
||||
$this->mpdf->SetDocTemplate('/data/www/new/web'. $media->getUrl());
|
||||
if (
|
||||
$this->setting->getBackgroundFile2() &&
|
||||
(
|
||||
!$print && $this->setting->isDisplayBackgroundInPreview2() ||
|
||||
$print && $this->setting->isDisplayBackgroundInPrint2()
|
||||
)
|
||||
) {
|
||||
$media = $this->documentManager
|
||||
->getRepository(Media::class)
|
||||
->find(new ObjectId($this->setting->getBackgroundFile2()));
|
||||
$this->mpdf->SetDocTemplate('/data/www/new/web' . $media->getUrl());
|
||||
}
|
||||
|
||||
$this->mpdf->WriteHTML($this->setting->getCss(), \Mpdf\HTMLParserMode::HEADER_CSS);
|
||||
@ -153,13 +170,13 @@ EOD;
|
||||
$im->setCompressionQuality(98);
|
||||
$im->SetColorspace(\Imagick::COLORSPACE_SRGB);
|
||||
$im->setResolution(300, 300);
|
||||
$im->readImage($this->pdfFile . "[" . $i . "]");
|
||||
$im->readImage($this->pdfFile . '[' . $i . ']');
|
||||
$im->thumbnailimage(800, 800, true);
|
||||
$im->mergeImageLayers(\imagick::LAYERMETHOD_FLATTEN);
|
||||
$im->setImageAlphaChannel(\imagick::ALPHACHANNEL_REMOVE);
|
||||
$im->setImageFormat('jpg');
|
||||
$im->writeimage($this->imageName . '_' . $i . ".jpeg");
|
||||
$this->previewFiles[] = $this->imageName . '_' . $i . ".jpeg"; // base64_encode(file_get_contents());
|
||||
$im->writeimage($this->imageName . '_' . $i . '.jpeg');
|
||||
$this->previewFiles[] = $this->imageName . '_' . $i . '.jpeg'; // base64_encode(file_get_contents());
|
||||
}
|
||||
}
|
||||
|
||||
@ -172,5 +189,4 @@ EOD;
|
||||
{
|
||||
return $this->pdfFile;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -5,70 +5,70 @@ namespace Plugin\Custom\PSC\CollectLayouter\Model;
|
||||
class Font
|
||||
{
|
||||
public function __construct(
|
||||
private ?string $name = "",
|
||||
private ?string $fontR = "",
|
||||
private ?string $fontB = "",
|
||||
private ?string $fontI = "",
|
||||
private ?string $fontBI = "",
|
||||
private ?bool $useOtl = true
|
||||
) {
|
||||
}
|
||||
private null|string $name = '',
|
||||
private null|string $fontR = '',
|
||||
private null|string $fontB = '',
|
||||
private null|string $fontI = '',
|
||||
private null|string $fontBI = '',
|
||||
private null|bool $useOtl = true,
|
||||
) {}
|
||||
|
||||
public function getName(): ?string
|
||||
public function getName(): null|string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setName(?string $name): void
|
||||
public function setName(null|string $name): void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function getFontR(): ?string
|
||||
public function getFontR(): null|string
|
||||
{
|
||||
return $this->fontR;
|
||||
}
|
||||
|
||||
public function setFontR(?string $fontR): void
|
||||
public function setFontR(null|string $fontR): void
|
||||
{
|
||||
$this->fontR = $fontR;
|
||||
}
|
||||
|
||||
public function getFontB(): ?string
|
||||
public function getFontB(): null|string
|
||||
{
|
||||
return $this->fontB;
|
||||
}
|
||||
|
||||
public function setFontB(?string $fontB): void
|
||||
public function setFontB(null|string $fontB): void
|
||||
{
|
||||
$this->fontB = $fontB;
|
||||
}
|
||||
|
||||
public function getFontI(): ?string
|
||||
public function getFontI(): null|string
|
||||
{
|
||||
return $this->fontI;
|
||||
}
|
||||
|
||||
public function setFontI(?string $fontI): void
|
||||
public function setFontI(null|string $fontI): void
|
||||
{
|
||||
$this->fontI = $fontI;
|
||||
}
|
||||
|
||||
public function getFontBI(): ?string
|
||||
public function getFontBI(): null|string
|
||||
{
|
||||
return $this->fontBI;
|
||||
}
|
||||
|
||||
public function setFontBI(?string $fontBI): void
|
||||
public function setFontBI(null|string $fontBI): void
|
||||
{
|
||||
$this->fontBI = $fontBI;
|
||||
}
|
||||
|
||||
public function getUseOtl(): ?bool
|
||||
public function getUseOtl(): null|bool
|
||||
{
|
||||
return $this->useOtl;
|
||||
}
|
||||
public function setUseOtl(?bool $useOtl): void
|
||||
|
||||
public function setUseOtl(null|bool $useOtl): void
|
||||
{
|
||||
$this->useOtl = $useOtl;
|
||||
}
|
||||
|
||||
@ -5,11 +5,15 @@ namespace Plugin\Custom\PSC\CollectLayouter\Model;
|
||||
class Setting
|
||||
{
|
||||
/**
|
||||
* @var \Plugin\Custom\PSC\CollectLayouter\Model\Font[]
|
||||
* @var \Plugin\Custom\PSC\CollectLayouter\Model\SpotColor[]
|
||||
*/
|
||||
private array $spotColors = [];
|
||||
/**
|
||||
* @var \Plugin\Custom\PSC\CollectLayouter\Model\Font[]
|
||||
*/
|
||||
private array $fonts = [];
|
||||
/**
|
||||
* @var \Plugin\Custom\PSC\CollectLayouter\Model\Element[]
|
||||
* @var \Plugin\Custom\PSC\CollectLayouter\Model\Element[]
|
||||
*/
|
||||
private array $customerForm = [];
|
||||
private int $width = 0;
|
||||
@ -17,12 +21,12 @@ class Setting
|
||||
private int $sheetWidth = 0;
|
||||
private int $sheetHeight = 0;
|
||||
private bool $pdfx = true;
|
||||
private string $html = "";
|
||||
private string $css = "";
|
||||
private string $backgroundFile = "";
|
||||
private string $backgroundFile2 = "";
|
||||
private string $basketField1Format = "";
|
||||
private string $basketField2Format = "";
|
||||
private string $html = '';
|
||||
private string $css = '';
|
||||
private string $backgroundFile = '';
|
||||
private string $backgroundFile2 = '';
|
||||
private string $basketField1Format = '';
|
||||
private string $basketField2Format = '';
|
||||
private bool $displayBackgroundInPreview = true;
|
||||
private bool $displayBackgroundInPreview2 = false;
|
||||
private bool $displayBackgroundInPrint = true;
|
||||
@ -130,6 +134,16 @@ class Setting
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setSpotColors(array $colors): void
|
||||
{
|
||||
$this->spotColors = $colors;
|
||||
}
|
||||
|
||||
public function getSpotColors(): array
|
||||
{
|
||||
return $this->spotColors;
|
||||
}
|
||||
|
||||
public function setFonts(array $fonts): void
|
||||
{
|
||||
$this->fonts = $fonts;
|
||||
@ -182,7 +196,7 @@ class Setting
|
||||
|
||||
public function isDownloadPrintInReview(): bool
|
||||
{
|
||||
return (bool)$this->downloadPrintInReview;
|
||||
return (bool) $this->downloadPrintInReview;
|
||||
}
|
||||
|
||||
public function setDownloadPrintInReview(bool $downloadPrintInReview): void
|
||||
@ -192,7 +206,7 @@ class Setting
|
||||
|
||||
public function isDisplayBackgroundInPrint(): bool
|
||||
{
|
||||
return (bool)$this->displayBackgroundInPrint;
|
||||
return (bool) $this->displayBackgroundInPrint;
|
||||
}
|
||||
|
||||
public function setDisplayBackgroundInPrint(bool $displayBackgroundInPrint): void
|
||||
@ -202,7 +216,7 @@ class Setting
|
||||
|
||||
public function isDisplayBackgroundInPreview(): bool
|
||||
{
|
||||
return (bool)$this->displayBackgroundInPreview;
|
||||
return (bool) $this->displayBackgroundInPreview;
|
||||
}
|
||||
|
||||
public function setDisplayBackgroundInPreview(bool $displayBackgroundInPreview): void
|
||||
@ -212,7 +226,7 @@ class Setting
|
||||
|
||||
public function getBackgroundFile2(): string
|
||||
{
|
||||
return (string)$this->backgroundFile2;
|
||||
return (string) $this->backgroundFile2;
|
||||
}
|
||||
|
||||
public function setBackgroundFile2(string $backgroundFile2): void
|
||||
@ -222,7 +236,7 @@ class Setting
|
||||
|
||||
public function isDisplayBackgroundInPreview2(): bool
|
||||
{
|
||||
return (bool)$this->displayBackgroundInPreview2;
|
||||
return (bool) $this->displayBackgroundInPreview2;
|
||||
}
|
||||
|
||||
public function setDisplayBackgroundInPreview2(bool $displayBackgroundInPreview2): void
|
||||
@ -232,7 +246,7 @@ class Setting
|
||||
|
||||
public function isDisplayBackgroundInPrint2(): bool
|
||||
{
|
||||
return (bool)$this->displayBackgroundInPrint2;
|
||||
return (bool) $this->displayBackgroundInPrint2;
|
||||
}
|
||||
|
||||
public function setDisplayBackgroundInPrint2(bool $displayBackgroundInPrint2): void
|
||||
@ -242,10 +256,8 @@ class Setting
|
||||
|
||||
public function getListSetting(): array
|
||||
{
|
||||
return array_filter(
|
||||
$this->customerForm, function ($item) {
|
||||
return $item->getList();
|
||||
}
|
||||
);
|
||||
return array_filter($this->customerForm, function ($item) {
|
||||
return $item->getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace Plugin\Custom\PSC\CollectLayouter\Model;
|
||||
|
||||
class SpotColor
|
||||
{
|
||||
public function __construct(
|
||||
private null|string $name = '',
|
||||
private null|string $c = '',
|
||||
private null|string $m = '',
|
||||
private null|string $y = '',
|
||||
private null|string $k = '',
|
||||
) {}
|
||||
|
||||
public function getName(): null|string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setName(null|string $name): void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function getC(): null|string
|
||||
{
|
||||
return $this->c;
|
||||
}
|
||||
|
||||
public function setC(null|string $value): void
|
||||
{
|
||||
$this->c = $value;
|
||||
}
|
||||
|
||||
public function getM(): null|string
|
||||
{
|
||||
return $this->m;
|
||||
}
|
||||
|
||||
public function setM(null|string $value): void
|
||||
{
|
||||
$this->m = $value;
|
||||
}
|
||||
|
||||
public function getY(): null|string
|
||||
{
|
||||
return $this->y;
|
||||
}
|
||||
|
||||
public function setY(null|string $value): void
|
||||
{
|
||||
$this->y = $value;
|
||||
}
|
||||
|
||||
public function getK(): null|string
|
||||
{
|
||||
return $this->k;
|
||||
}
|
||||
|
||||
public function setK(null|string $value): void
|
||||
{
|
||||
$this->k = $value;
|
||||
}
|
||||
}
|
||||
@ -56,6 +56,16 @@
|
||||
aria-controls="fonts"
|
||||
aria-selected="false">Fonts</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link"
|
||||
id="spots-tab"
|
||||
data-bs-toggle="tab"
|
||||
data-bs-target="#spots"
|
||||
type="button"
|
||||
role="tab"
|
||||
aria-controls="spots"
|
||||
aria-selected="false">Spot Colors</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane active"
|
||||
@ -302,6 +312,15 @@
|
||||
setting: setting
|
||||
}) }}
|
||||
</div>
|
||||
<div class="tab-pane"
|
||||
id="spots"
|
||||
role="tabpanel"
|
||||
aria-labelledby="spots-tab">
|
||||
{{ component('SpotColorsForm', {
|
||||
form: spotColorsForm,
|
||||
setting: setting
|
||||
}) }}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@ -0,0 +1,60 @@
|
||||
{% form_theme form 'bootstrap_5_layout.html.twig' %}
|
||||
<div
|
||||
{{ attributes }}
|
||||
>
|
||||
{{ form_start(form) }}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>c</td>
|
||||
<td>m</td>
|
||||
<td>y</td>
|
||||
<td>k</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for key, itemForm in form.spotColors %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ form_row(itemForm.name, {
|
||||
label: false
|
||||
}) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ form_row(itemForm.c, {
|
||||
label: false
|
||||
}) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ form_row(itemForm.m, {
|
||||
label: false
|
||||
}) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ form_row(itemForm.y, {
|
||||
label: false
|
||||
}) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ form_row(itemForm.k, {
|
||||
label: false
|
||||
}) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ form_row(itemForm.vars.button_delete, { label: 'X', attr: { class: 'btn btn-sm btn-danger' } }) }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<hr class="mb-3 mt-3"/>
|
||||
{{ form_widget(form.spotColors.vars.button_add, { label: '+ Add Color', attr: { class: 'btn btn-sm btn-info' } }) }}
|
||||
<div class="">
|
||||
<button type="submit" class="btn btn-sm btn-success" formnovalidate>Save</button>
|
||||
</div>
|
||||
{{ form_row(form._token) }}
|
||||
{{ form_end(form, {'render_rest' : false}) }}
|
||||
</div>
|
||||
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Plugin\Custom\PSC\CollectLayouter\Twig;
|
||||
|
||||
use Plugin\Custom\PSC\CollectLayouter\Form\SpotColors;
|
||||
use Plugin\Custom\PSC\CollectLayouter\Model\Setting;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
|
||||
use Symfony\UX\LiveComponent\Attribute\LiveProp;
|
||||
use Symfony\UX\LiveComponent\DefaultActionTrait;
|
||||
use Symfony\UX\LiveComponent\LiveCollectionTrait;
|
||||
|
||||
#[AsLiveComponent(template: '@PluginCustomPSCCollectLayouter/components/SpotColorsForm.html.twig')]
|
||||
class SpotColorsForm extends AbstractController
|
||||
{
|
||||
use DefaultActionTrait;
|
||||
use LiveCollectionTrait;
|
||||
|
||||
#[LiveProp(fieldName: 'formValues', useSerializerForHydration: true)]
|
||||
public Setting $setting;
|
||||
|
||||
protected function instantiateForm(): FormInterface
|
||||
{
|
||||
return $this->createForm(SpotColors::class, $this->setting);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
|
||||
namespace Plugin\Custom\PSC\FormBuilder\Controller\Backend;
|
||||
|
||||
use Gesdinet\JWTRefreshTokenBundle\Generator\RefreshTokenGeneratorInterface;
|
||||
use Gesdinet\JWTRefreshTokenBundle\Model\RefreshTokenManagerInterface;
|
||||
use Lexik\Bundle\JWTAuthenticationBundle\Services\JWTTokenManagerInterface;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
|
||||
@ -14,8 +16,17 @@ class ProductController extends AbstractController
|
||||
#[Template]
|
||||
#[Security("is_granted('ROLE_USER')")]
|
||||
#[Route(path: '/edit', name: 'psc_backend_invoice_index_create')]
|
||||
public function edit(JWTTokenManagerInterface $jwtManager)
|
||||
{
|
||||
return ['jwt' => $jwtManager->create($this->getUser())];
|
||||
public function edit(
|
||||
JWTTokenManagerInterface $jwtManager,
|
||||
RefreshTokenGeneratorInterface $refreshTokenGenerator,
|
||||
RefreshTokenManagerInterface $refreshTokenManager,
|
||||
) {
|
||||
$refreshToken = $refreshTokenGenerator->createForUserWithTtl($this->getUser(), 2592000);
|
||||
|
||||
$refreshTokenManager->save($refreshToken);
|
||||
return [
|
||||
'jwt' => $jwtManager->create($this->getUser()),
|
||||
'refresh_token' => $refreshToken,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
"name": "my-vue-app",
|
||||
"dependencies": {
|
||||
"@codemirror/lang-json": "^6.0.2",
|
||||
"@codemirror/lang-php": "^6.0.2",
|
||||
"@codemirror/lang-xml": "^6.1.0",
|
||||
"@tailwindcss/vite": "^4.1.10",
|
||||
"@vueuse/core": "^13.5.0",
|
||||
@ -23,7 +24,6 @@
|
||||
"vue-codemirror": "^6.1.1",
|
||||
"vue-draggable-plus": "^0.6.0",
|
||||
"vue-i18n": "^11.1.9",
|
||||
"xml-beautify": "^1.2.3",
|
||||
"xml-formatter": "^3.6.6",
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -104,8 +104,16 @@
|
||||
|
||||
"@codemirror/commands": ["@codemirror/commands@6.8.1", "", { "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.4.0", "@codemirror/view": "^6.27.0", "@lezer/common": "^1.1.0" } }, "sha512-KlGVYufHMQzxbdQONiLyGQDUW0itrLZwq3CcY7xpv9ZLRHqzkBSoteocBHtMCoY7/Ci4xhzSrToIeLg7FxHuaw=="],
|
||||
|
||||
"@codemirror/lang-css": ["@codemirror/lang-css@6.3.1", "", { "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.0.0", "@lezer/common": "^1.0.2", "@lezer/css": "^1.1.7" } }, "sha512-kr5fwBGiGtmz6l0LSJIbno9QrifNMUusivHbnA1H6Dmqy4HZFte3UAICix1VuKo0lMPKQr2rqB+0BkKi/S3Ejg=="],
|
||||
|
||||
"@codemirror/lang-html": ["@codemirror/lang-html@6.4.9", "", { "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/lang-css": "^6.0.0", "@codemirror/lang-javascript": "^6.0.0", "@codemirror/language": "^6.4.0", "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0", "@lezer/css": "^1.1.0", "@lezer/html": "^1.3.0" } }, "sha512-aQv37pIMSlueybId/2PVSP6NPnmurFDVmZwzc7jszd2KAF8qd4VBbvNYPXWQq90WIARjsdVkPbw29pszmHws3Q=="],
|
||||
|
||||
"@codemirror/lang-javascript": ["@codemirror/lang-javascript@6.2.4", "", { "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/language": "^6.6.0", "@codemirror/lint": "^6.0.0", "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0", "@lezer/javascript": "^1.0.0" } }, "sha512-0WVmhp1QOqZ4Rt6GlVGwKJN3KW7Xh4H2q8ZZNGZaP6lRdxXJzmjm4FqvmOojVj6khWJHIb9sp7U/72W7xQgqAA=="],
|
||||
|
||||
"@codemirror/lang-json": ["@codemirror/lang-json@6.0.2", "", { "dependencies": { "@codemirror/language": "^6.0.0", "@lezer/json": "^1.0.0" } }, "sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ=="],
|
||||
|
||||
"@codemirror/lang-php": ["@codemirror/lang-php@6.0.2", "", { "dependencies": { "@codemirror/lang-html": "^6.0.0", "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.0.0", "@lezer/common": "^1.0.0", "@lezer/php": "^1.0.0" } }, "sha512-ZKy2v1n8Fc8oEXj0Th0PUMXzQJ0AIR6TaZU+PbDHExFwdu+guzOA4jmCHS1Nz4vbFezwD7LyBdDnddSJeScMCA=="],
|
||||
|
||||
"@codemirror/lang-xml": ["@codemirror/lang-xml@6.1.0", "", { "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/language": "^6.4.0", "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.0.0", "@lezer/common": "^1.0.0", "@lezer/xml": "^1.0.0" } }, "sha512-3z0blhicHLfwi2UgkZYRPioSgVTo9PV5GP5ducFH6FaHy0IAJRg+ixj5gTR1gnT/glAIC8xv4w2VL1LoZfs+Jg=="],
|
||||
|
||||
"@codemirror/language": ["@codemirror/language@6.11.2", "", { "dependencies": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.23.0", "@lezer/common": "^1.1.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0", "style-mod": "^4.0.0" } }, "sha512-p44TsNArL4IVXDTbapUmEkAlvWs2CFQbcfc0ymDsis1kH2wh0gcY96AS29c/vp2d0y2Tquk1EDSaawpzilUiAw=="],
|
||||
@ -200,12 +208,20 @@
|
||||
|
||||
"@lezer/common": ["@lezer/common@1.2.3", "", {}, "sha512-w7ojc8ejBqr2REPsWxJjrMFsA/ysDCFICn8zEOR9mrqzOu2amhITYuLD8ag6XZf0CFXDrhKqw7+tW8cX66NaDA=="],
|
||||
|
||||
"@lezer/css": ["@lezer/css@1.3.0", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.3.0" } }, "sha512-pBL7hup88KbI7hXnZV3PQsn43DHy6TWyzuyk2AO9UyoXcDltvIdqWKE1dLL/45JVZ+YZkHe1WVHqO6wugZZWcw=="],
|
||||
|
||||
"@lezer/highlight": ["@lezer/highlight@1.2.1", "", { "dependencies": { "@lezer/common": "^1.0.0" } }, "sha512-Z5duk4RN/3zuVO7Jq0pGLJ3qynpxUVsh7IbUbGj88+uV2ApSAn6kWg2au3iJb+0Zi7kKtqffIESgNcRXWZWmSA=="],
|
||||
|
||||
"@lezer/html": ["@lezer/html@1.3.10", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0" } }, "sha512-dqpT8nISx/p9Do3AchvYGV3qYc4/rKr3IBZxlHmpIKam56P47RSHkSF5f13Vu9hebS1jM0HmtJIwLbWz1VIY6w=="],
|
||||
|
||||
"@lezer/javascript": ["@lezer/javascript@1.5.1", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.1.3", "@lezer/lr": "^1.3.0" } }, "sha512-ATOImjeVJuvgm3JQ/bpo2Tmv55HSScE2MTPnKRMRIPx2cLhHGyX2VnqpHhtIV1tVzIjZDbcWQm+NCTF40ggZVw=="],
|
||||
|
||||
"@lezer/json": ["@lezer/json@1.0.3", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0" } }, "sha512-BP9KzdF9Y35PDpv04r0VeSTKDeox5vVr3efE7eBbx3r4s3oNLfunchejZhjArmeieBH+nVOpgIiBJpEAv8ilqQ=="],
|
||||
|
||||
"@lezer/lr": ["@lezer/lr@1.4.2", "", { "dependencies": { "@lezer/common": "^1.0.0" } }, "sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA=="],
|
||||
|
||||
"@lezer/php": ["@lezer/php@1.0.4", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.1.0" } }, "sha512-D2dJ0t8Z28/G1guztRczMFvPDUqzeMLSQbdWQmaiHV7urc8NlEOnjYk9UrZ531OcLiRxD4Ihcbv7AsDpNKDRaQ=="],
|
||||
|
||||
"@lezer/xml": ["@lezer/xml@1.0.6", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0" } }, "sha512-CdDwirL0OEaStFue/66ZmFSeppuL6Dwjlk8qk153mSQwiSH/Dlri4GNymrNWnUmPl2Um7QfV1FO9KFUyX3Twww=="],
|
||||
|
||||
"@marijn/find-cluster-break": ["@marijn/find-cluster-break@1.0.2", "", {}, "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g=="],
|
||||
@ -630,8 +646,6 @@
|
||||
|
||||
"which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
|
||||
|
||||
"xml-beautify": ["xml-beautify@1.2.3", "", {}, "sha512-VsYpkqoVawIP84pi00XukPsgQHqOhgrpwTHlXqqRMAgYZ1u+Yw3KHIUhO1Igf19d5CQ5h6ExJT1hFCJRLmzADg=="],
|
||||
|
||||
"xml-formatter": ["xml-formatter@3.6.6", "", { "dependencies": { "xml-parser-xo": "^4.1.4" } }, "sha512-yfofQht42x2sN1YThT6Er6GFXiQinfDAsMTNvMPi2uZw5/Vtc2PYHfvALR8U+b2oN2ekBxLd2tGWV06rAM8nQA=="],
|
||||
|
||||
"xml-parser-xo": ["xml-parser-xo@4.1.4", "", {}, "sha512-wo+yWDNeMwd1ctzH4CsiGXaAappDsxuR+VnmPewOzHk/zvefksT2ZlcWpAePl11THOWgnIZM4GjvumevurNWZw=="],
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
"dependencies": {
|
||||
"@codemirror/lang-json": "^6.0.2",
|
||||
"@codemirror/lang-xml": "^6.1.0",
|
||||
"@codemirror/lang-php": "^6.0.2",
|
||||
"@tailwindcss/vite": "^4.1.10",
|
||||
"@vueuse/core": "^13.5.0",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
|
||||
@ -1,17 +1,16 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
import { Codemirror } from 'vue-codemirror'
|
||||
import { xml } from '@codemirror/lang-xml'
|
||||
import { php } from '@codemirror/lang-php'
|
||||
import { useGlobalStore } from '../../stores/Global'
|
||||
import xmlFormat from 'xml-formatter'
|
||||
import { debounce } from 'ts-debounce'
|
||||
import { Button } from '../ui/button'
|
||||
|
||||
const store = useGlobalStore();
|
||||
|
||||
const xmlString = ref(xmlFormat(store.formel))
|
||||
const xmlString = ref(store.formulas)
|
||||
|
||||
const extensions = [xml()];
|
||||
const extensions = [php({plain: true})];
|
||||
|
||||
const cmOptions = {
|
||||
lineNumbers: true,
|
||||
@ -19,8 +18,8 @@ const cmOptions = {
|
||||
theme: 'default',
|
||||
};
|
||||
|
||||
watch(xmlString, (formel) => {
|
||||
store.formel = formel
|
||||
watch(xmlString, (formulas) => {
|
||||
store.formulas = formulas
|
||||
})
|
||||
|
||||
function manualSync() {
|
||||
|
||||
@ -9,7 +9,7 @@ import { Button } from '../ui/button'
|
||||
|
||||
const store = useGlobalStore();
|
||||
|
||||
const xmlString = ref(xmlFormat(store.paperdb))
|
||||
const xmlString = ref(xmlFormat(store.paperContainer))
|
||||
|
||||
const extensions = [xml()];
|
||||
|
||||
@ -19,8 +19,8 @@ const cmOptions = {
|
||||
theme: 'default',
|
||||
};
|
||||
|
||||
watch(xmlString, (paperdb) => {
|
||||
store.paperdb = paperdb
|
||||
watch(xmlString, (paperContainer) => {
|
||||
store.paperContainer = paperContainer
|
||||
})
|
||||
|
||||
function manualSync() {
|
||||
|
||||
@ -1,17 +1,16 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
import { Codemirror } from 'vue-codemirror'
|
||||
import { xml } from '@codemirror/lang-xml'
|
||||
import { php } from '@codemirror/lang-php'
|
||||
import { useGlobalStore } from '../../stores/Global'
|
||||
import xmlFormat from 'xml-formatter'
|
||||
import { debounce } from 'ts-debounce'
|
||||
import { Button } from '../ui/button'
|
||||
|
||||
const store = useGlobalStore();
|
||||
|
||||
const xmlString = ref(xmlFormat(store.parameter))
|
||||
const xmlString = ref(store.parameter)
|
||||
|
||||
const extensions = [xml()];
|
||||
const extensions = [php({plain: true})];
|
||||
|
||||
const cmOptions = {
|
||||
lineNumbers: true,
|
||||
|
||||
@ -7,7 +7,7 @@ const globalStore = useGlobalStore()
|
||||
const itemStore = useItemStore()
|
||||
|
||||
function manualSave() {
|
||||
globalStore.manualSave(itemStore.loadJSON())
|
||||
globalStore.manualSave()
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ import { useGlobalStore } from '../../../stores/Global'
|
||||
import InputElement from '../../../model/InputElement'
|
||||
import SelectElement from '../../../model/SelectElement'
|
||||
import MediaElement from '../../../model/MediaElement'
|
||||
import FieldsetElement from '../../../model/FieldsetElement'
|
||||
import HiddenElement from '../../../model/HiddenElement'
|
||||
import TextElement from '../../../model/TextElement'
|
||||
import Row from '../../../model/Row'
|
||||
@ -11,6 +12,7 @@ import HeadlineElement from '../../../model/HeadlineElement'
|
||||
import InputElementProperties from '../properties/InputElement.vue'
|
||||
import SelectElementProperties from '../properties/SelectElement.vue'
|
||||
import MediaElementProperties from '../properties/MediaElement.vue'
|
||||
import FieldsetElementProperties from '../properties/FieldsetElement.vue'
|
||||
import HiddenElementProperties from '../properties/HiddenElement.vue'
|
||||
import TextElementProperties from '../properties/TextElement.vue'
|
||||
import TextareaElementProperties from '../properties/TextareaElement.vue'
|
||||
@ -81,6 +83,12 @@ watch(openModal, (newOpenModal) => {
|
||||
>
|
||||
</TextElementProperties>
|
||||
|
||||
<FieldsetElementProperties
|
||||
v-if="globalStore.getActiveItem.type === 12"
|
||||
v-model="globalStore.getActiveItem as FieldsetElement"
|
||||
>
|
||||
</FieldsetElementProperties>
|
||||
|
||||
<SelectElementProperties
|
||||
v-if="globalStore.getActiveItem.type === 3"
|
||||
v-model="globalStore.getActiveItem as SelectElement"
|
||||
|
||||
@ -1,3 +1,20 @@
|
||||
<script lang="ts" setup>
|
||||
import { BetweenVerticalStart } from 'lucide-vue-next';
|
||||
import Row from '../../../model/Row';
|
||||
import Column from '../../../model/Column';
|
||||
|
||||
interface Props {
|
||||
row: Row
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
||||
function addColumn(row: Row) {
|
||||
row.addColumnAtTheEnd(new Column())
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div class="p-5 m-2 h-full text-center">Empty</div>
|
||||
<div @click="addColumn(props.row)" class="flex h-full justify-center">
|
||||
<span class=" font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"><BetweenVerticalStart /></span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -0,0 +1,75 @@
|
||||
<script lang="ts" setup>
|
||||
import Fieldset from '../../../model/Fieldset';
|
||||
import BaseElement from '../../../model/BaseElement';
|
||||
import { ref, computed } from 'vue';
|
||||
import EmptyElementForm from './EmptyElementForm.vue'
|
||||
import { RenderElements } from './../renderelements'
|
||||
import { useItemStore } from '../../../stores/Items'
|
||||
import { useGlobalStore } from '../../../stores/Global'
|
||||
import Parser from '../../../lib/parser'
|
||||
import { CirclePlus } from 'lucide-vue-next';
|
||||
|
||||
interface Props {
|
||||
modelValue: Fieldset
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
||||
let emit = defineEmits(['update:modelValue']);
|
||||
const dragUuid = ref("");
|
||||
let isPreview = ref(false)
|
||||
|
||||
const itemStore = useItemStore()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const theModel = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (value) => emit('update:modelValue', value),
|
||||
});
|
||||
|
||||
const onDrop = (event: DragEvent, targetUuid: string, fieldset: Fieldset) => {
|
||||
if(globalStore.getDragMode == "insert") {
|
||||
const itemId = Number(event.dataTransfer?.getData('itemId'));
|
||||
|
||||
fieldset.items.push(Parser.getModelForType(itemId))
|
||||
globalStore.setDragMode("")
|
||||
event.stopImmediatePropagation()
|
||||
}
|
||||
}
|
||||
|
||||
const dragLeaveEmpty = (event: DragEvent, uuid: string) => {
|
||||
dragUuid.value = ""
|
||||
event.stopImmediatePropagation()
|
||||
}
|
||||
|
||||
globalStore.$subscribe((mutation, state) => {
|
||||
if(state.showPreview) {
|
||||
isPreview.value = true
|
||||
}else{
|
||||
isPreview.value = false
|
||||
}
|
||||
})
|
||||
|
||||
const dragEnterEmpty = (event: DragEvent, uuid: string) => {
|
||||
dragUuid.value = uuid
|
||||
event.stopImmediatePropagation()
|
||||
if(globalStore.getDragMode == "sort" && uuid != globalStore.getSourceDragUuid) {
|
||||
event.stopImmediatePropagation()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<fieldset class="fieldset bg-base-200 border-base-300 rounded-box w-full border p-4">
|
||||
<legend v-if="theModel!.name != ''" class="fieldset-legend">{{ theModel!.name}}</legend>
|
||||
<div class="h-8 group items-center content-justify w-full mb-2" v-if="theModel!.items.length == 0" @drop="onDrop($event, theModel!.uuid, theModel!)" @dragleave="dragLeaveEmpty($event)" @dragenter="dragEnterEmpty($event)">
|
||||
<div class="inline-flex items-center justify-center w-full pointer-events-none">
|
||||
<hr class="w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none" :class="{ 'bg-orange-500': dragUuid == theModel!.uuid }" >
|
||||
<span class="absolute px-3 font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"><CirclePlus :class="{ 'text-orange-500': dragUuid == theModel!.uuid }" class="transition duration-200 pointer-events-none" /></span>
|
||||
</div>
|
||||
</div>
|
||||
<RenderElements
|
||||
v-if="theModel!.items.length > 0"
|
||||
v-bind:items="theModel!.items"/>
|
||||
</fieldset>
|
||||
</template>
|
||||
@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import MediaElement from '../../../model/MediaElement';
|
||||
import { computed } from 'vue';
|
||||
import { fetchMediaDirectories, uploadFile } from '../../../lib/api';
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
|
||||
interface Props {
|
||||
modelValue: MediaElement
|
||||
@ -13,6 +13,62 @@ const theModel = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (value) => emit('update:modelValue', value),
|
||||
});
|
||||
|
||||
const uploadProgress = ref(0);
|
||||
const isDragging = ref(false);
|
||||
const directories = ref<string[]>([]);
|
||||
const selectedDirectory = ref<string>('');
|
||||
|
||||
const onDragOver = () => {
|
||||
isDragging.value = true;
|
||||
};
|
||||
|
||||
const onDragLeave = () => {
|
||||
isDragging.value = false;
|
||||
};
|
||||
|
||||
const onDrop = (event: DragEvent) => {
|
||||
isDragging.value = false;
|
||||
const files = event.dataTransfer?.files;
|
||||
if (files && files.length > 0) {
|
||||
handleFile(files[0]);
|
||||
}
|
||||
};
|
||||
|
||||
const onFileChange = (event: Event) => {
|
||||
const target = event.target as HTMLInputElement;
|
||||
const files = target.files;
|
||||
if (files && files.length > 0) {
|
||||
handleFile(files[0]);
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
directories.value = await fetchMediaDirectories();
|
||||
if (directories.value.length > 0) {
|
||||
selectedDirectory.value = directories.value[0];
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch directories', error);
|
||||
}
|
||||
});
|
||||
|
||||
const handleFile = async (file: File) => {
|
||||
uploadProgress.value = 0;
|
||||
try {
|
||||
await uploadFile(file, (progress) => {
|
||||
uploadProgress.value = progress;
|
||||
});
|
||||
console.log('Upload successful');
|
||||
// Handle successful upload
|
||||
} catch (error) {
|
||||
console.error('Upload failed', error);
|
||||
// Handle failed upload
|
||||
} finally {
|
||||
setTimeout(() => (uploadProgress.value = 0), 2000);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
@ -20,5 +76,50 @@ const theModel = computed({
|
||||
<template>
|
||||
<div class="flex gap-2 flex-row">
|
||||
<label class="w-60 flex-inital">{{theModel.name}}</label>
|
||||
<div
|
||||
class="flex items-center justify-center w-full"
|
||||
@dragover.prevent="onDragOver"
|
||||
@dragleave.prevent="onDragLeave"
|
||||
@drop.prevent="onDrop"
|
||||
:class="{ 'border-blue-500': isDragging }"
|
||||
>
|
||||
<label
|
||||
for="dropzone-file"
|
||||
class="flex flex-col items-center justify-center w-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600"
|
||||
>
|
||||
<div class="flex flex-col items-center justify-center pt-5 pb-6">
|
||||
<svg
|
||||
class="w-8 h-8 mb-4 text-gray-500 dark:text-gray-400"
|
||||
aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 20 16"
|
||||
>
|
||||
<path
|
||||
stroke="currentColor"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
d="M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"
|
||||
/>
|
||||
</svg>
|
||||
<p class="mb-2 text-sm text-gray-500 dark:text-gray-400">
|
||||
<span class="font-semibold">Click to upload</span> or drag and drop
|
||||
</p>
|
||||
<p class="text-xs text-gray-500 dark:text-gray-400">
|
||||
SVG, PNG, JPG or GIF (MAX. 800x400px)
|
||||
</p>
|
||||
</div>
|
||||
<input id="dropzone-file" type="file" class="hidden" @change="onFileChange" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="flex items-center justify-center w-full">
|
||||
<select v-model="selectedDirectory" class="w-full p-2 border rounded-md">
|
||||
<option v-for="dir in directories" :key="dir" :value="dir">{{ dir }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div v-if="uploadProgress > 0" class="w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700">
|
||||
<div class="bg-blue-600 h-2.5 rounded-full" :style="{ width: uploadProgress + '%' }"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -8,7 +8,7 @@ import { RenderElements } from './../renderelements'
|
||||
import { useItemStore } from '../../../stores/Items'
|
||||
import { useGlobalStore } from '../../../stores/Global'
|
||||
import Parser from '../../../lib/parser'
|
||||
import { CirclePlus } from 'lucide-vue-next';
|
||||
import { Delete, BetweenVerticalStart, CirclePlus } from 'lucide-vue-next';
|
||||
|
||||
interface Props {
|
||||
modelValue: Row
|
||||
@ -68,25 +68,54 @@ const dragEnterEmpty = (event: DragEvent, uuid: string) => {
|
||||
event.stopImmediatePropagation()
|
||||
}
|
||||
}
|
||||
|
||||
const addColumn = (mode: int, model: Row, uuid: string) => {
|
||||
|
||||
if(mode == 1) {
|
||||
model.addColumnAtTheBeginning(new Column());
|
||||
}
|
||||
if(mode == 2) {
|
||||
model.addColumnAtTheEnd(new Column());
|
||||
}
|
||||
if(mode == 3) {
|
||||
model.addColumnAt(new Column(), uuid);
|
||||
}
|
||||
}
|
||||
const deleteColumn = (row: Row, targetUuid: string) => {
|
||||
row.deleteColumnAt(targetUuid);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex gap-2 flex-col">
|
||||
<div class="w-full flex flex-row gap-1" v-if="theModel!.columns.length > 0">
|
||||
<div :class="{border: !isPreview}" class="flex-1 p-1 bg-white" v-for="col in theModel!.columns">
|
||||
<div class="h-8 group items-center content-justify w-full mb-2" v-if="col.items.length == 0" @drop="onDrop($event, theModel!.uuid, col)" @dragleave="dragLeaveEmpty($event, col.uuid)" @dragenter="dragEnterEmpty($event, col.uuid)">
|
||||
<div class="inline-flex items-center justify-center w-full pointer-events-none">
|
||||
<hr class="w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none" :class="{ 'bg-orange-500': dragUuid == col.uuid }" >
|
||||
<span class="absolute px-3 font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"><CirclePlus :class="{ 'text-orange-500': dragUuid == col.uuid }" class="transition duration-200 pointer-events-none" /></span>
|
||||
<div class="w-full flex flex-row gap-1 h-full" v-if="theModel!.columns.length > 0">
|
||||
<div @click="addColumn(1, theModel!, '')" v-if="!isPreview" class="flex h-full justify-center place-self-center">
|
||||
<span class=" font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"><BetweenVerticalStart /></span>
|
||||
</div>
|
||||
<div class="flex w-full h-auto" v-for="col in theModel!.columns">
|
||||
<div :class="{border: !isPreview}" class="flex-1 p-1 bg-white" >
|
||||
<div class="h-8 group items-center content-justify w-full mb-2" v-if="!isPreview && col.items.length == 0" @drop="onDrop($event, theModel!.uuid, col)" @dragleave="dragLeaveEmpty($event, col.uuid)" @dragenter="dragEnterEmpty($event, col.uuid)">
|
||||
<div class="inline-flex items-center justify-center w-full pointer-events-none">
|
||||
<hr class="w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none" :class="{ 'bg-orange-500': dragUuid == col.uuid }" >
|
||||
<span class="absolute px-3 font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"><CirclePlus :class="{ 'text-orange-500': dragUuid == col.uuid }" class="transition duration-200 pointer-events-none" /></span>
|
||||
</div>
|
||||
</div>
|
||||
<RenderElements
|
||||
@drop="onDrop($event, theModel!.uuid, col)"
|
||||
v-if="col.items.length > 0"
|
||||
v-bind:items="col.items"/>
|
||||
</div>
|
||||
<RenderElements
|
||||
@drop="onDrop($event, theModel!.uuid, col)"
|
||||
v-if="col.items.length > 0"
|
||||
v-bind:items="col.items"/>
|
||||
<div @click="deleteColumn(theModel!, col.uuid)" v-if="!isPreview" class="flex h-auto justify-center place-self-center">
|
||||
<span class=" font-medium text-red-500 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"><Delete /></span>
|
||||
</div>
|
||||
<div @click="addColumn(3, theModel!, col.uuid)" v-if="!isPreview" class="flex h-auto justify-center place-self-center">
|
||||
<span class=" font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"><BetweenVerticalStart /></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<EmptyElementForm
|
||||
:row="theModel!"
|
||||
v-if="theModel!.columns.length == 0"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { useGlobalStore } from '../../../stores/Global'
|
||||
import { Image, SquareParking, SquareDot, SquareMenu, SquarePen, SquareChevronDown, SquareDashed } from 'lucide-vue-next';
|
||||
import { Image, Rows3, TableCellsMerge, SquareParking, SquareDot, SquareMenu, SquarePen, SquareChevronDown, SquareDashed } from 'lucide-vue-next';
|
||||
import { Switch } from '../../../components/ui/switch'
|
||||
import { Label } from '../../../components/ui/label'
|
||||
import { ref, watch } from 'vue'
|
||||
@ -52,6 +52,10 @@ watch(previewMode, (newPreviewMode) => {
|
||||
<SquareParking />
|
||||
<span>{{ $t('text') }}</span>
|
||||
</div>
|
||||
<div id="fieldset" class="border-1 p-2 w-full flex flex-row gap-2" draggable="true" @dragstart="startDrag($event, '12')" @dragenter.prevent @dragover.prevent>
|
||||
<Rows3 />
|
||||
<span>{{ $t('fieldset') }}</span>
|
||||
</div>
|
||||
<div id="media" class="border-1 p-2 w-full flex flex-row gap-2" draggable="true" @dragstart="startDrag($event, '9')" @dragenter.prevent @dragover.prevent>
|
||||
<Image />
|
||||
<span>{{ $t('media') }}</span>
|
||||
@ -73,7 +77,7 @@ watch(previewMode, (newPreviewMode) => {
|
||||
<span>{{ $t('hidden') }}</span>
|
||||
</div>
|
||||
<div id="row" class="border-1 p-2 w-full flex flex-row gap-2" draggable="true" @dragstart="startDrag($event, '7')" @dragenter.prevent @dragover.prevent>
|
||||
<SquareDashed />
|
||||
<TableCellsMerge />
|
||||
<span>{{ $t('row') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -0,0 +1,32 @@
|
||||
<script lang="ts" setup>
|
||||
import FieldsetElement from '../../../model/FieldsetElement';
|
||||
import { computed } from 'vue';
|
||||
import { Input } from '../../../components/ui/input'
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectGroup,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '../../../components/ui/select'
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: FieldsetElement
|
||||
})
|
||||
|
||||
let emit = defineEmits(['update:modelValue']);
|
||||
|
||||
const theModel = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (value) => emit('update:modelValue', value),
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<label>{{ $t('id') }}</label>
|
||||
<Input v-model="theModel!.id" />
|
||||
<label>{{ $t('name') }}</label>
|
||||
<Input v-model="theModel!.name"/>
|
||||
</template>
|
||||
@ -17,7 +17,7 @@ const theModel = computed({
|
||||
|
||||
function addColumn(row: Row) {
|
||||
if(row !== null) {
|
||||
row.addColumn(new Column())
|
||||
row.addColumnAtTheEnd(new Column())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,9 +8,11 @@ import MediaElementForm from '../elements/MediaElementForm.vue'
|
||||
import TextareaElementForm from '../elements/TextareaElementForm.vue'
|
||||
import SelectElementForm from '../elements/SelectElementForm.vue'
|
||||
import RowElementForm from '../elements/RowElementForm.vue'
|
||||
import FieldsetElementForm from '../elements/FieldsetElementForm.vue'
|
||||
import InputElement from '../../../model/InputElement'
|
||||
import HiddenElement from '../../../model/HiddenElement'
|
||||
import TextElement from '../../../model/TextElement'
|
||||
import FieldsetElement from '../../../model/FieldsetElement'
|
||||
import TextareaElement from '../../../model/TextareaElement'
|
||||
import HeadlineElement from '../../../model/HeadlineElement'
|
||||
import MediaElement from '../../../model/MediaElement'
|
||||
@ -113,7 +115,7 @@ const editElementDependency = (item: BaseElement) => {
|
||||
<span class="absolute px-3 font-medium text-gray-900 -translate-x-1/2 bg-white left-1/2 dark:text-white dark:bg-gray-900 pointer-events-none"><CirclePlus :class="{ 'text-orange-500': dragUuid == item.uuid }" class="transition duration-200 pointer-events-none" /></span>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="{ 'border-white' : !item.hasDependencys(), 'border-blue-500': item.hasDependencys() }" @dragstart="startDrag($event, item.uuid)" draggable="true" class="element w-full flex flex-row border-l-2 hover:border-orange-500 pl-2 transition duration-500 min-h-5" v-bind:class="{ ' bg-slate-50': item.isFocused === true }">
|
||||
<div :class="{ 'border-white' : !item.hasDependencys() || isPreview, 'border-blue-500': item.hasDependencys() && !isPreview }" @dragstart="startDrag($event, item.uuid)" draggable="true" class="element w-full flex flex-row border-l-2 hover:border-orange-500 pl-2 transition duration-500 min-h-5" v-bind:class="{ ' bg-slate-50': item.isFocused === true }">
|
||||
<div class="grow content-center items-center">
|
||||
<InputElementForm
|
||||
v-if="item.type === 2"
|
||||
@ -139,6 +141,10 @@ const editElementDependency = (item: BaseElement) => {
|
||||
v-if="item.type === 6"
|
||||
v-model="item as HeadlineElement"
|
||||
/>
|
||||
<FieldsetElementForm
|
||||
v-if="item.type === 12"
|
||||
v-model="item as Fieldset"
|
||||
/>
|
||||
<RowElementForm
|
||||
v-if="item.type === 7"
|
||||
v-model="item as Row"
|
||||
|
||||
@ -42,5 +42,10 @@
|
||||
"options": "Optionen",
|
||||
"settings": "Einstellungen",
|
||||
"save": "Speichern",
|
||||
"saving": "Speichern..."
|
||||
}
|
||||
"saving": "Speichern...",
|
||||
"formel_view": "Formel Ansicht",
|
||||
"parameter_view": "Parameter Ansicht",
|
||||
"paperdb_view": "PapierDB Ansicht",
|
||||
"syncing": "Synchronisiere...",
|
||||
"sync": "Synchronisieren"
|
||||
}
|
||||
@ -42,5 +42,10 @@
|
||||
"options": "Options",
|
||||
"settings": "Settings",
|
||||
"save": "Save",
|
||||
"saving": "Saving..."
|
||||
}
|
||||
"saving": "Saving...",
|
||||
"formel_view": "Formula View",
|
||||
"parameter_view": "Parameter View",
|
||||
"paperdb_view": "PaperDB View",
|
||||
"syncing": "Syncing...",
|
||||
"sync": "Sync"
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
import ky from 'ky';
|
||||
|
||||
|
||||
const api = ky.create({
|
||||
prefixUrl: '/apps',
|
||||
headers: {
|
||||
@ -7,15 +8,25 @@ const api = ky.create({
|
||||
},
|
||||
timeout: 10000,
|
||||
hooks: {
|
||||
beforeRequest: [
|
||||
request => {
|
||||
// Optional: Token aus Storage holen
|
||||
const token = localStorage.getItem('token');
|
||||
if (token) {
|
||||
request.headers.set('Authorization', `Bearer ${token}`);
|
||||
}
|
||||
afterResponse: [
|
||||
(_request, _options, response) => {
|
||||
console.log(response);
|
||||
return response
|
||||
},
|
||||
],
|
||||
|
||||
// Or retry with a fresh token on a 403 error
|
||||
async (request, options, response) => {
|
||||
if (response.status === 403) {
|
||||
// Get a fresh token
|
||||
const token = await ky('https://example.com/token').text();
|
||||
|
||||
// Retry with the token
|
||||
request.headers.set('Authorization', `token ${token}`);
|
||||
|
||||
return ky(request);
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
});
|
||||
|
||||
@ -60,6 +71,15 @@ export const saveXmlToApi = async (uuid: string, xml: string) => {
|
||||
}
|
||||
}
|
||||
|
||||
export const saveProductToApi = async (uuid: string, xml: string) => {
|
||||
try {
|
||||
const response = await api.put('api/plugin/system/psc/xmlcalc/product/' + uuid, { json: { calcXml: xml } });
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
console.error('Error XML to PRODUCT API:', error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
export const saveJsonToApi = async (uuid: string, json: string) => {
|
||||
try {
|
||||
const response = await api.post('api/plugin/system/psc/xmlcalc/product/json', { json: { product: uuid, json: json } });
|
||||
@ -69,5 +89,50 @@ export const saveJsonToApi = async (uuid: string, json: string) => {
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
export default api;
|
||||
export const saveFomulasAndParameterToApi = async (uuid: string, formulas: string, parameter: string) => {
|
||||
try {
|
||||
const response = await api.put('api/plugin/system/psc/xmlcalc/shop/' + uuid, { json: { formel: formulas, parameter: parameter } });
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
console.error('Error saving design to API:', error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
export const savePaperContainerToApi = async (uuid: string, paperContainer: string) => {
|
||||
try {
|
||||
const response = await api.put('api/system/papercontainer', { json: { content: paperContainer } });
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
console.error('Error saving design to API:', error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export const uploadFile = async (file: File, onProgress: (progress: number) => void) => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
|
||||
try {
|
||||
const response = await api.post('api/plugin/media/upload', { // Changed to a more appropriate media upload endpoint
|
||||
body: formData,
|
||||
onDownloadProgress: (progress) => {
|
||||
onProgress(Math.round(progress.percent * 100));
|
||||
},
|
||||
});
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
console.error('Error uploading file:', error);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
export const fetchMediaDirectories = async () => {
|
||||
try {
|
||||
const response = await api.get('api/plugin/media/directories');
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
console.error('Error fetching media directories:', error);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
export default api;
|
||||
|
||||
@ -2,6 +2,7 @@ import type BaseElement from "../model/BaseElement"
|
||||
import InputElement from "../model/InputElement"
|
||||
import Row from "../model/Row"
|
||||
import MediaElement from "../model/MediaElement"
|
||||
import FieldsetElement from "../model/FieldsetElement"
|
||||
import Column from "../model/Column"
|
||||
import HiddenElement from "../model/HiddenElement"
|
||||
import SelectElement from "../model/SelectElement"
|
||||
@ -11,8 +12,10 @@ import HeadlineElement from "../model/HeadlineElement"
|
||||
|
||||
export default class Parser {
|
||||
|
||||
static getModelForType(type: Number) : BaseElement {
|
||||
switch(type) {
|
||||
static getModelForType(type: Number): BaseElement {
|
||||
switch (type) {
|
||||
case 12:
|
||||
return new FieldsetElement
|
||||
case 9:
|
||||
return new MediaElement
|
||||
case 8:
|
||||
@ -32,7 +35,7 @@ export default class Parser {
|
||||
case 1:
|
||||
return new HiddenElement
|
||||
default:
|
||||
return new InputElement
|
||||
return new InputElement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
import BaseElement from "./BaseElement";
|
||||
import Parser from '../lib/parser'
|
||||
|
||||
export default class Column extends BaseElement {
|
||||
items: BaseElement[] = []
|
||||
export default class Column extends BaseElement {
|
||||
items: BaseElement[] = []
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
this.type = 8
|
||||
this.type = 8
|
||||
}
|
||||
|
||||
addItem(item: BaseElement) {
|
||||
@ -16,7 +17,7 @@ export default class Column extends BaseElement {
|
||||
return Object.assign(
|
||||
super.toJSON(),
|
||||
{
|
||||
'items': this.items.reduce((result: object[], item: BaseElement) => {
|
||||
'options': this.items.reduce((result: object[], item: BaseElement) => {
|
||||
result.push(item.toJSON())
|
||||
return result
|
||||
}, [])
|
||||
@ -25,21 +26,21 @@ export default class Column extends BaseElement {
|
||||
|
||||
fromJSON(obj: any) {
|
||||
super.fromJSON(obj)
|
||||
obj.columns.map((d: any) => {
|
||||
const column = new Column()
|
||||
column.fromJSON(d)
|
||||
this.items.push(column)
|
||||
obj.options.map((d: any) => {
|
||||
const item = Parser.getModelForType(d.type)
|
||||
item.fromJSON(d)
|
||||
this.items.push(item)
|
||||
})
|
||||
}
|
||||
|
||||
cutItem(existingUuid: string) {
|
||||
let item: BaseElement|null = null;
|
||||
this.items.forEach((element: BaseElement,indexArray: number) => {
|
||||
if(element.uuid === existingUuid) {
|
||||
let item: BaseElement | null = null;
|
||||
this.items.forEach((element: BaseElement, indexArray: number) => {
|
||||
if (element.uuid === existingUuid) {
|
||||
item = this.items.splice(indexArray, 1)[0]
|
||||
return true
|
||||
}
|
||||
if(item === null) {
|
||||
if (item === null) {
|
||||
item = element.cutItem(existingUuid)
|
||||
}
|
||||
});
|
||||
@ -49,12 +50,12 @@ export default class Column extends BaseElement {
|
||||
insertItem(item: BaseElement, targetUuid: string): boolean {
|
||||
let inserted = false;
|
||||
for (let i = 0; i < this.items.length; ++i) {
|
||||
if(this.items[i].uuid === targetUuid) {
|
||||
if (this.items[i].uuid === targetUuid) {
|
||||
this.items.splice(i, 0, item);
|
||||
inserted = true;
|
||||
return false
|
||||
}
|
||||
if(!inserted) {
|
||||
if (!inserted) {
|
||||
this.items[i].insertItem(item, targetUuid)
|
||||
}
|
||||
}
|
||||
@ -63,13 +64,14 @@ export default class Column extends BaseElement {
|
||||
}
|
||||
|
||||
deleteItem(item: BaseElement): boolean {
|
||||
return this.items.some((element: BaseElement,indexArray: number) => {
|
||||
if(element.uuid === item.uuid) {
|
||||
item = this.items.splice(indexArray, 1)[0]
|
||||
return true
|
||||
}
|
||||
if(element.deleteItem(item)) {
|
||||
return true
|
||||
}
|
||||
})
|
||||
}}
|
||||
return this.items.some((element: BaseElement, indexArray: number) => {
|
||||
if (element.uuid === item.uuid) {
|
||||
item = this.items.splice(indexArray, 1)[0]
|
||||
return true
|
||||
}
|
||||
if (element.deleteItem(item)) {
|
||||
return true
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,79 @@
|
||||
import BaseElement from "./BaseElement";
|
||||
import Parser from '../lib/parser'
|
||||
|
||||
export default class FieldsetElement extends BaseElement {
|
||||
items: BaseElement[] = []
|
||||
label: string = ''
|
||||
constructor() {
|
||||
super()
|
||||
this.type = 12
|
||||
}
|
||||
|
||||
addItem(item: BaseElement) {
|
||||
this.items.push(item)
|
||||
}
|
||||
|
||||
public toJSON() {
|
||||
return Object.assign(
|
||||
super.toJSON(),
|
||||
{
|
||||
'label': this.label,
|
||||
'options': this.items.reduce((result: object[], item: BaseElement) => {
|
||||
result.push(item.toJSON())
|
||||
return result
|
||||
}, [])
|
||||
})
|
||||
}
|
||||
|
||||
fromJSON(obj: any) {
|
||||
super.fromJSON(obj)
|
||||
this.label = obj.label
|
||||
obj.options.map((d: any) => {
|
||||
const item = Parser.getModelForType(d.type)
|
||||
item.fromJSON(d)
|
||||
this.items.push(item)
|
||||
})
|
||||
}
|
||||
|
||||
cutItem(existingUuid: string) {
|
||||
let item: BaseElement | null = null;
|
||||
this.items.forEach((element: BaseElement, indexArray: number) => {
|
||||
if (element.uuid === existingUuid) {
|
||||
item = this.items.splice(indexArray, 1)[0]
|
||||
return true
|
||||
}
|
||||
if (item === null) {
|
||||
item = element.cutItem(existingUuid)
|
||||
}
|
||||
});
|
||||
return item
|
||||
}
|
||||
|
||||
insertItem(item: BaseElement, targetUuid: string): boolean {
|
||||
let inserted = false;
|
||||
for (let i = 0; i < this.items.length; ++i) {
|
||||
if (this.items[i].uuid === targetUuid) {
|
||||
this.items.splice(i, 0, item);
|
||||
inserted = true;
|
||||
return false
|
||||
}
|
||||
if (!inserted) {
|
||||
this.items[i].insertItem(item, targetUuid)
|
||||
}
|
||||
}
|
||||
|
||||
return inserted
|
||||
}
|
||||
|
||||
deleteItem(item: BaseElement): boolean {
|
||||
return this.items.some((element: BaseElement, indexArray: number) => {
|
||||
if (element.uuid === item.uuid) {
|
||||
item = this.items.splice(indexArray, 1)[0]
|
||||
return true
|
||||
}
|
||||
if (element.deleteItem(item)) {
|
||||
return true
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -1,18 +1,47 @@
|
||||
import BaseElement from "./BaseElement";
|
||||
import Column from "./Column.ts"
|
||||
|
||||
export default class Row extends BaseElement {
|
||||
columns: Column[] = []
|
||||
export default class Row extends BaseElement {
|
||||
columns: Column[] = []
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
this.type = 7
|
||||
}
|
||||
|
||||
addColumn(column: Column) {
|
||||
addColumnAtTheEnd(column: Column) {
|
||||
this.columns.push(column)
|
||||
}
|
||||
|
||||
addColumnAtTheBeginning(column: Column) {
|
||||
this.columns.unshift(column)
|
||||
}
|
||||
|
||||
deleteColumnAt(targetUuid: string): boolean {
|
||||
return this.columns.some((element: BaseElement, indexArray: number) => {
|
||||
if (element.uuid === targetUuid) {
|
||||
this.columns.splice(indexArray, 1)[0]
|
||||
return true
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
addColumnAt(item: Column, targetUuid: string): boolean {
|
||||
let inserted = false;
|
||||
for (let i = 0; i < this.columns.length; ++i) {
|
||||
if (this.columns[i].uuid === targetUuid) {
|
||||
this.columns.splice(i + 1, 0, item);
|
||||
inserted = true;
|
||||
return false
|
||||
}
|
||||
if (!inserted) {
|
||||
this.columns[i].insertItem(item, targetUuid)
|
||||
}
|
||||
}
|
||||
|
||||
return inserted
|
||||
}
|
||||
|
||||
public toJSON() {
|
||||
return Object.assign(
|
||||
super.toJSON(),
|
||||
@ -25,10 +54,10 @@ export default class Row extends BaseElement {
|
||||
}
|
||||
|
||||
cutItem(existingUuid: string) {
|
||||
let item: BaseElement|null = null;
|
||||
let item: BaseElement | null = null;
|
||||
this.columns.some((col: Column) => {
|
||||
item = col.cutItem(existingUuid)
|
||||
if(item !== null) {
|
||||
if (item !== null) {
|
||||
return true
|
||||
}
|
||||
});
|
||||
@ -37,7 +66,7 @@ export default class Row extends BaseElement {
|
||||
|
||||
insertItem(item: BaseElement, targetUuid: string): boolean {
|
||||
this.columns.some((col: Column) => {
|
||||
if(col.insertItem(item, targetUuid)) {
|
||||
if (col.insertItem(item, targetUuid)) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@ -46,14 +75,14 @@ export default class Row extends BaseElement {
|
||||
|
||||
deleteItem(item: BaseElement): boolean {
|
||||
this.columns.some((col: Column) => {
|
||||
if(col.deleteItem(item)) {
|
||||
if (col.deleteItem(item)) {
|
||||
return true;
|
||||
}
|
||||
})
|
||||
return false
|
||||
}
|
||||
insertItemInEmptyColumn(item: BaseElement, targetUuid: string, column: Column) {
|
||||
if(this.uuid == targetUuid) {
|
||||
if (this.uuid == targetUuid) {
|
||||
column.items.push(item)
|
||||
return true
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import BaseElement from '../model/BaseElement'
|
||||
import { loadJsonFromApi, loadPriceFromApi, saveDesignToApi, saveJsonToApi, saveXmlToApi } from '../lib/api'
|
||||
import { saveProductToApi, saveFomulasAndParameterToApi, loadJsonFromApi, loadPriceFromApi, savePaperContainerToApi, saveDesignToApi, saveXmlToApi } from '../lib/api'
|
||||
import { useItemStore } from './Items'
|
||||
|
||||
export const useGlobalStore = defineStore('global', {
|
||||
@ -18,9 +18,10 @@ export const useGlobalStore = defineStore('global', {
|
||||
dragMode: "",
|
||||
json: "",
|
||||
xml: "",
|
||||
formel: "",
|
||||
paperdb: "",
|
||||
formulas: "",
|
||||
paperContainer: "",
|
||||
parameter: "",
|
||||
shopUuid: "",
|
||||
saving: false,
|
||||
syncing: false,
|
||||
currentTab: 'designer',
|
||||
@ -40,11 +41,11 @@ export const useGlobalStore = defineStore('global', {
|
||||
setXml(value: string) {
|
||||
this.xml = value
|
||||
},
|
||||
setFormel(value: string) {
|
||||
this.formel = value
|
||||
setFormulas(value: string) {
|
||||
this.formulas = value
|
||||
},
|
||||
setPaperDB(value: string) {
|
||||
this.paperdb = value
|
||||
setPaperContainer(value: string) {
|
||||
this.paperContainer = value
|
||||
},
|
||||
setParameter(value: string) {
|
||||
this.parameter = value
|
||||
@ -80,6 +81,10 @@ export const useGlobalStore = defineStore('global', {
|
||||
const data: any = await loadJsonFromApi(uuid)
|
||||
this.json = data.json
|
||||
this.xml = data.xml
|
||||
this.parameter = data.parameter
|
||||
this.formulas = data.formulas
|
||||
this.paperContainer = data.paperContainer
|
||||
this.shopUuid = data.shopUuid
|
||||
return data.json;
|
||||
},
|
||||
async loadFormulaAnalyserDataFromApi(uuid: string) {
|
||||
@ -115,15 +120,9 @@ export const useGlobalStore = defineStore('global', {
|
||||
this.formulaData = JSON.parse(result.jsonGraph);
|
||||
})
|
||||
},
|
||||
manualSave(json: object[]) {
|
||||
manualSave() {
|
||||
this.saving = true
|
||||
saveDesignToApi(this.productUuid, json).then((result: any) => {
|
||||
this.setXML(result.xml)
|
||||
this.setJSON(result.json)
|
||||
this.formulaData = JSON.parse(result.jsonGraph);
|
||||
const itemStore = useItemStore()
|
||||
itemStore.parseJSON(result.json)
|
||||
|
||||
saveProductToApi(this.productUuid, this.xml).then((result: any) => {
|
||||
this.saving = false
|
||||
})
|
||||
},
|
||||
@ -139,16 +138,19 @@ export const useGlobalStore = defineStore('global', {
|
||||
itemStore.parseJSON(result.json)
|
||||
})
|
||||
}
|
||||
if (this.currentTab == 'json') {
|
||||
saveJsonToApi(this.productUuid, this.json).then((result: any) => {
|
||||
this.setXML(result.xml)
|
||||
this.setJSON(result.json)
|
||||
this.formulaData = JSON.parse(result.jsonGraph);
|
||||
if (this.currentTab == 'formulas' || this.currentTab == 'parameter') {
|
||||
saveFomulasAndParameterToApi(this.shopUuid, this.formulas, this.parameter).then((result: any) => {
|
||||
this.loadConfigFromProductApi(this.productUuid)
|
||||
this.syncing = false
|
||||
const itemStore = useItemStore()
|
||||
itemStore.parseJSON(result.json)
|
||||
})
|
||||
}
|
||||
if (this.currentTab == 'paperdb') {
|
||||
savePaperContainerToApi(this.shopUuid, this.paperContainer).then((result: any) => {
|
||||
this.loadConfigFromProductApi(this.productUuid)
|
||||
this.syncing = false
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
setCurrentTab(tab: string) {
|
||||
this.currentTab = tab
|
||||
|
||||
@ -15,7 +15,7 @@ export default defineConfig({
|
||||
}
|
||||
},
|
||||
outDir: '../Resources/public/formbuilderts',
|
||||
emptyOutDir: true, // also necessary
|
||||
emptyOutDir: true,
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
@ -29,7 +29,7 @@ export default defineConfig({
|
||||
changeOrigin: true,
|
||||
configure: (proxy) => {
|
||||
proxy.on('proxyReq', (proxyReq) => {
|
||||
proxyReq.setHeader('Authorization', 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE3NTMxMDgzOTMsImV4cCI6MTc1MzExMTk5Mywicm9sZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfU0hPUF9PUEVSQVRPUiIsIlJPTEVfVVNFUiIsIlJPTEVfVVNFUiIsIlJPTEVfUFNDX0NvbGxlY3RfQ29udGFjdF9FZGl0IiwiUk9MRV9QU0NfQ29sbGVjdF9Db250YWN0X0FkZCIsIlJPTEVfUFNDX0NvbGxlY3RfQ29udGFjdF9EZWxldGUiLCJST0xFX1BTQ19Db2xsZWN0X0NvbnRhY3RfTG9jayIsIlJPTEVfUFNDX1IyX1NlbmRjbG91ZF9TaG93Il0sInVpZCI6MX0.BsoNxbHgk_B-_72aYyItK199n1UoKkqhvMLRxNCMdLn18c4MDegZgpLB46kQ2kafNCoIvLEWzmTDBsFXTwRizUyyWWd6qORb6J2YNdM5t5r_qKEQKeaFDTkULGKmMwmu51MrleYr0lxbW18SqQKV2M88Y_qr-NvYeC-Pkwk3plqEw7qoaQQY9qQvRBfkXI90QBL5nFjgvearcdc2NMQJUWOTG9eUwz7LM-9R5CW9Wx8HUXWjM9prUiPgPrEf-amHq_gnCpqzpd8O6c2zRJ7U9nBQ9r0vI4bgFtPysKZ6QOB-ByW9oLs2Y70n0f22YNmox2SwVbMiAWMlMyGXb1TnpA');
|
||||
proxyReq.setHeader('Authorization', 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE3NTM2ODg4MTksImV4cCI6MTc1MzY5MjQxOSwicm9sZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfU0hPUF9PUEVSQVRPUiIsIlJPTEVfVVNFUiIsIlJPTEVfVVNFUiIsIlJPTEVfUFNDX0NvbGxlY3RfQ29udGFjdF9FZGl0IiwiUk9MRV9QU0NfQ29sbGVjdF9Db250YWN0X0FkZCIsIlJPTEVfUFNDX0NvbGxlY3RfQ29udGFjdF9EZWxldGUiLCJST0xFX1BTQ19Db2xsZWN0X0NvbnRhY3RfTG9jayIsIlJPTEVfUFNDX1IyX1NlbmRjbG91ZF9TaG93Il0sInVpZCI6MX0.j8BCuZxhIqw5G6TVgV9znMkZCF98T96rm6uYyj158-vZWykPbCyLtrNRk1wJXNA5gsGKUQYKffpqOlMFIkc9YlSKcYTSZjyablGlue34ELuoT7h4JXrKSD8SYBB99wphsV0aViAoyabn5L7QZLSzhwqZYxvJrmCW_KcrCcAr1Uy-AGYJNOE39bknwwNolRSPh2Gu5x2tE85LugazW0jo9ghWuPVOB35BB9NN1HHmjwzO4uinv8oorlGSWAsnLOOdjPAY7LjcoAY59v5r3U4FmMkHj5QfxxUsBaN_0ostJWxDfqr2cJqBEk-XimsaGQdyjuD6bintNO_N2m4DxuIjgw');
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
{% block javascripts %}
|
||||
<script>
|
||||
var jwt_token = '{{ jwt }}';
|
||||
var refresh_token = '{{ refresh_token }}';
|
||||
</script>
|
||||
<script src="/apps/bundles/plugincustompscformbuilder/formbuilderts/assets/index.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
@ -89,6 +89,13 @@ class Config extends AbstractController
|
||||
$engine->setActiveArticle($data->xmlProduct);
|
||||
}
|
||||
|
||||
return $this->json(['json' => $engine->generateJson(), 'xml' => $engine->generateXML(true)]);
|
||||
return $this->json([
|
||||
'json' => $engine->generateJson(),
|
||||
'xml' => $engine->generateXML(true),
|
||||
'parameter' => $engine->getParameters(),
|
||||
'paperContainer' => $product->getShop()->getInstall()->getPaperContainer(),
|
||||
'shopUuid' => $product->getShop()->getUid(),
|
||||
'formulas' => $engine->getFormulas(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,9 +89,13 @@ class Design extends AbstractController
|
||||
|
||||
return $this->json([
|
||||
'json' => $engine->generateJson(),
|
||||
'parameter' => $engine->getParameters(),
|
||||
'paperContainer' => $product->getShop()->getInstall()->getPaperContainer(),
|
||||
'formulas' => $engine->getFormulas(),
|
||||
'xml' => $engine->generateXML(true),
|
||||
'jsonGraph' => $engine->getCalcGraph()->generateJsonGraph(),
|
||||
'price' => $engine->getPrice() * 100,
|
||||
'shopUuid' => $product->getShop()->getUid(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,32 +2,22 @@
|
||||
|
||||
namespace Plugin\System\PSC\XmlCalc\Dto\Output\Price\Validation\Input;
|
||||
|
||||
use OpenApi\Attributes\Property;
|
||||
use Plugin\System\PSC\XmlCalc\Dto\Output\Price\Validation\Error;
|
||||
use Nelmio\ApiDocBundle\Annotation\Model;
|
||||
use OpenApi\Annotations as OA;
|
||||
|
||||
class Min extends Error {
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @OA\Property(type="integer")
|
||||
*/
|
||||
class Min extends Error
|
||||
{
|
||||
#[Property(type: 'integer')]
|
||||
public int $minValue = 0;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @OA\Property(type="integer")
|
||||
*/
|
||||
#[Property(type: 'integer')]
|
||||
public int $currentValue = 0;
|
||||
|
||||
public function __construct(int $currentValue, int $minValue)
|
||||
{
|
||||
$this->currentValue = $currentValue;
|
||||
$this->minValue = $minValue;
|
||||
$this->message = "value must be greater then " . $this->minValue;
|
||||
$this->message = 'value must be greater then ' . $this->minValue;
|
||||
$this->type = 'input::validation::min';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user