[#NUMERO_TICKET] TITRE TICKET #2

Merged
malio merged 302 commits from develop into main 2026-03-18 13:16:19 +00:00
2 changed files with 8 additions and 0 deletions
Showing only changes of commit 59b11f1225 - Show all commits

View File

@@ -9,6 +9,7 @@ use ApiPlatform\State\ProcessorInterface;
use App\Entity\ClientTicket;
use App\Entity\User;
use App\Repository\ClientTicketRepository;
use App\Service\NotificationService;
use DateTimeImmutable;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\SecurityBundle\Security;
@@ -24,6 +25,7 @@ final readonly class ClientTicketNumberProcessor implements ProcessorInterface
private EntityManagerInterface $entityManager,
private Security $security,
private ClientTicketRepository $clientTicketRepository,
private NotificationService $notificationService,
) {}
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): ClientTicket
@@ -56,6 +58,8 @@ final readonly class ClientTicketNumberProcessor implements ProcessorInterface
$this->entityManager->persist($data);
$this->entityManager->flush();
$this->notificationService->createForTicketCreated($data);
return $data;
}
}

View File

@@ -7,6 +7,7 @@ namespace App\State;
use ApiPlatform\Metadata\Operation;
use ApiPlatform\State\ProcessorInterface;
use App\Entity\ClientTicket;
use App\Service\NotificationService;
use DateTimeImmutable;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
@@ -23,6 +24,7 @@ final readonly class ClientTicketStatusProcessor implements ProcessorInterface
public function __construct(
private EntityManagerInterface $entityManager,
private NotificationService $notificationService,
) {}
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): ClientTicket
@@ -51,6 +53,8 @@ final readonly class ClientTicketStatusProcessor implements ProcessorInterface
$this->entityManager->persist($data);
$this->entityManager->flush();
$this->notificationService->createForStatusChange($data);
return $data;
}
}