mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Set the sms status to 'canceled'
This commit is contained in:
parent
54d9f7152b
commit
129690ca3f
@ -119,11 +119,9 @@ class CalendarController extends AbstractController
|
|||||||
|
|
||||||
public function cancelAction(Calendar $calendar, Request $request): Response
|
public function cancelAction(Calendar $calendar, Request $request): Response
|
||||||
{
|
{
|
||||||
// Add voter
|
|
||||||
// Deal with sms being sent or not
|
// Deal with sms being sent or not
|
||||||
// Communicate cancellation with the remote calendar.
|
// Communicate cancellation with the remote calendar.
|
||||||
|
|
||||||
|
|
||||||
$this->denyAccessUnlessGranted(CalendarVoter::EDIT, $calendar);
|
$this->denyAccessUnlessGranted(CalendarVoter::EDIT, $calendar);
|
||||||
|
|
||||||
[$person, $accompanyingPeriod] = [$calendar->getPerson(), $calendar->getAccompanyingPeriod()];
|
[$person, $accompanyingPeriod] = [$calendar->getPerson(), $calendar->getAccompanyingPeriod()];
|
||||||
@ -146,6 +144,7 @@ class CalendarController extends AbstractController
|
|||||||
if ($form->isSubmitted() && $form->isValid()) {
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
|
|
||||||
$calendar->setStatus($calendar::STATUS_CANCELED);
|
$calendar->setStatus($calendar::STATUS_CANCELED);
|
||||||
|
$calendar->setSmsStatus($calendar::SMS_CANCEL_PENDING);
|
||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
|
|
||||||
$this->addFlash('success', $this->translator->trans('chill_calendar.calendar_canceled'));
|
$this->addFlash('success', $this->translator->trans('chill_calendar.calendar_canceled'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user