use Doctrine\ORM\EntityManagerInterface; | use Doctrine\ORM\EntityManagerInterface; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Event\EasyAdminEvents; | use EasyCorp\Bundle\EasyAdminBundle\Event\EasyAdminEvents; | ||||
use FOS\UserBundle\Model\UserManagerInterface; | use FOS\UserBundle\Model\UserManagerInterface; | ||||
use Lc\ShopBundle\Context\OrderShopInterface; | |||||
use Lc\ShopBundle\Context\UserInterface; | |||||
use Lc\ShopBundle\Form\Backend\Ticket\TicketMessageType; | use Lc\ShopBundle\Form\Backend\Ticket\TicketMessageType; | ||||
use Lc\ShopBundle\Form\Backend\Ticket\TicketStatusType; | use Lc\ShopBundle\Form\Backend\Ticket\TicketStatusType; | ||||
use Lc\ShopBundle\Model\Ticket; | use Lc\ShopBundle\Model\Ticket; | ||||
class TicketController extends AdminController | class TicketController extends AdminController | ||||
{ | { | ||||
protected $ticketUtils; | protected $ticketUtils; | ||||
protected $userUtils; | |||||
public function __construct(Security $security, UserManagerInterface $userManager, EntityManagerInterface $em, MailjetTransport $mailjetTransport, UtilsManager $utilsManager, TranslatorInterface $translator) | public function __construct(Security $security, UserManagerInterface $userManager, EntityManagerInterface $em, MailjetTransport $mailjetTransport, UtilsManager $utilsManager, TranslatorInterface $translator) | ||||
{ | { | ||||
$this->ticketUtils = $utilsManager->getTicketUtils(); | $this->ticketUtils = $utilsManager->getTicketUtils(); | ||||
$this->userUtils = $utilsManager->getUserUtils(); | |||||
parent::__construct($security, $userManager, $em, $mailjetTransport, $utilsManager, $translator); | parent::__construct($security, $userManager, $em, $mailjetTransport, $utilsManager, $translator); | ||||
} | } | ||||
'orderShop' => $entity->getOrderShop(), | 'orderShop' => $entity->getOrderShop(), | ||||
'subject' => $entity->getSubject(), | 'subject' => $entity->getSubject(), | ||||
'message' => $form->get('message')->getData(), | 'message' => $form->get('message')->getData(), | ||||
'answerByAdmin' =>true, | |||||
]) ; | |||||
'createByAdmin' => true, | |||||
]); | |||||
} | } | ||||
} | } | ||||
public function ticketStatusAction(){ | |||||
public function ticketStatusAction() | |||||
{ | |||||
$easyadmin = $this->request->attributes->get('easyadmin'); | $easyadmin = $this->request->attributes->get('easyadmin'); | ||||
$ticket = $easyadmin['item']; | $ticket = $easyadmin['item']; | ||||
$formTicketStatusForm->handleRequest($this->request); | $formTicketStatusForm->handleRequest($this->request); | ||||
if ($formTicketStatusForm->isSubmitted() && $formTicketStatusForm->isValid()) { | if ($formTicketStatusForm->isSubmitted() && $formTicketStatusForm->isValid()) { | ||||
$this->em->persist($ticket); | |||||
$this->em->flush(); | |||||
$this->em->persist($ticket); | |||||
$this->em->flush(); | |||||
$this->utils->addFlash('success', 'success.ticket.statusChange'); | |||||
$this->utils->addFlash('success', 'success.ticket.statusChange'); | |||||
} else { | } else { | ||||
$this->utils->addFlash('error', $formTicketStatusForm->getErrors()); | $this->utils->addFlash('error', $formTicketStatusForm->getErrors()); | ||||
} | } | ||||
return new Response(json_encode($response)); | return new Response(json_encode($response)); | ||||
} | } | ||||
public function newMessageTicketAction(){ | |||||
public function newMessageTicketAction() | |||||
{ | |||||
$easyadmin = $this->request->attributes->get('easyadmin'); | $easyadmin = $this->request->attributes->get('easyadmin'); | ||||
$ticket = $easyadmin['item']; | $ticket = $easyadmin['item']; | ||||
if ($formAddTicketMessage->isSubmitted() && $formAddTicketMessage->isValid()) { | if ($formAddTicketMessage->isSubmitted() && $formAddTicketMessage->isValid()) { | ||||
$this->ticketUtils->createTicketMessage(array( | $this->ticketUtils->createTicketMessage(array( | ||||
'ticket'=>$ticket, | |||||
'message'=> $formAddTicketMessage->get('message')->getData(), | |||||
'answerByAdmin'=>true | |||||
'ticket' => $ticket, | |||||
'message' => $formAddTicketMessage->get('message')->getData(), | |||||
'answerByAdmin' => true | |||||
)); | )); | ||||
$this->utils->addFlash('success', 'success.ticket.addMessage'); | $this->utils->addFlash('success', 'success.ticket.addMessage'); | ||||
'id' => $ticket->getId() | 'id' => $ticket->getId() | ||||
]); | ]); | ||||
} | } | ||||
public function newAction() | |||||
{ | |||||
$this->dispatch(EasyAdminEvents::PRE_NEW); | |||||
$entity = $this->executeDynamicMethod('createNew<EntityName>Entity'); | |||||
$easyadmin = $this->request->attributes->get('easyadmin'); | |||||
$easyadmin['item'] = $entity; | |||||
$this->request->attributes->set('easyadmin', $easyadmin); | |||||
$fields = $this->entity['new']['fields']; | |||||
$newForm = $this->executeDynamicMethod('create<EntityName>NewForm', [$entity, $fields]); | |||||
if ($this->request->request->get('user')) { | |||||
$userRepo = $this->em->getRepository(UserInterface::class); | |||||
$newForm->get('user')->setData($userRepo->find($this->request->request->get('user'))); | |||||
} | |||||
if ($this->request->request->get('orderId')) { | |||||
$newForm->get('orderId')->setData($this->request->request->get('orderId')); | |||||
} | |||||
$newForm->handleRequest($this->request); | |||||
if ($newForm->isSubmitted() && $newForm->isValid()) { | |||||
if ($newForm->get('orderId')->getData()) { | |||||
$orderShopRepo = $this->em->getRepository(OrderShopInterface::class); | |||||
$orderShop = $orderShopRepo->find($newForm->get('orderId')->getData()); | |||||
if($orderShop)$entity->setOrderShop($orderShop); | |||||
} | |||||
$this->processUploadedFiles($newForm); | |||||
$this->dispatch(EasyAdminEvents::PRE_PERSIST, ['entity' => $entity]); | |||||
$this->executeDynamicMethod('persist<EntityName>Entity', [$entity, $newForm]); | |||||
$this->dispatch(EasyAdminEvents::POST_PERSIST, ['entity' => $entity]); | |||||
$this->utils->addFlash('success', 'success.ticket.addMessage'); | |||||
if ($this->request->isXmlHttpRequest()) { | |||||
$response['type'] = 'success'; | |||||
$response['flashMessages'] = $this->utils->getFlashMessages(); | |||||
return new Response(json_encode($response)); | |||||
} else { | |||||
return $this->redirectToReferrer(); | |||||
} | |||||
} | |||||
$this->dispatch(EasyAdminEvents::POST_NEW, [ | |||||
'entity_fields' => $fields, | |||||
'form' => $newForm, | |||||
'entity' => $entity, | |||||
]); | |||||
$parameters = [ | |||||
'form' => $newForm->createView(), | |||||
'entity_fields' => $fields, | |||||
'entity' => $entity, | |||||
]; | |||||
if ($this->request->isXmlHttpRequest()) { | |||||
$response['modal'] = $this->renderView('@LcShop/backend/ticket/modal/create.html.twig', $parameters); | |||||
return new Response(json_encode($response)); | |||||
} else { | |||||
return $this->executeDynamicMethod('render<EntityName>Template', ['new', $this->entity['templates']['new'], $parameters]); | |||||
} | |||||
} | |||||
} | } |
public function buildForm(FormBuilderInterface $builder, array $options) | public function buildForm(FormBuilderInterface $builder, array $options) | ||||
{ | { | ||||
$builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event){ | $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event){ | ||||
$builder = $event->getForm()->getParent(); | $builder = $event->getForm()->getParent(); | ||||
'multiple' => false, | 'multiple' => false, | ||||
'expanded' => false, | 'expanded' => false, | ||||
'choices' => [ | 'choices' => [ | ||||
'field.Ticket.typeOptions.' . Ticket::TYPE_MESSAGE_FROM_PDL => Ticket::TYPE_MESSAGE_FROM_PDL, | |||||
'field.Ticket.typeOptions.' . Ticket::TYPE_GENERAL_QUESTION => Ticket::TYPE_GENERAL_QUESTION, | 'field.Ticket.typeOptions.' . Ticket::TYPE_GENERAL_QUESTION => Ticket::TYPE_GENERAL_QUESTION, | ||||
'field.Ticket.typeOptions.' . Ticket::TYPE_PRODUCT_UNAVAILABLE => Ticket::TYPE_PRODUCT_UNAVAILABLE, | 'field.Ticket.typeOptions.' . Ticket::TYPE_PRODUCT_UNAVAILABLE => Ticket::TYPE_PRODUCT_UNAVAILABLE, | ||||
'field.Ticket.typeOptions.' . Ticket::TYPE_PRODUCT_ERROR => Ticket::TYPE_PRODUCT_ERROR, | 'field.Ticket.typeOptions.' . Ticket::TYPE_PRODUCT_ERROR => Ticket::TYPE_PRODUCT_ERROR, |
const TYPE_TECHNICAL_PROBLEM = 'technical-problem' ; | const TYPE_TECHNICAL_PROBLEM = 'technical-problem' ; | ||||
const TYPE_GENERAL_QUESTION = 'general-question' ; | const TYPE_GENERAL_QUESTION = 'general-question' ; | ||||
const TYPE_POULTRY_BOOKING = 'poultry-booking' ; | const TYPE_POULTRY_BOOKING = 'poultry-booking' ; | ||||
const TYPE_MESSAGE_FROM_PDL = 'message-from-pdl' ; | |||||
const TICKET_STATUS_OPEN = 'open' ; | const TICKET_STATUS_OPEN = 'open' ; |
initButtonConfirm() | initButtonConfirm() | ||||
initNotice(); | initNotice(); | ||||
initBtnEditReminder(); | initBtnEditReminder(); | ||||
initBtnWriteToUser(); | |||||
$('form').on('focus', 'input[type=number]', function (e) { | $('form').on('focus', 'input[type=number]', function (e) { | ||||
$(this).on('wheel.disableScroll', function (e) { | $(this).on('wheel.disableScroll', function (e) { | ||||
e.preventDefault() | e.preventDefault() | ||||
}); | }); | ||||
} | } | ||||
function initBtnWriteToUser(){ | |||||
$('#btn-ticket-write-to-user').on('click', function () { | |||||
$btn = $(this); | |||||
var order = ''; | |||||
if($btn.data('order')) { | |||||
order = '&orderId=' + $btn.data('order'); | |||||
} | |||||
$.ajax({ | |||||
url: $btn.data('url'), | |||||
data: "user="+$btn.data('user')+order, | |||||
method: "POST", | |||||
dataType: "json", | |||||
success: function (response) { | |||||
$('body').append(response.modal); | |||||
initModalNewTicket(); | |||||
} | |||||
}); | |||||
}); | |||||
} | |||||
function initModalNewTicket(){ | |||||
$('#modal-new-ticket select.form-control').each(function (i, elm) { | |||||
if (!$(this).hasClass('disable-select2')) { | |||||
setSelect2($(elm)); | |||||
} | |||||
}); | |||||
$('#modal-new-ticket').modal('show'); | |||||
log($('#modal-new-ticket .btn-save')); | |||||
$('#modal-new-ticket .btn-save').on('click', function (){ | |||||
$form = $(this).parents('form'); | |||||
if(checkFormValidity('#'+$form.prop('id'))) { | |||||
$('#modal-new-ticket').modal('hide'); | |||||
$.ajax({ | |||||
url: $form.prop('action'), | |||||
data: $form.serialize(), | |||||
method: $form.prop('method'), | |||||
dataType: "json", | |||||
success: function (response) { | |||||
setFlashMessages(response.flashMessages); | |||||
$('#modal-new-ticket').remove(); | |||||
} | |||||
}); | |||||
} | |||||
}) | |||||
} |
type: Catégorie | type: Catégorie | ||||
message: Votre réponse | message: Votre réponse | ||||
typeOptions: | typeOptions: | ||||
message-from-pdl: Messsage de l'équipe Place du Local | |||||
general-question: Questions générales | general-question: Questions générales | ||||
product-unavailable: Produit manquant | product-unavailable: Produit manquant | ||||
product-error: Erreur sur un produit | product-error: Erreur sur un produit | ||||
add: Ajouter un pense-bête | add: Ajouter un pense-bête | ||||
address: | address: | ||||
add: Ajouter une adresse | add: Ajouter une adresse | ||||
ticket: | |||||
writeToUser: Écrire à l'utilisateur | |||||
resetting: | resetting: | ||||
check_email: | | check_email: | | ||||
Un e-mail vous a été envoyé. Il contient un lien sur lequel il vous faudra cliquer pour réinitialiser votre mot de passe. Si vous ne recevez pas d'email, vérifiez votre dossier spam ou essayez à nouveau. | Un e-mail vous a été envoyé. Il contient un lien sur lequel il vous faudra cliquer pour réinitialiser votre mot de passe. Si vous ne recevez pas d'email, vérifiez votre dossier spam ou essayez à nouveau. |
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | {% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | ||||
{% import '@LcShop/backend/order/macros.html.twig' as order_macros %} | {% import '@LcShop/backend/order/macros.html.twig' as order_macros %} | ||||
{% block global_actions %} | |||||
{% if entity.user is not null %} | |||||
<button id="btn-ticket-write-to-user" | |||||
data-url="{{ path('easyadmin', {'entity': 'Ticket', 'action': 'new'}) }}" | |||||
data-user="{{ entity.user.id }}" | |||||
class="btn-sm btn-success" | |||||
type="button"><i class="fa fa-pen-alt"></i> {{ "action.ticket.writeToUser"|trans }} | |||||
</button> | |||||
{% endif %} | |||||
{% endblock %} | |||||
{% block main %} | {% block main %} | ||||
<div class="lc-vue-js-container" id="lc-order-edit"> | <div class="lc-vue-js-container" id="lc-order-edit"> |
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | {% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | ||||
{% import '@LcShop/backend/order/macros.html.twig' as order_macros %} | {% import '@LcShop/backend/order/macros.html.twig' as order_macros %} | ||||
{% block global_actions %} | |||||
{% if entity.user is not null %} | |||||
<button id="btn-ticket-write-to-user" | |||||
data-url="{{ path('easyadmin', {'entity': 'Ticket', 'action': 'new'}) }}" | |||||
data-user="{{ entity.user.id }}" | |||||
data-order="{{ entity.id }}" | |||||
class="btn-sm btn-success" | |||||
type="button"><i class="fa fa-pen-alt"></i> {{ "action.ticket.writeToUser"|trans }} | |||||
</button> | |||||
{% endif %} | |||||
{% endblock %} | |||||
{% block main %} | {% block main %} | ||||
<div class="lc-vue-js-container" id="lc-order-edit"> | <div class="lc-vue-js-container" id="lc-order-edit"> |
{% embed "@LcShop/backend/default/block/embed_modal.twig" %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
{% block id %}modal-new-ticket{% endblock %} | |||||
{% block title %}{{ "action.ticket.writeToUser"|trans }}{% endblock %} | |||||
{% block form_start %} | |||||
{{ form_start(form, {'attr': { 'id' : 'newTicket', 'action': path('easyadmin', {'entity' : 'Ticket', 'action': 'new'})}}) }} | |||||
{% form_theme form '@LcShop/backend/form/custom_modal_bootstrap_4.html.twig' %} | |||||
{% endblock %} | |||||
{% block content %} | |||||
<div class="col"> | |||||
{{ form_row(form.user) }} | |||||
{{ form_row(form.subject) }} | |||||
<p> | |||||
<strong>Ce ticket concernera la commande #{{ form.orderId.vars.value }}</strong><br /> | |||||
<i>Si vous le souhaitez pas, écriver à l'utilisateur depuis l'onglet utilisateur</i> | |||||
</p> | |||||
{{ form_rest(form) }} | |||||
</div> | |||||
{% endblock %} | |||||
{% block footer %} | |||||
{{ parent() }} | |||||
<button type="button" class="btn btn-primary btn-save" >{{ 'action.send'|trans }}</button> | |||||
{#{{ form_rest(form) }}#} | |||||
{% endblock %} | |||||
{% block form_end %} | |||||
{{ form_end(form) }} | |||||
{% endblock %} | |||||
{% endembed %} |
{% extends app.request.query.get('action') == 'edit' ? '@LcShop/backend/default/edit.html.twig' : '@LcShop/backend/default/new.html.twig' %} | |||||
{% extends app.request.query.get('action') == 'edit' ? '@LcShop/backend/default/edit.html.twig' : '@LcShop/backend/default/new.html.twig' %} | |||||
{% trans_default_domain 'lcshop' %} | {% trans_default_domain 'lcshop' %} | ||||
{% block global_actions %} | |||||
<button id="btn-ticket-write-to-user" | |||||
data-url="{{ path('easyadmin', {'entity': 'Ticket', 'action': 'new'}) }}" | |||||
data-user="{{ entity.id }}" | |||||
class="btn-sm btn-success" | |||||
type="button"><i class="fa fa-pen-alt"></i> {{ "action.ticket.writeToUser"|trans }}</button> | |||||
{% endblock %} | |||||
{% block entity_form %} | {% block entity_form %} | ||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | {% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | ||||
{{ form_start(form) }} | {{ form_start(form) }} | ||||
{% form_theme form '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | {% form_theme form '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | ||||
<div class="row"> | <div class="row"> | ||||
<div class="col-7"> | |||||
{{ macros.card_start() }} | |||||
<div class="col"> | |||||
{% for field in form.children %} | |||||
{{ form_row(field) }} | |||||
{% endfor %} | |||||
</div> | |||||
{{ macros.card_end() }} | |||||
</div> | |||||
<div class="col-7"> | |||||
{{ macros.card_start() }} | |||||
<div class="col"> | |||||
{% for field in form.children %} | |||||
{{ form_row(field) }} | |||||
{% endfor %} | |||||
</div> | |||||
{{ macros.card_end() }} | |||||
</div> | |||||
<div class="col-5"> | <div class="col-5"> | ||||
<div class="row" id="user-addresses"> | <div class="row" id="user-addresses"> | ||||
{% for address in entity.addresses %} | |||||
{% if address.status >=0 %} | |||||
{% include '@LcShop/backend/user/block_useraddress.html.twig' %} | |||||
{% endif %} | |||||
{% endfor %} | |||||
{% for address in entity.addresses %} | |||||
{% if address.status >=0 %} | |||||
{% include '@LcShop/backend/user/block_useraddress.html.twig' %} | |||||
{% endif %} | |||||
{% endfor %} | |||||
</div> | </div> | ||||
<button type="button" data-url="{{ path('easyadmin', {"action": 'editAddressUser', 'entity': 'User', 'id': entity.id, 'addressId': 'new'}) }}" | |||||
class="btn btn-primary btn-add-user-address" ><i class="fa fa-plus"></i> {{ 'action.address.add'|trans }} | |||||
<button type="button" | |||||
data-url="{{ path('easyadmin', {"action": 'editAddressUser', 'entity': 'User', 'id': entity.id, 'addressId': 'new'}) }}" | |||||
class="btn btn-primary btn-add-user-address"><i | |||||
class="fa fa-plus"></i> {{ 'action.address.add'|trans }} | |||||
</button> | </button> | ||||
</div> | </div> |
{% extends '@LcShop/backend/default/show.html.twig' %} | {% extends '@LcShop/backend/default/show.html.twig' %} | ||||
{% trans_default_domain 'lcshop' %} | {% trans_default_domain 'lcshop' %} | ||||
{% block global_actions %} | |||||
<button id="btn-ticket-write-to-user" | |||||
data-url="{{ path('easyadmin', {'entity': 'Ticket', 'action': 'new'}) }}" | |||||
data-user="{{ entity.user.id }}" | |||||
class="btn-sm btn-success" | |||||
type="button"><i class="fa fa-pen-alt"></i> {{ "action.ticket.writeToUser"|trans }}</button> | |||||
{% endblock %} | |||||
{% block main %} | {% block main %} | ||||
<div class="row"> | <div class="row"> | ||||
<td class="sorted">{{ creditHistory.id }}</td> | <td class="sorted">{{ creditHistory.id }}</td> | ||||
<td class="association">{{ creditHistory.type }}</td> | <td class="association">{{ creditHistory.type }}</td> | ||||
<td class="">{{ creditHistory.amountInherited }} €</td> | <td class="">{{ creditHistory.amountInherited }} €</td> | ||||
<td class="">{{ creditHistory.meanPaymentInherited }}</td> | |||||
<td class="">{{ creditHistory.meanPaymentInherited }}</td> | |||||
<td class="">{{ creditHistory.paidAtInherited |date('d-m-y') }}</td> | <td class="">{{ creditHistory.paidAtInherited |date('d-m-y') }}</td> | ||||
<td class="">{{ creditHistory.referenceInherited }}</td> | |||||
<td class="">{{ creditHistory.commentInherited }}</td> | |||||
<td class="">{{ creditHistory.referenceInherited }}</td> | |||||
<td class="">{{ creditHistory.commentInherited }}</td> | |||||
</tr> | </tr> | ||||
{% else %} | {% else %} | ||||
{% block head_stylesheets %} | {% block head_stylesheets %} | ||||
{{ parent() }} | {{ parent() }} | ||||
<link rel="stylesheet" href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/datatables/fixedHeader.dataTables.min.css') }}"> | |||||
<link rel="stylesheet" | |||||
href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/datatables/fixedHeader.dataTables.min.css') }}"> | |||||
<link rel="stylesheet" | <link rel="stylesheet" | ||||
href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/datatables/dataTables.bootstrap4.min.css') }}"> | href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/datatables/dataTables.bootstrap4.min.css') }}"> | ||||
{% endblock %} | {% endblock %} |
$ticketMessage->setStatus(1) ; | $ticketMessage->setStatus(1) ; | ||||
$ticketMessage->setTicket($ticket) ; | $ticketMessage->setTicket($ticket) ; | ||||
$ticketMessage->setMessage($params['message']) ; | $ticketMessage->setMessage($params['message']) ; | ||||
if(isset($params['answerByAdmin']) && $params['answerByAdmin'])$ticketMessage->setAnswerByAdmin(true); | |||||
if(isset($params['createByAdmin']) && $params['createByAdmin'])$ticketMessage->setAnswerByAdmin(true); | |||||
$this->em->persist($ticketMessage); | $this->em->persist($ticketMessage); | ||||
$this->em->flush() ; | $this->em->flush() ; | ||||
// envoi email au client | |||||
$this->mailUtils->send([ | |||||
MailUtils::SUBJECT => 'Nouvelle demande', | |||||
MailUtils::TO_EMAIL => $email, | |||||
MailUtils::CONTENT_TEMPLATE => 'mail/ticket-new', | |||||
MailUtils::CONTENT_DATA => [ | |||||
'firstname' => $firstname, | |||||
'ticket' => $ticket | |||||
], | |||||
]) ; | |||||
if(isset($params['createByAdmin']) && $params['createByAdmin']) { | |||||
// envoi email au client | |||||
$this->mailUtils->send([ | |||||
MailUtils::SUBJECT => 'Vous avez reçu un nouveau message', | |||||
MailUtils::TO_EMAIL => $email, | |||||
MailUtils::CONTENT_TEMPLATE => 'mail/ticket-new-by-admin', | |||||
MailUtils::CONTENT_DATA => [ | |||||
'firstname' => $firstname, | |||||
'ticket' => $ticket | |||||
], | |||||
]); | |||||
}else{ | |||||
$this->mailUtils->send([ | |||||
MailUtils::SUBJECT => 'Nouvelle demande', | |||||
MailUtils::TO_EMAIL => $email, | |||||
MailUtils::CONTENT_TEMPLATE => 'mail/ticket-new', | |||||
MailUtils::CONTENT_DATA => [ | |||||
'firstname' => $firstname, | |||||
'ticket' => $ticket | |||||
], | |||||
]); | |||||
} | |||||
$this->notifyAdmin($ticket, $ticketMessage); | $this->notifyAdmin($ticket, $ticketMessage); |