From 0b4d79fd5ef5a638ae2650430deebdaa421fe0e7 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 18 Feb 2022 15:51:00 +0100 Subject: [PATCH] display only last three actions in parcours resume --- .../Controller/AccompanyingCourseController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php index 7ae5c5f73..fef95d2b4 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php @@ -221,9 +221,11 @@ class AccompanyingCourseController extends Controller $activities = $this->getDoctrine()->getManager()->getRepository(Activity::class)->findBy( ['accompanyingPeriod' => $accompanyingCourse], - ['date' => 'DESC'], + ['date' => 'DESC', 'id' => 'DESC'], ); + $activities = array_slice($activities, 0, 3); + $works = $this->workRepository->findByAccompanyingPeriod( $accompanyingCourse, ['startDate' => 'DESC', 'endDate' => 'DESC'],