diff --git a/src/new/assets/tailwind/backend.ts b/src/new/assets/tailwind/backend.ts index 5229b5241..41c235172 100644 --- a/src/new/assets/tailwind/backend.ts +++ b/src/new/assets/tailwind/backend.ts @@ -1,6 +1,7 @@ import "./css/backend.css" import Alpine from 'alpinejs'; import persist from '@alpinejs/persist' +global.$ = global.jQuery = window.jQuery = require('jquery'); import { startStimulusApp } from '@symfony/stimulus-bridge'; const app = startStimulusApp(); diff --git a/src/new/composer.json b/src/new/composer.json index 364553fe7..8c0aa4081 100755 --- a/src/new/composer.json +++ b/src/new/composer.json @@ -78,7 +78,7 @@ "symfony/monolog-bundle": "^3.8", "symfony/notifier": "*", "symfony/process": "*", - "symfony/property-access": "v6.4.4", + "symfony/property-access": "6.4.*", "symfony/property-info": "*", "symfony/proxy-manager-bridge": "*", "symfony/runtime": "*", diff --git a/src/new/src/PSC/Shop/OrderBundle/Controller/Backend/DetailController.php b/src/new/src/PSC/Shop/OrderBundle/Controller/Backend/DetailController.php index bd40d100e..497a6e13a 100755 --- a/src/new/src/PSC/Shop/OrderBundle/Controller/Backend/DetailController.php +++ b/src/new/src/PSC/Shop/OrderBundle/Controller/Backend/DetailController.php @@ -14,7 +14,6 @@ namespace PSC\Shop\OrderBundle\Controller\Backend; use Doctrine\ODM\MongoDB\DocumentManager; -use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManagerInterface; use PSC\Shop\EntityBundle\Document\Position; use PSC\Shop\EntityBundle\Document\Product; @@ -22,8 +21,6 @@ use PSC\Shop\EntityBundle\Entity\Upload; use PSC\Shop\OrderBundle\Form\Backend\OrderStatusType; use PSC\Library\Calc\Engine; use PSC\Library\Calc\PaperContainer; -use PSC\Shop\EntityBundle\Entity\ContactAddress; -use PSC\Shop\EntityBundle\Entity\Motiv; use PSC\Shop\EntityBundle\Entity\Order; use PSC\Shop\EntityBundle\Entity\Orderpos; use PSC\Shop\OrderBundle\Form\Backend\Detail\ContactDeliveryType; @@ -31,10 +28,10 @@ use PSC\Shop\OrderBundle\Form\Backend\Detail\ContactInvoiceType; use PSC\Shop\OrderBundle\Form\Backend\Detail\ContactSenderType; use PSC\Shop\OrderBundle\Form\Backend\ProdType; use PSC\Shop\OrderBundle\Form\Backend\ProdinfoType; -use PSC\Shop\OrderBundle\Form\Backend\Upload\DeleteType; use PSC\Shop\OrderBundle\PSCShopOrderBundle; use PSC\Shop\OrderBundle\Service\Order as PSCOrder; use PSC\Shop\QueueBundle\Event\Order\Create; +use PSC\Shop\QueueBundle\Event\Position\Create as PositionCreate; use PSC\Shop\QueueBundle\Event\Order\Updated; use PSC\Shop\QueueBundle\Event\Position\Printpartner\Notify; use PSC\Shop\QueueBundle\Event\Position\Status\Change; @@ -48,13 +45,10 @@ use PSC\System\SettingsBundle\Service\Shop; use PSC\System\SettingsBundle\Service\Status; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\FormFactoryInterface; -use Symfony\Component\HttpFoundation\File\UploadedFile; -use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\Routing\Annotation\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Component\HttpFoundation\Request; require_once __DIR__ . '/../../../EntityBundle/Lagacy/TP_Basket_Item.php'; @@ -468,6 +462,16 @@ class DetailController extends AbstractController $notify->setShop($selectedShop->getUID()); $notify->setOrder($order->getUuid()); $eventManagerService->addJob($notify); + + foreach($order->getPositions() as $position) { + $this->logService->createLogEntry($selectedShop, $this->getUser(), LogEntry::INFO, PSCShopOrderBundle::class, $position->getUuid(), "Position Created Status Changed"); + $notifyPos = new PositionCreate(); + $notifyPos->setShop($selectedShop->getUID()); + $notifyPos->setPosition($position->getUuid()); + $eventManagerService->addJob($notifyPos); + } + + return $this->redirectToRoute('psc_shop_order_backend_detail_show', array('uuid' => $uuid)); } diff --git a/src/new/src/PSC/Shop/QueueBundle/Event/Position/Create.php b/src/new/src/PSC/Shop/QueueBundle/Event/Position/Create.php new file mode 100644 index 000000000..27e7095e8 --- /dev/null +++ b/src/new/src/PSC/Shop/QueueBundle/Event/Position/Create.php @@ -0,0 +1,43 @@ + $this->position + ); + } + + public function setData($data): void + { + $this->position = $data['position']; + } + + public function getPosition(): string + { + return (string)$this->position; + } + + public function setPosition(string $var): void + { + $this->position = $var; + } +} diff --git a/src/new/templates/backend_tailwind_base.html.twig b/src/new/templates/backend_tailwind_base.html.twig index 709221ad0..59db74572 100644 --- a/src/new/templates/backend_tailwind_base.html.twig +++ b/src/new/templates/backend_tailwind_base.html.twig @@ -63,10 +63,12 @@