From 21b33fb4f63e9877ac6b32dfad9c46962235e2a1 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 22 Nov 2021 14:57:29 +0100 Subject: [PATCH] accourse resume page: add requestor and resources informations --- .../vuejs/AccompanyingCourse/js/i18n.js | 4 +- .../views/AccompanyingCourse/index.html.twig | 41 +++++++++++++++---- .../translations/messages.fr.yml | 3 ++ 3 files changed, 37 insertions(+), 11 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js index d5f5ea72e..2a562f600 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js @@ -34,7 +34,7 @@ const appMessages = { title: "Origine de la demande", label: "Origine de la demande", placeholder: "Renseignez l'origine de la demande", - not_valid: "Indiquez une origine de la demande", + not_valid: "Indiquez une origine à la demande", }, persons_associated: { title: "Usagers concernés", @@ -125,7 +125,7 @@ const appMessages = { participation_not_valid: "sélectionnez au minimum 1 usager", socialIssue_not_valid: "sélectionnez au minimum une problématique sociale", location_not_valid: "indiquez au minimum une localisation temporaire du parcours", - origin_not_valid: "indiquez une origine de la demande", + origin_not_valid: "Indiquez une origine à la demande", set_a_scope: "indiquez au moins un service", sure: "Êtes-vous sûr ?", sure_description: "Une fois le changement confirmé, il ne sera plus possible de le remettre à l'état de brouillon !", diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig index 434a87759..6c7b30a3a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig @@ -4,15 +4,12 @@ {{ 'Resume Accompanying Course'|trans }} {% endblock %} -{% macro button_person(person) %} - {% if person.isSharingHousehold %} -
  • - - - -
  • - {% endif %} +{% macro insert_onthefly(type, entity) %} + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + action: 'show', displayBadge: true, + targetEntity: { name: type, id: entity.id }, + buttonText: entity|chill_entity_render_string + } %} {% endmacro %} {% block js %} @@ -56,6 +53,32 @@ {% endif %} +
    +
    +

    {{ 'Requestor'|trans }}

    + {% if accompanyingCourse.requestorPerson is not null %} + {{ _self.insert_onthefly('person', accompanyingCourse.requestorPerson) }} + {% elseif accompanyingCourse.requestorThirdParty is not null %} + {{ _self.insert_onthefly('thirdparty', accompanyingCourse.requestorThirdParty) }} + {% else %} + {{ 'No requestor'|trans }} + {% endif %} +
    +
    +

    {{ 'Resources'|trans }}

    + {% for r in accompanyingCourse.resources %} + {% if r.person is not null %} + {{ _self.insert_onthefly('person', r.person) }} + {% elseif r.thirdParty is not null %} + {{ _self.insert_onthefly('thirdparty', r.thirdParty) }} + {% endif %} + {% endfor %} + {% if accompanyingCourse.resources is empty %} + {{ 'No resources'|trans }} + {% endif %} +
    +
    +

    {{ 'Last social actions'|trans }}

    {% include 'ChillPersonBundle:AccompanyingCourseWork:list_recent_by_accompanying_period.html.twig' with {'buttonText': false } %} diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 6dc4aebed..31996117e 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -204,6 +204,9 @@ See accompanying periods: Voir toutes les périodes d'accompagnement See accompanying period: Voir la période Edit accompanying period: Modifier la période See this period: Voir cette période +Requestor: Demandeur +No requestor: Pas de demandeur +No resources: "Pas d'interlocuteurs privilégiés" Referrer: Référent Some peoples does not belong to any household currently. Add them to an household soon: Certaines personnes n'appartiennent à aucun ménage actuellement. Renseignez leur appartenance à un ménage dès que possible. Add to household now: Ajouter à un ménage