From a40077e91bdf5c060e386f3ff14c395b1966e7e6 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 10 Jan 2022 10:31:09 +0100 Subject: [PATCH] include AccompanyingPeriod in notification (shownInNotification) --- .../showInNotification.html.twig | 31 +++++++++++++------ .../translations/messages.fr.yml | 4 +++ 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/showInNotification.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/showInNotification.html.twig index f0b31ecec..b85ab301f 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/showInNotification.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/showInNotification.html.twig @@ -1,12 +1,25 @@ -{# variables availables: notification, period. #} +{% macro recordAction(period) %} +
  • + +
  • +{% endmacro %} + {% if period is not null %} - {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', period) %} - - Resume Accompanying Course (renderbox + links) - - {% else %} - You are getting a notification for a period you are not allowed to see. This is the minimal details: {{ period.id }} - {% endif %} +
    + {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', period) %} + {% include 'ChillPersonBundle:AccompanyingPeriod:_list_item.html.twig' with { + 'recordAction': _self.recordAction(notification.relatedEntityId) + } %} + {% else %} +
    + {{ 'This is the minimal details'|trans ~ ': ' ~ period.id }}
    + {{ 'You are getting a notification for a period you are not allowed to see.'|trans }} +
    + {% endif %} +
    {% else %} -
    You are getting a notification for a period which does not exists any more
    +
    + {{ 'You are getting a notification for a period which does not exists any more'|trans }} +
    {% endif %} diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index cdb499422..54fc5677a 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -484,3 +484,7 @@ period_notification: Persons are: Les usagers concernés sont les suivants Social issues are: Les problématiques sociales renseignées sont les suivantes See it online: Visualisez le parcours en ligne + +You are getting a notification for a period which does not exists any more: Cette notification ne correspond pas à une période d'accompagnement valide +You are getting a notification for a period you are not allowed to see.: Vous n'avez pas accès à cette période d'accompagnement. +This is the minimal details: Dossier n°