From 46337ef25ded6384a943a665a76742424bead76d Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 1 Feb 2022 15:09:42 +0100 Subject: [PATCH 1/7] in process... need to be sure which address to display exactly --- .../views/Person/household_history.html.twig | 14 +++++++++++++- .../translations/messages+intl-icu.fr.yaml | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig index d56fa30b1..6a8f0ee15 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig @@ -32,9 +32,21 @@
+ {% if p.household is same as p.person.getCurrentHousehold %} +
+
+

{{ 'Address'|trans }}

+
+
+ {% for h in p.person.getHouseholdParticipationsNotShareHousehold %} +

{{ h.address }}

+ {% endfor %} +
+
+ {% endif %}
-

En tant que

+

{{ 'As member'|trans }}

{{ p.position.label|localize_translatable_string }} diff --git a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml index ecafb367e..aded38b4a 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml +++ b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml @@ -98,6 +98,7 @@ household: from: Depuis to: Jusqu'au person history: Ménages + As member: En tant que household_composition: Since: >- From ece30b63c380001a983bc8136d3434b77c75b2ac Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 1 Feb 2022 15:09:42 +0100 Subject: [PATCH 2/7] in process... need to be sure which address to display exactly --- .../views/Person/household_history.html.twig | 14 +++++++++++++- .../translations/messages+intl-icu.fr.yaml | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig index d56fa30b1..6a8f0ee15 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig @@ -32,9 +32,21 @@

+ {% if p.household is same as p.person.getCurrentHousehold %} +
+
+

{{ 'Address'|trans }}

+
+
+ {% for h in p.person.getHouseholdParticipationsNotShareHousehold %} +

{{ h.address }}

+ {% endfor %} +
+
+ {% endif %}
-

En tant que

+

{{ 'As member'|trans }}

{{ p.position.label|localize_translatable_string }} diff --git a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml index ecafb367e..aded38b4a 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml +++ b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml @@ -98,6 +98,7 @@ household: from: Depuis to: Jusqu'au person history: Ménages + As member: En tant que household_composition: Since: >- From a083a320ae89cc949a7affe71d17fcc84c942c2e Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 11 Feb 2022 12:34:18 +0100 Subject: [PATCH 3/7] display address of current household --- .../Resources/views/Person/household_history.html.twig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig index 6a8f0ee15..824909acb 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig @@ -38,9 +38,7 @@

{{ 'Address'|trans }}

- {% for h in p.person.getHouseholdParticipationsNotShareHousehold %} -

{{ h.address }}

- {% endfor %} +

{{ p.household.getCurrentAddress|chill_entity_render_box }}

{% endif %} From add85887676e5f6a0c804fdcdfb7c7272847e204 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 11 Feb 2022 12:36:05 +0100 Subject: [PATCH 4/7] changelog updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 570bb2c0a..9e53ae3fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to * change order for accompanying course work list * [person]: style fix in parcours listing per person. (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/432) +* [household]: display address of current household (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/415) ## Test releases From 42579b57529b56cda533d9fe9952f5d1d7c1c929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 11 Feb 2022 14:49:59 +0100 Subject: [PATCH 5/7] fix translation and how holder is shown --- .../Resources/views/Person/household_history.html.twig | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig index 824909acb..ed3b3020b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig @@ -44,12 +44,16 @@ {% endif %}
-

{{ 'As member'|trans }}

+

{{ 'household.As member'|trans }}

-

{{ p.position.label|localize_translatable_string }} +

+ {{ p.position.label|localize_translatable_string }} {% if p.holder %} - {{ 'household.holder'|trans }} + + + T + {% endif %}

From 3c5d269ece4027a34cf3a81be233214c334859fc Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 11 Feb 2022 14:58:11 +0100 Subject: [PATCH 6/7] template fixes residential address --- CHANGELOG.md | 2 +- .../Resources/views/ResidentialAddress/list.html.twig | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0da81633b..e729f18de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ and this project adheres to * [homepage_widget]: fix translation on emergency badge (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/440) * [person]: create person and household added to button dropdown (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/454) * display full address in address.text in normalization. Adapt AddressRenderBox - +* [address]: Correction residential address 'depuis le' (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/459) ## Test releases diff --git a/src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/list.html.twig index 0eebf7e5d..69e12f36d 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/list.html.twig @@ -29,10 +29,10 @@
    - {% if a.endDate is not null %}
  • {{'Since'|trans}} : {{ a.startDate|format_date('long') }}
  • + {% if a.endDate is not null %} +
  • {{'Until'|trans}} : {{ a.endDate|format_date('long') }}
  • {% endif %} -
  • {{'Until'|trans}} : {{ a.endDate|format_date('long') }}
