From 52a0c0e95bd81dc005fbd52553a690ea13a873f4 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 27 Aug 2021 09:30:15 +0200 Subject: [PATCH 01/18] create new person: add an action and put action buttons in a dropdown --- .../Controller/PersonController.php | 4 ++- .../Resources/views/Person/create.html.twig | 26 +++++++++++++++---- .../translations/messages.fr.yml | 3 ++- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonController.php b/src/Bundle/ChillPersonBundle/Controller/PersonController.php index c390565b5..759f892b2 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonController.php @@ -244,7 +244,9 @@ final class PersonController extends AbstractController 'label' => 'Add the person' ])->add('createPeriod', SubmitType::class, [ 'label' => 'Add the person and create an accompanying period' - ]); + ])->add('createHousehold', SubmitType::class, [ + 'label' => 'Add the person and create an household' + ]); // TODO createHousehold form action $form->handleRequest($request); diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig index 9718308ed..eddcfd676 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig @@ -76,12 +76,28 @@ {{ form_row(form.gender, { 'label' : 'Gender'|trans }) }} +
+ {# TODO remove this field (vendee) #} + {{ form_row(form.center, { 'label' : 'Center'|trans }) }} +
+ diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 54c1f3818..852f3256b 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -119,7 +119,8 @@ address_country_code: Code pays 'Alreay existing person': 'Dossiers déjà encodés' 'Add the person': 'Ajouter la personne' -'Add the person and create an accompanying period': "Ajouter la personne et créer une période d'accompagnement" +'Add the person and create an accompanying period': "Créer la personne ET créer une période d'accompagnement" +'Add the person and create an household': "Créer la personne ET créer un ménage" Show person: Voir le dossier de la personne 'Confirm the creation': 'Confirmer la création' 'You will create this person': 'Vous allez créer le dossier suivant' From a302f0fdbfe6c1272d623e9e02576213d229793f Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 27 Aug 2021 09:35:28 +0200 Subject: [PATCH 02/18] invert firstname lastname when creating new person (TO BE CONFIRMED) --- .../ChillPersonBundle/Resources/views/Person/create.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig index eddcfd676..7056f25a3 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig @@ -64,10 +64,10 @@ {{ form_start(form) }} - {{ form_row(form.firstName, { 'label' : 'First name'|trans }) }} - {{ form_row(form.lastName, { 'label' : 'Last name'|trans }) }} + {{ form_row(form.firstName, { 'label' : 'First name'|trans }) }} + {% if form.altNames is defined %} {{ form_widget(form.altNames) }} {% endif %} From 2333b5c6b467d354ff6a63cccb054dc4677c52c3 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 27 Aug 2021 09:55:13 +0200 Subject: [PATCH 03/18] rename some translations --- .../Resources/views/Activity/show.html.twig | 8 ++++---- .../Resources/public/vuejs/Address/i18n.js | 2 +- .../Resources/public/vuejs/_js/i18n.js | 4 ++-- .../Controller/AccompanyingCourseController.php | 2 +- .../Menu/AccompanyingCourseMenuBuilder.php | 2 +- .../views/AccompanyingCourse/history.html.twig | 16 ++++++++-------- .../translations/messages.fr.yml | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig index f46e80cd2..81ebddc05 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig @@ -73,7 +73,7 @@ {% endif %} {% if t.commentVisible %} -
{{ 'Comment'|trans }}
+
{{ 'activity.comment'|trans }}
{%- if entity.comment.empty -%}
{{ 'No comment associated'|trans }}
{%- else -%} @@ -120,17 +120,17 @@ {{ 'Edit'|trans }} - + {# TODO {% if is_granted('CHILL_ACTIVITY_DELETE', entity) %} #} - +
  • {{ 'Delete'|trans }}
  • - + {# {% endif %} #} diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/i18n.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/i18n.js index 9cfd05a3e..2b4b4a9ea 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/i18n.js +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/i18n.js @@ -24,7 +24,7 @@ const addressMessages = { flat: 'Appartement', buildingName: 'Nom du bâtiment', extra: 'Complément d\'adresse', - distribution: 'Service particulier de distribution', + distribution: 'Cedex', create_postal_code: 'Localité inconnue. Cliquez ici pour créer une nouvelle localité', postalCode_name: 'Nom', postalCode_code: 'Code postal', diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js index f15dd6143..63e0da95a 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js @@ -43,7 +43,7 @@ const messages = { check_all: "cocher tout", reset: "réinitialiser", redirect: { - person: "Quitter la page et ouvrir le dossier", + person: "Quitter la page et ouvrir la fiche de l'usager", thirdparty: "Quitter la page et voir le tiers", } }, @@ -57,7 +57,7 @@ const messages = { show: { person: "Détails de l'usager", thirdparty: "Détails du tiers", - file_person: "Ouvrir le dossier", + file_person: "Ouvrir la fiche de l'usager", file_thirdparty: "Voir le Tiers", }, edit: { diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php index de67602b4..2f086c9f5 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php @@ -139,7 +139,7 @@ class AccompanyingCourseController extends Controller /** * History page of Accompanying Course section * - * the page show anti chronologic history with all actions, title of page is 'accompanying course details' + * the page show anti chronologic history with all actions, title of page is 'Accompanying Course History' * * @Route("/{_locale}/parcours/{accompanying_period_id}/history", name="chill_person_accompanying_course_history") * @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"}) diff --git a/src/Bundle/ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php index 744e5dbbe..df70b9e64 100644 --- a/src/Bundle/ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php +++ b/src/Bundle/ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php @@ -54,7 +54,7 @@ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface return; } - $menu->addChild($this->translator->trans('Accompanying Course Details'), [ + $menu->addChild($this->translator->trans('Accompanying Course History'), [ 'route' => 'chill_person_accompanying_course_history', 'routeParameters' => [ 'accompanying_period_id' => $period->getId() diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/history.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/history.html.twig index 5b0ada868..488dc3df9 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/history.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/history.html.twig @@ -1,7 +1,7 @@ {% extends '@ChillPerson/AccompanyingCourse/layout.html.twig' %} {% block title %} - {{ 'Accompanying Course Details'|trans }} + {{ 'Accompanying Course History'|trans }} {% endblock %} {% block content %} @@ -15,8 +15,8 @@ Il faudrait peut-être modifier son adresse comme ceci: `/fr/parcours/{id}/timeline`

    - {# start test flex-table - + {# start test flex-table +
    {% for p in accompanyingCourse.participations %}
    @@ -52,16 +52,16 @@
  • - +
    - Lorem ipsum dolor sit amet, incididunt ut labore et dolore magna aliqua. + Lorem ipsum dolor sit amet, incididunt ut labore et dolore magna aliqua.
    - Rhoncus est pellentesque elit eu ultrices vitae auctor. + Rhoncus est pellentesque elit eu ultrices vitae auctor.
    - Facilisis gravida neque convallis a cras semper auctor neque. + Facilisis gravida neque convallis a cras semper auctor neque.
    {% endfor %} @@ -70,5 +70,5 @@ {# end test flex-table #} {# ==> insert accompanyingCourse vue component #} -
    +
    {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 852f3256b..8b6b6db58 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -373,7 +373,7 @@ Confirmed: en file active # Accompanying Course Accompanying Course: Parcours d'accompagnement -Accompanying Course Details: Détails du parcours +Accompanying Course History: Historique du parcours Resume Accompanying Course: Résumé du parcours Show Accompanying Course: Voir le parcours Edit Accompanying Course: Modifier le parcours From c258179017fbcc4d1720959dd179b12cd841edff Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 27 Aug 2021 11:02:35 +0200 Subject: [PATCH 04/18] move and rename vue HouseholdRenderBox --- .../components/Household.vue | 8 +-- .../HouseholdRenderBox.vue} | 61 ++++++++----------- 2 files changed, 30 insertions(+), 39 deletions(-) rename src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/{Household/Household.vue => Entity/HouseholdRenderBox.vue} (82%) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Household.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Household.vue index 05746429c..23334a0f9 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Household.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Household.vue @@ -3,7 +3,7 @@
    - +
    @@ -101,7 +101,7 @@ v-for="h in filterHouseholdSuggestionByAccompanyingPeriod" class="item" > - +
    • @@ -155,14 +155,14 @@ div.householdAddressSuggestionList { + + diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/HouseholdRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/HouseholdRenderBox.vue index 21734e7e8..741470b81 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/HouseholdRenderBox.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/HouseholdRenderBox.vue @@ -1,71 +1,56 @@ -