Browse Source

tickets

ideas
Charly 3 years ago
parent
commit
c92af79607
5 changed files with 14 additions and 21 deletions
  1. +2
    -19
      Controller/Ticket/TicketAdminController.php
  2. +1
    -1
      Factory/Ticket/TicketFactory.php
  3. +8
    -0
      Factory/Ticket/TicketFactoryInterface.php
  4. +1
    -1
      Form/Ticket/TicketFormType.php
  5. +2
    -0
      Resources/translations/admin.fr.yaml

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



namespace Lc\SovBundle\Controller\Ticket; namespace Lc\SovBundle\Controller\Ticket;


use App\Entity\Ticket\Ticket;
use App\Entity\Ticket\TicketMessage;
use EasyCorp\Bundle\EasyAdminBundle\Collection\FieldCollection;
use EasyCorp\Bundle\EasyAdminBundle\Config\Action; use EasyCorp\Bundle\EasyAdminBundle\Config\Action;
use EasyCorp\Bundle\EasyAdminBundle\Config\Actions; use EasyCorp\Bundle\EasyAdminBundle\Config\Actions;
use EasyCorp\Bundle\EasyAdminBundle\Config\Assets; use EasyCorp\Bundle\EasyAdminBundle\Config\Assets;
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud; use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
use EasyCorp\Bundle\EasyAdminBundle\Config\Filters;
use EasyCorp\Bundle\EasyAdminBundle\Config\KeyValueStore;
use EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext; use EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext;
use EasyCorp\Bundle\EasyAdminBundle\Event\AfterCrudActionEvent;
use EasyCorp\Bundle\EasyAdminBundle\Event\AfterEntityPersistedEvent;
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeCrudActionEvent;
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeEntityPersistedEvent;
use EasyCorp\Bundle\EasyAdminBundle\Exception\ForbiddenActionException;
use EasyCorp\Bundle\EasyAdminBundle\Exception\InsufficientEntityPermissionException;
use EasyCorp\Bundle\EasyAdminBundle\Factory\EntityFactory;
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField; use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField; use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField;
use EasyCorp\Bundle\EasyAdminBundle\Field\DateField; use EasyCorp\Bundle\EasyAdminBundle\Field\DateField;
use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField; use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use EasyCorp\Bundle\EasyAdminBundle\Router\AdminUrlGenerator; use EasyCorp\Bundle\EasyAdminBundle\Router\AdminUrlGenerator;
use EasyCorp\Bundle\EasyAdminBundle\Security\Permission;
use Lc\SovBundle\Factory\Ticket\TicketFactory;
use Lc\SovBundle\Factory\Ticket\TicketFactoryInterface;
use Lc\SovBundle\Factory\Ticket\TicketMessageFactory; use Lc\SovBundle\Factory\Ticket\TicketMessageFactory;
use Lc\SovBundle\Field\StatusField;
use Lc\SovBundle\Form\Ticket\TicketFormType; use Lc\SovBundle\Form\Ticket\TicketFormType;
use Lc\SovBundle\Form\Ticket\TicketMessageFormType; use Lc\SovBundle\Form\Ticket\TicketMessageFormType;
use Lc\SovBundle\Form\Ticket\TicketStatusType; use Lc\SovBundle\Form\Ticket\TicketStatusType;
use Lc\SovBundle\Controller\AbstractAdminController; use Lc\SovBundle\Controller\AbstractAdminController;
use Lc\SovBundle\Model\Ticket\TicketModel; use Lc\SovBundle\Model\Ticket\TicketModel;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Translation\TranslatableMessage;


class TicketAdminController extends AbstractAdminController class TicketAdminController extends AbstractAdminController
{ {
protected $em; protected $em;


public function __construct( public function __construct(
TicketFactory $ticketFactory,
TicketFactoryInterface $ticketFactory,
TicketMessageFactory $ticketMessageFactory, TicketMessageFactory $ticketMessageFactory,
AdminUrlGenerator $adminUrlGenerator AdminUrlGenerator $adminUrlGenerator
) { ) {

+ 1
- 1
Factory/Ticket/TicketFactory.php View File

use Lc\SovBundle\Factory\AbstractFactory; use Lc\SovBundle\Factory\AbstractFactory;
use Lc\SovBundle\Model\Ticket\TicketInterface; use Lc\SovBundle\Model\Ticket\TicketInterface;


class TicketFactory extends AbstractFactory
class TicketFactory extends AbstractFactory implements TicketFactoryInterface
{ {
protected $ticketMessageFactory; protected $ticketMessageFactory;



+ 8
- 0
Factory/Ticket/TicketFactoryInterface.php View File

<?php

namespace Lc\SovBundle\Factory\Ticket;

interface TicketFactoryInterface
{

}

+ 1
- 1
Form/Ticket/TicketFormType.php View File

ChoiceType::class, ChoiceType::class,
[ [
'label' => 'Type', 'label' => 'Type',
'choices' => $this->translatorAdmin->transChoices(TicketModel::getChoicesType(),TicketModel::class),
'choices' => $this->translatorAdmin->transChoices($entityName::getChoicesType(),TicketInterface::class),
] ]
); );



+ 2
- 0
Resources/translations/admin.fr.yaml View File

typeOptions: typeOptions:
general-question: Questions générales general-question: Questions générales
technical-problem: Problème technique technical-problem: Problème technique
product-unavailable: Produit manquant
product-error: Erreur sur un produit
lastMessage: Dernier message lastMessage: Dernier message
statusOptions: statusOptions:
open: Ouvert open: Ouvert

Loading…
Cancel
Save