From 22417ee9f973ffedfa21f1585dc90421adc2dfd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 11 Feb 2022 15:03:54 +0100 Subject: [PATCH 7/7] fix tests for address render --- .../Templating/Entity/AddressRenderTest.php | 18 +++++++++--------- .../Controller/PersonController.php | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Tests/Templating/Entity/AddressRenderTest.php b/src/Bundle/ChillMainBundle/Tests/Templating/Entity/AddressRenderTest.php index fcd7b374a..3f828bfc5 100644 --- a/src/Bundle/ChillMainBundle/Tests/Templating/Entity/AddressRenderTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Templating/Entity/AddressRenderTest.php @@ -48,7 +48,7 @@ final class AddressRenderTest extends KernelTestCase $addr->setBuildingName('Résidence "Les Bleuets"'); - yield [$addr, 'Résidence "Les Bleuets" - Rue ABC, 5 - 012345 Locality - Belgium']; + yield [$addr, 'Résidence "Les Bleuets" — Rue ABC, 5 — 012345 Locality — Belgium']; } public function addressDataProviderBEWithSteps(): Iterator @@ -68,7 +68,7 @@ final class AddressRenderTest extends KernelTestCase $addr->setSteps('4'); - yield [$addr, 'esc 4 - Rue ABC, 5 - 012345 Locality - Belgium']; + yield [$addr, 'esc 4 — Rue ABC, 5 — 012345 Locality — Belgium']; } public function addressDataProviderFRWithBuilding(): Iterator @@ -88,7 +88,7 @@ final class AddressRenderTest extends KernelTestCase $addr->setBuildingName('Résidence "Les Bleuets"'); - yield [$addr, 'Résidence "Les Bleuets" - 5, Rue ABC - 012345 Locality - France']; + yield [$addr, 'Résidence "Les Bleuets" — 5, Rue ABC — 012345 Locality — France']; } public function addressDataProviderFRWithSteps(): Iterator @@ -108,7 +108,7 @@ final class AddressRenderTest extends KernelTestCase $addr->setSteps('4'); - yield [$addr, 'esc 4 - 5, Rue ABC - 012345 Locality - France']; + yield [$addr, 'esc 4 — 5, Rue ABC — 012345 Locality — France']; } public function complexAddressDataProviderBE(): Iterator @@ -132,7 +132,7 @@ final class AddressRenderTest extends KernelTestCase $addr->setCorridor('3'); $addr->setSteps('4'); - yield [$addr, 'Résidence "Les Bleuets" - appart 1 - ét 2 - coul 3 - esc 4 - Rue ABC, 5 - 012345 Locality - Belgium']; + yield [$addr, 'Résidence "Les Bleuets" - appart 1 - ét 2 - coul 3 - esc 4 — Rue ABC, 5 — 012345 Locality — Belgium']; } public function complexAddressDataProviderFR(): Iterator @@ -158,7 +158,7 @@ final class AddressRenderTest extends KernelTestCase $addr->setExtra('A droite de la porte'); $addr->setDistribution('CEDEX'); - yield [$addr, 'appart 1 - ét 2 - coul 3 - esc 4 - Résidence "Les Bleuets" - 5, Rue ABC - A droite de la porte - 012345 Locality CEDEX - France']; + yield [$addr, 'appart 1 - ét 2 - coul 3 - esc 4 — Résidence "Les Bleuets" — 5, Rue ABC — A droite de la porte — 012345 Locality CEDEX — France']; } public function noFullAddressDataProviderBE(): Iterator @@ -175,7 +175,7 @@ final class AddressRenderTest extends KernelTestCase $addr->setPostcode($postCode) ->setIsNoAddress(true); - yield [$addr, '012345 Locality - Belgium']; + yield [$addr, '012345 Locality — Belgium']; } public function simpleAddressDataProviderBE(): Iterator @@ -193,7 +193,7 @@ final class AddressRenderTest extends KernelTestCase ->setStreetNumber('5') ->setPostcode($postCode); - yield [$addr, 'Rue ABC, 5 - 012345 Locality - Belgium']; + yield [$addr, 'Rue ABC, 5 — 012345 Locality — Belgium']; } public function simpleAddressDataProviderFR(): Iterator @@ -211,7 +211,7 @@ final class AddressRenderTest extends KernelTestCase ->setStreetNumber('5') ->setPostcode($postCode); - yield [$addr, '5, Rue ABC - 012345 Locality - France']; + yield [$addr, '5, Rue ABC — 012345 Locality — France']; } /** diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonController.php b/src/Bundle/ChillPersonBundle/Controller/PersonController.php index ac371a2af..ef06e4d3e 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonController.php @@ -225,7 +225,7 @@ final class PersonController extends AbstractController ])->add('createPeriod', SubmitType::class, [ 'label' => 'Add the person and create an accompanying period', ])->add('createHousehold', SubmitType::class, [ - 'label' => 'Add the person and create a household' + 'label' => 'Add the person and create a household', ]); $form->handleRequest($request);