diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php index 0cb3c1473..79b0b8046 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php @@ -207,7 +207,6 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle $works = $this->workRepository->findByAccompanyingPeriod( $accompanyingCourse, ['startDate' => 'DESC', 'endDate' => 'DESC'], - 3 ); $counters = [ @@ -220,7 +219,7 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle 'accompanyingCourse' => $accompanyingCourse, 'withoutHousehold' => $withoutHousehold, 'participationsByHousehold' => $accompanyingCourse->actualParticipationsByHousehold(), - 'works' => $works, + 'works' => \array_slice($works, 0, 3), 'activities' => \array_slice($activities, 0, 3), 'counters' => $counters, ]); diff --git a/src/Bundle/ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php index 8c93f461d..7eb4b63bc 100644 --- a/src/Bundle/ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php +++ b/src/Bundle/ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php @@ -87,7 +87,7 @@ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface ], ]) ->setExtras([ 'order' => 40, - 'counter' => count($period->getOpenWorks()) > 0 ? count($period->getOpenWorks()) : null, + 'counter' => count($period->getWorks()) > 0 ? count($period->getWorks()) : null, ]); }