From 129690ca3f69751c79a8549a7e9083c7ba8bb34b Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 18 Dec 2024 13:48:56 +0100 Subject: [PATCH] Set the sms status to 'canceled' --- .../ChillCalendarBundle/Controller/CalendarController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php index 293cbeae6..3cd2926e5 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php @@ -119,11 +119,9 @@ class CalendarController extends AbstractController public function cancelAction(Calendar $calendar, Request $request): Response { - // Add voter // Deal with sms being sent or not // Communicate cancellation with the remote calendar. - $this->denyAccessUnlessGranted(CalendarVoter::EDIT, $calendar); [$person, $accompanyingPeriod] = [$calendar->getPerson(), $calendar->getAccompanyingPeriod()]; @@ -146,6 +144,7 @@ class CalendarController extends AbstractController if ($form->isSubmitted() && $form->isValid()) { $calendar->setStatus($calendar::STATUS_CANCELED); + $calendar->setSmsStatus($calendar::SMS_CANCEL_PENDING); $this->em->flush(); $this->addFlash('success', $this->translator->trans('chill_calendar.calendar_canceled'));