diff --git a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php index da8aa687e..78f134935 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php @@ -168,7 +168,7 @@ class CalendarController extends AbstractController $params = $this->buildParamsToUrl($user, $accompanyingPeriod); - return $this->redirectToRoute('chill_calendar_calendar_list', $params); + return $this->redirectToRoute('chill_calendar_calendar_list_by_period', $params); } if ($form->isSubmitted() && !$form->isValid()) { @@ -403,7 +403,7 @@ class CalendarController extends AbstractController } if (null !== $accompanyingPeriod) { - $params['accompanying_period_id'] = $accompanyingPeriod->getId(); + $params['id'] = $accompanyingPeriod->getId(); } return $params; diff --git a/src/Bundle/ChillCalendarBundle/Entity/Calendar.php b/src/Bundle/ChillCalendarBundle/Entity/Calendar.php index 89f1c25b7..99b0d6cc7 100644 --- a/src/Bundle/ChillCalendarBundle/Entity/Calendar.php +++ b/src/Bundle/ChillCalendarBundle/Entity/Calendar.php @@ -486,7 +486,10 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface } $this->calendarRange = $calendarRange; - $this->calendarRange->setCalendar($this); + + if ($this->calendarRange instanceof CalendarRange) { + $this->calendarRange->setCalendar($this); + } return $this; } diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/App.vue b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/App.vue index dcf7f7450..2a3ea19de 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/App.vue +++ b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/App.vue @@ -1,17 +1,20 @@