feature: hide course when the period is not active for the user, in search results and list of periods for a person

This commit is contained in:
2022-07-11 15:57:38 +02:00
parent a79a2b6ee9
commit 6bcc28b4bb
2 changed files with 49 additions and 4 deletions

View File

@@ -235,7 +235,8 @@
{%- set acpsClosed = [] %}
{%- for acp in person.accompanyingPeriodInvolved %}
{%- if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', acp) %}
{% if acp.step == 'CLOSED' %}
{# filter for "current" periods: either the person is a requestor, or is member of the period and not closed #}
{% if acp.step == 'CLOSED' or (acp.requestorPerson is not same as(person) and acp.openParticipationContainsPerson(person) is null ) %}
{%- set acpsClosed = acpsClosed|merge([acp]) %}
{% else %}
{%- set acps = acps|merge([acp]) %}