From d254a9e14ae107dfb57e0e695b66c8e141fd7bc3 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 14 Feb 2022 12:02:15 +0100 Subject: [PATCH] add endDate field in HouseholdMember form for enfant hors menage --- CHANGELOG.md | 1 + src/Bundle/ChillPersonBundle/Form/HouseholdMemberType.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3037eda41..14040d451 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ and this project adheres to * [address]: Correction residential address 'depuis le' (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/459) * [Documents]: List view adapted to display more information (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/414) * [Thirdparty_contact]: address blurred if confidential in view page (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/450) +* [Household]: Add end date in HouseholdMember form for 'enfant hors menage' (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/434) ## Test releases diff --git a/src/Bundle/ChillPersonBundle/Form/HouseholdMemberType.php b/src/Bundle/ChillPersonBundle/Form/HouseholdMemberType.php index e0d2d9d47..99c698c91 100644 --- a/src/Bundle/ChillPersonBundle/Form/HouseholdMemberType.php +++ b/src/Bundle/ChillPersonBundle/Form/HouseholdMemberType.php @@ -25,6 +25,13 @@ class HouseholdMemberType extends AbstractType 'label' => 'household.Start date', 'input' => 'datetime_immutable', ]); + + if (!$options['data']->getPosition()->getShareHousehold()) { + $builder->add('endDate', ChillDateType::class, [ + 'label' => 'household.End date', + 'input' => 'datetime_immutable', + ]); + } $builder ->add('comment', ChillTextareaType::class, [ 'label' => 'household.Comment',