diff --git a/.changes/unreleased/Fixed-20250806-134609.yaml b/.changes/unreleased/Fixed-20250806-134609.yaml new file mode 100644 index 000000000..f3c8c07c3 --- /dev/null +++ b/.changes/unreleased/Fixed-20250806-134609.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: adjust display logic for accompanying period dates, include closing date if period is closed. +time: 2025-08-06T13:46:09.241584292+02:00 +custom: + Issue: "382" + SchemaChange: No schema change diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig index b8a2e426d..0840cecb6 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig @@ -32,9 +32,16 @@
{% if app != null %} -
- {{ 'Since %date%'|trans({'%date%': app.startDate|format_date('medium') }) }} -
+ {% if acp.closingDate != null %} + {{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({ + '%opening_date%': acp.openingDate|format_date('long'), + '%closing_date%': acp.closingDate|format_date('long')} + ) }} + {% else %} +
+ {{ 'Since %date%'|trans({'%date%': app.startDate|format_date('medium') }) }} +
+ {% endif %} {% endif %} {% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', acp.id) %}