Browse Source

Ticket & Reminder

feature/symfony6.1
Guillaume 3 years ago
parent
commit
44fca99271
2 changed files with 6 additions and 2 deletions
  1. +4
    -2
      Controller/Ticket/TicketAdminController.php
  2. +2
    -0
      Factory/Reminder/ReminderFactory.php

+ 4
- 2
Controller/Ticket/TicketAdminController.php View File

@@ -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);

+ 2
- 0
Factory/Reminder/ReminderFactory.php View File

@@ -2,6 +2,7 @@

namespace Lc\SovBundle\Factory\Reminder;

use App\Entity\Reminder\Reminder;
use Lc\SovBundle\Factory\AbstractFactory;
use Lc\SovBundle\Model\Reminder\ReminderInterface;

@@ -11,4 +12,5 @@ class ReminderFactory extends AbstractFactory implements ReminderFactoryInterfac
{
return ReminderInterface::class;
}

}

Loading…
Cancel
Save