|
|
@@ -22,6 +22,7 @@ use Lc\SovBundle\Model\Ticket\TicketInterface; |
|
|
|
use Lc\SovBundle\Controller\AbstractAdminController; |
|
|
|
use Lc\SovBundle\Model\Ticket\TicketModel; |
|
|
|
use Symfony\Component\HttpFoundation\JsonResponse; |
|
|
|
use Symfony\Component\HttpFoundation\Request; |
|
|
|
|
|
|
|
class TicketAdminController extends AbstractAdminController |
|
|
|
{ |
|
|
@@ -106,6 +107,7 @@ class TicketAdminController extends AbstractAdminController |
|
|
|
if ($form->isSubmitted() && $form->isValid()) { |
|
|
|
$ticket = $form->getData(); |
|
|
|
|
|
|
|
// @TODO : check si ça marche sans |
|
|
|
foreach ($ticket->getTicketMessages() as $ticketMessage) { |
|
|
|
$this->get('em')->persist($ticketMessage); |
|
|
|
} |
|
|
@@ -147,7 +149,7 @@ class TicketAdminController extends AbstractAdminController |
|
|
|
|
|
|
|
$ticketMessage = $this->ticketMessageFactory->create(); |
|
|
|
$formAddTicketMessage = $this->createForm(TicketMessageFormType::class, $ticketMessage); |
|
|
|
$formAddTicketMessage->handleRequest($this->get('request')->getMainRequest()); |
|
|
|
$formAddTicketMessage->handleRequest($this->get('request')->getMasterRequest()); |
|
|
|
|
|
|
|
if ($formAddTicketMessage->isSubmitted() && $formAddTicketMessage->isValid()) { |
|
|
|
$ticketMessage = $formAddTicketMessage->getData(); |
|
|
@@ -170,7 +172,7 @@ class TicketAdminController extends AbstractAdminController |
|
|
|
|
|
|
|
public function ticketStatusAction() |
|
|
|
{ |
|
|
|
$request = $this->get('request')->getMainRequest(); |
|
|
|
$request = $this->get('request')->getMasterRequest(); |
|
|
|
$ticket = $request->attributes->get('easyadmin_context')->getEntity()->getInstance(); |
|
|
|
|
|
|
|
$formTicketStatusForm = $this->createForm(TicketStatusType::class, $ticket); |