From 8ed5a023e82b812df2495cd2d29e3ed750d486a1 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 17 Jan 2024 17:27:54 +0100 Subject: [PATCH] remove attempt to adjust accompanyingperiod work for display of user job and service at specific date --- .../Entity/AccompanyingPeriod/AccompanyingPeriodWork.php | 5 ++--- .../Resources/views/AccompanyingCourseWork/_item.html.twig | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php index a0c9b91ae..cf1922644 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php @@ -394,9 +394,8 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues { $users = $this->referrersHistory ->filter(fn (AccompanyingPeriodWorkReferrerHistory $h) => null === $h->getEndDate()) - ->map(fn (AccompanyingPeriodWorkReferrerHistory $h) => ['user' => $h->getUser(), 'startDate' => $h->getStartDate()]) - ->getValues() - ; + ->map(fn (AccompanyingPeriodWorkReferrerHistory $h) => $h->getUser()) + ->getValues(); return new ArrayCollection(array_values($users)); } diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig index ad3c17783..e8f6f1171 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig @@ -83,9 +83,9 @@
{%- if w.referrers|length > 0 -%} - {% for rh in w.referrers %} + {% for r in w.referrers %} - {{ rh.user|chill_entity_render_box({'at_date': rh.startDate}) }} + {{ r|chill_entity_render_box }} {% if not loop.last %}, {% endif %} {% endfor %}