{{ activityType.name|localize_translatable_string }}
diff --git a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php
index 467c8eed2..103887d36 100644
--- a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php
+++ b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php
@@ -215,10 +215,28 @@ class CalendarController extends AbstractController
throw $this->createNotFoundException('Template not found');
}
+ $personsId = [];
+ foreach ($entity->getPersons() as $p) {
+ array_push($personsId, $p->getId());
+ }
+
+ $professionalsId = [];
+ foreach ($entity->getProfessionals() as $p) {
+ array_push($professionalsId, $p->getId());
+ }
+
+ $activityData = [
+ 'personsId' => $personsId,
+ 'professionalsId' => $professionalsId,
+ 'date' => $entity->getStartDate()->format('Y-m-d'),
+ 'durationTime' => $entity->getEndDate()->diff($entity->getStartDate())->format("%H:%M")
+ ];
+
return $this->render($view, [
'accompanyingCourse' => $accompanyingPeriod,
'entity' => $entity,
- 'user' => $user
+ 'user' => $user,
+ 'activityData' => $activityData
//'delete_form' => $deleteForm->createView(),
]);
}
diff --git a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig
index 971abe67d..e8830a33d 100644
--- a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig
+++ b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig
@@ -65,13 +65,21 @@