ソースを参照

Ticket & Reminder

develop
Guillaume 3年前
コミット
44fca99271
2個のファイルの変更6行の追加2行の削除
  1. +4
    -2
      Controller/Ticket/TicketAdminController.php
  2. +2
    -0
      Factory/Reminder/ReminderFactory.php

+ 4
- 2
Controller/Ticket/TicketAdminController.php ファイルの表示

@@ -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 ファイルの表示

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

}

読み込み中…
キャンセル
保存