diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php index 8a4a228eb..9529d40c0 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php @@ -242,6 +242,11 @@ class ActivityController extends AbstractController } } + if (array_key_exists('location', $activityData)) { + $location = $em->getRepository(\Chill\MainBundle\Entity\Location::class)->find($activityData['location']); + $entity->setLocation($location); + } + if (array_key_exists('comment', $activityData)) { $comment = new CommentEmbeddable(); $comment->setComment($activityData['comment']); diff --git a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php index 71e461464..a62963e07 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php @@ -234,6 +234,7 @@ class CalendarController extends AbstractController 'professionalsId' => $professionalsId, 'date' => $entity->getStartDate()->format('Y-m-d'), 'durationTime' => $durationTimeInMinutes, + 'location' => $entity->getLocation()->getId(), 'comment' => $entity->getComment()->getComment(), ];