From d8b2d3cd901d81de8dc5de7a89e04acf7ea79ecb Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 2 Sep 2021 22:19:03 +0200 Subject: [PATCH 01/32] rename address-render-box component (cfr b9602aa72 - file had been moved and renamed, now we just rename component name into import and template ) --- .../public/vuejs/Address/components/ShowAddressPane.vue | 6 +++--- .../AccompanyingCourse/components/ButtonLocation.vue | 6 +++--- .../AccompanyingCourse/components/CourseLocation.vue | 8 ++++---- .../public/vuejs/AccompanyingCourseWorkEdit/App.vue | 8 ++++---- .../vuejs/HouseholdMembersEditor/components/Household.vue | 6 +++--- .../vuejs/_components/Entity/HouseholdRenderBox.vue | 6 +++--- .../public/vuejs/_components/Entity/PersonRenderBox.vue | 6 +++--- .../vuejs/_components/Entity/ThirdPartyRenderBox.vue | 6 +++--- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowAddressPane.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowAddressPane.vue index 738c1ab08..d3894f972 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowAddressPane.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowAddressPane.vue @@ -11,7 +11,7 @@ {{ $t(getSuccessText) }} - +

{{ $t(getValidFromDateText) }}

@@ -48,12 +48,12 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue index 5eeda6ac7..19d35381c 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue @@ -29,7 +29,7 @@ v-bind:options="this.options" v-bind:default="this.default" v-bind:entity="this.entity" - v-bind:valid="this.valid" + v-bind:valid="this.context.valid" v-bind:flag="this.flag" ref="showAddress"> @@ -55,7 +55,7 @@ v-bind:options="this.options" v-bind:default="this.default" v-bind:entity="this.entity" - v-bind:valid="this.valid" + v-bind:valid="this.context.valid" v-bind:flag="this.flag" ref="showAddress" v-bind:insideModal="false" @openEditPane="openEditPane" @@ -182,10 +182,6 @@ export default { zoom: 12 }, }, - valid: { - from: new Date(), - to: null - }, errorMsg: [] } }, @@ -475,17 +471,17 @@ export default { postPostalCode(postcodeBody) .then(postalCode => { payload.newAddress.postcode = {'id': postalCode.id }; - this.patchExistingAddress(payload.addressId, payload.newAddress); + this.patchExistingAddress(payload); }); } else { - this.patchExistingAddress(payload.addressId, payload.newAddress); + this.patchExistingAddress(payload); } }, - patchExistingAddress(addressId, newAddress) { - console.log('patchExistingAddress', addressId, newAddress); - patchAddress(addressId, newAddress) + patchExistingAddress(payload) { + console.log('patchExistingAddress', payload); + patchAddress(payload.addressId, payload.newAddress) .then(address => new Promise((resolve, reject) => { this.entity.address = address; this.flag.loading = false; @@ -499,7 +495,7 @@ export default { }, /* - * When submit address + * Method called by parent when submitting address * (get out step1 show pane, submit button) */ submitNewAddress() @@ -507,92 +503,16 @@ export default { let payload = { entity: this.context.entity.type, entityId: this.context.entity.id, - addressId: this.entity.address.address_id, - body: { - validFrom: { - datetime: `${this.valid.from.toISOString().split('T')[0]}T00:00:00+0100` - } - }, - backUrl: this.context.backUrl - } + addressId: this.entity.address.address_id + }; - if ( payload.entity !== 'person' && payload.entity !== 'household' ) { - - // just return payload to parent - // (changes will be patched in parent store) - this.initForm(); - this.flag.showPane = false; - return payload; - } - - console.log('submitNewAddress with', payload); - this.addDateToAddressAndAddressTo(payload); + console.log('submitNewAddress return', payload); this.initForm(); this.flag.showPane = false; - }, - - addDateToAddressAndAddressTo(payload) - { - console.log('addDateToAddressAndAddressTo', payload.entity) - this.flag.loading = true; - return patchAddress(payload.addressId, payload.body) - .then(address => new Promise((resolve, reject) => { - this.valid.from = address.validFrom; - resolve(); - }) - .then(this.postAddressTo(payload)) - ) - .catch((error) => { - this.errorMsg.push(error); - this.flag.loading = false; - }); - }, - - postAddressTo(payload) - { - console.log('postAddressTo', payload.entity); - if (!this.context.edit) { - switch (payload.entity) { - case 'household': - postAddressToHousehold(payload.entityId, payload.addressId) - .then(household => new Promise((resolve, reject) => { - console.log('postAddressToHousehold', household); - this.flag.loading = false; - this.flag.success = true; - window.location.assign(payload.backUrl); - resolve(); - })) - .catch((error) => { - this.errorMsg.push(error); - this.flag.loading = false; - }) - ; - break; - case 'person': - postAddressToPerson(payload.entityId, payload.addressId) - .then(person => new Promise((resolve, reject) => { - console.log('postAddressToPerson', person); - this.flag.loading = false; - this.flag.success = true; - window.location.assign(payload.backUrl); - resolve(); - })) - .catch((error) => { - this.errorMsg.push(error); - this.flag.loading = false; - }) - ; - break; - default: - this.errorMsg.push('That entity is not managed by address !'); - } - } else { - // address is already linked, just finish ! - window.location.assign(payload.backUrl); - } - }, + return payload; + } } } From 93c08f7e18e4fe2cee236998cddee3ba9a791c1c Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 6 Sep 2021 15:05:08 +0200 Subject: [PATCH 15/32] vue_accourse: adding current_household link on associated_persons --- .../components/ButtonLocation.vue | 2 +- .../PersonsAssociated/ParticipationItem.vue | 21 ++++++++++++------- .../vuejs/AccompanyingCourse/js/i18n.js | 3 +++ .../_components/Entity/PersonRenderBox.vue | 16 +++++++++++--- .../Normalizer/PersonNormalizer.php | 7 ++++++- 5 files changed, 37 insertions(+), 12 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/ButtonLocation.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/ButtonLocation.vue index 60d81969b..f4f2f1c78 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/ButtonLocation.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/ButtonLocation.vue @@ -33,7 +33,7 @@ import AddressRenderBox from "ChillMainAssets/vuejs/_components/Entity/AddressRe export default { name: "ButtonLocation", components: { - import AddressRenderBox from, + AddressRenderBox, Modal, }, props: ['person'], diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue index ce6a20bb6..45cdd9775 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue @@ -9,7 +9,8 @@ addAge : false, hLevel : 3, }" - :person="participation.person"> + :person="participation.person" + :returnPath="getAccompanyingCourseReturnPath"> + + + + + + + + From 6e57d16ebf35cb64641c4e062c2a350f229ca627 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 6 Sep 2021 16:36:27 +0200 Subject: [PATCH 20/32] fix conflict with fa-ul and floatbutton (different with top or bottom) --- .../Resources/public/chill/scss/flex_table.scss | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss index 82ea0aa04..c25285da1 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss @@ -260,8 +260,7 @@ div.wrap-header { /* * FLOATBUTTON -* pas convaincant: -* conflits avec les fa-ul > li, lien non cliquables, text qui ne se place pas correctement +* p-ê pas convaincant: cet asset est toujours en observation */ div.floatbutton { @@ -278,6 +277,11 @@ div.floatbutton { div.action { padding: 0 0 1em 1em; } + + // avoid a position relative that make links unclickable + .fa-ul > li { + position: initial; + } } &.bottom { display: flex; @@ -301,9 +305,4 @@ div.floatbutton { background-color: #00ffffa3; } } - - // avoid a position relative that make links unclickable - .fa-ul > li { - //position: initial; // in conflict with picto fa-ul !! - } } From cf78c59e768edc635b2649b300fcf081c6c464d0 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 6 Sep 2021 16:37:30 +0200 Subject: [PATCH 21/32] vue personRenderBox when no returnPath --- .../Resources/public/vuejs/AccompanyingCourse/js/i18n.js | 2 +- .../public/vuejs/_components/Entity/PersonRenderBox.vue | 3 ++- 2 files changed, 3 insertions(+), 2 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 66c45dc13..cf685cac3 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js @@ -44,7 +44,7 @@ const appMessages = { date_start_to_end: "Participation du {start} au {end}", leave_course: "L'usager quitte le parcours", sure: "Êtes-vous sûr ?", - sure_description: "Une fois confirmé, il ne sera pas possible de faire marche arrière ! La sortie restera cependant consignée dans l'historique du parcours.", + sure_description: "Une fois confirmé, il ne sera pas possible de faire marche arrière ! La sortie reste cependant consignée dans l'historique du parcours.", ok: "Oui, l'usager quitte le parcours", show_household_number: "Voir le ménage (n° {id})", show_household: "Voir le ménage" diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue index adac402d9..b8a638593 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue @@ -167,7 +167,8 @@ export default { return `/fr/person/${this.person.id}/general`; }, getCurrentHouseholdUrl() { - return `/fr/person/household/${this.person.current_household_id}/summary?returnPath=${this.returnPath}` + let returnPath = this.returnPath ? `?returnPath=${this.returnPath}` : ``; + return `/fr/person/household/${this.person.current_household_id}/summary${returnPath}` } } } From a94a757ae63218cde9f0a4e57d282ea94131b954 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 6 Sep 2021 16:50:10 +0200 Subject: [PATCH 22/32] accourse: don't display old participations (fix counter) --- .../Resources/public/chill/scss/flex_table.scss | 2 +- .../AccompanyingCourse/components/PersonsAssociated.vue | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss index c25285da1..2b9e4e671 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss @@ -277,7 +277,7 @@ div.floatbutton { div.action { padding: 0 0 1em 1em; } - + // avoid a position relative that make links unclickable .fa-ul > li { position: initial; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue index edde7fbdb..37833ef29 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue @@ -2,7 +2,7 @@

{{ $t('persons_associated.title')}}

-
+
@@ -58,11 +58,13 @@ export default { }, computed: { ...mapState({ - participations: state => state.accompanyingCourse.participations, - counter: state => state.accompanyingCourse.participations.length + participations: state => state.accompanyingCourse.participations }), currentParticipations() { return this.participations.filter(p => p.endDate === null) + }, + counter() { + return this.currentParticipations.length; } }, methods: { From dba3ede9e16a03821e97d9d2fb0f1c4d34db4c3c Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 6 Sep 2021 18:46:37 +0200 Subject: [PATCH 23/32] when a person has a household without address: display no_data message, even if option addNoData is false --- .../Resources/public/vuejs/_js/i18n.js | 1 + .../_components/Entity/PersonRenderBox.vue | 25 ++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js index 39bbd4cb1..9d1c8adde 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js @@ -77,6 +77,7 @@ const messages = { man: "Né le", woman: "Née le" } , + household_without_address: "Le ménage de l'usager est sans adresse", no_data: "Aucune information renseignée", type: { thirdparty: "Tiers", diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue index b8a638593..ea1a3008e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue @@ -48,20 +48,27 @@
+
+ +
+
+ +
+

{{ $t('persons_associated.person_without_household_warning') }}

+
+ + +
+ +
+ + +
+
@@ -65,6 +88,9 @@ export default { }, counter() { return this.currentParticipations.length; + }, + participationWithoutHousehold() { + return this.currentParticipations.filter(p => p.person.current_household_id === null); } }, methods: { @@ -88,3 +114,29 @@ export default { } } + 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 cf685cac3..d7c01a174 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js @@ -47,7 +47,9 @@ const appMessages = { sure_description: "Une fois confirmé, il ne sera pas possible de faire marche arrière ! La sortie reste cependant consignée dans l'historique du parcours.", ok: "Oui, l'usager quitte le parcours", show_household_number: "Voir le ménage (n° {id})", - show_household: "Voir le ménage" + show_household: "Voir le ménage", + person_without_household_warning: "Certaines personnes n'appartiennent à aucun ménage actuellement. Renseignez leur appartenance à un ménage dès que possible.", + update_household: "Modifier l'appartenance", }, requestor: { title: "Demandeur", From 753e6c110545611d41ea6f4026ae863eb4335a1e Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 10 Sep 2021 11:32:12 +0200 Subject: [PATCH 26/32] adding a dev page with sass assets album --- .../Resources/views/Activity/list.html.twig | 2 +- .../Resources/public/chill/scss/flex_table.scss | 13 ++++++++----- .../components/PersonsAssociated.vue | 2 +- .../vuejs/_components/Entity/PersonRenderBox.vue | 2 +- .../views/Household/_render_member.html.twig | 2 +- .../_components/Entity/ThirdPartyRenderBox.vue | 2 +- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig index 5bcd41c66..07b59c7e7 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig @@ -48,7 +48,7 @@
-
+
diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss index 2b9e4e671..21ecde267 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss @@ -1,3 +1,6 @@ +// See Assets Album page: +// http://localhost:8001/_dev/assets + /* * __FLEX-TABLE_________ * FLEX RESPONSIVE TABLE/BLOCK PRESENTATION @@ -175,13 +178,13 @@ div.wrap-list { border: 1px solid $black; div.wl-col.title { - background-color: $yellow; + background-color: yellow; } div.wl-col.list { - background-color: $green; + background-color: cyan; p.wl-item { - background-color: $orange; + background-color: orange; } } } @@ -263,7 +266,7 @@ div.wrap-header { * p-ê pas convaincant: cet asset est toujours en observation */ -div.floatbutton { +div.float-button { width: 100%; div.box { @@ -302,7 +305,7 @@ div.floatbutton { border: 1px solid black; background-color: yellow; div.action { - background-color: #00ffffa3; + background-color: transparentize(#00ffff, 0.4); } } } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue index 4c6757fcd..da1b4c4e6 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue @@ -32,7 +32,7 @@
-
+
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue index 29578d3ba..249162b87 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue @@ -41,7 +41,7 @@
-
+
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig index f1c96e5fa..25160ff5b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig @@ -20,7 +20,7 @@ }) }}
-
+
    diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue index 90dd51837..c710cedfb 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue @@ -32,7 +32,7 @@
-
+
From ff7cb6ca79c3b307896d860f66716ed892c68332 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 10 Sep 2021 11:38:18 +0200 Subject: [PATCH 27/32] adding unlink chill button --- .../Resources/public/chill/scss/buttons.scss | 6 +++++- .../Resources/views/Household/summary.html.twig | 11 +++++------ .../translations/messages+intl-icu.fr.yaml | 6 ++++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/buttons.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/buttons.scss index 6b54172c7..14c22685b 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/buttons.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/buttons.scss @@ -19,7 +19,8 @@ $chill-theme-buttons: ( "view": $chill-blue, "misc": $gray-300, "cancel": $gray-300, - "choose": $gray-300 + "choose": $gray-300, + "unlink": $chill-red, ); @each $button, $color in $chill-theme-buttons { @@ -45,6 +46,7 @@ $chill-theme-buttons: ( &.btn-delete, &.btn-danger, &.btn-remove, + &.btn-unlink, &.btn-action, &.btn-edit, &.btn-update { @@ -67,6 +69,7 @@ $chill-theme-buttons: ( // &.btn-submit::before, // &.btn-reset::before, // &.btn-action::before, + &.btn-unlink::before, &.btn-delete::before, &.btn-remove::before, &.btn-choose::before, @@ -94,6 +97,7 @@ $chill-theme-buttons: ( &.btn-remove::before { content: "\f00d"; } // fa-times &.btn-cancel::before { content: "\f060"; } // fa-arrow-left &.btn-choose::before { content: "\f00c"; } // fa-check // f046 fa-check-square-o + &.btn-unlink::before { content: "\f127"; } // fa-chain-broken } diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig index 89bb4da14..1568b6bed 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig @@ -88,14 +88,13 @@ {% macro customButtons(member, household) %}
  • - - {{ 'household.Change position'|trans }} + + {{ 'household.Leave'|trans }}
  • - - {{ 'household.Leave'|trans }} +
  • {% endmacro %} diff --git a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml index cdaf55cc8..f1362e7ae 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml +++ b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml @@ -23,7 +23,9 @@ household: Those members does not share address: Ces usagers ne partagent pas l'adresse du ménage. Any persons into this position: Aucune personne n'appartient au ménage à cette position. Leave household: Quitter le ménage - Leave: Quitter + Leave: Détacher + person: + leave: L'usager quitte le ménage Join: Rejoindre un ménage Change position: Repositionner Household file: Dossier ménage @@ -54,7 +56,7 @@ household: Expecting for birth on date: Naissance attendue pour le {date} Expecting for birth: Naissance attendue (date inconnue) Any expecting birth: Aucune naissance proche n'a été renseignée. - Comment and expecting birth: Commentaire et naissance attendue + Comment and expecting birth: Mettre à jour le commentaire Edit member metadata: Données supplémentaires comment_membership: Commentaire général sur les membres expecting_birth: Naissance attendue ? From c89e2662b1b281f6e0b8ae841eea410cb6c5f1d6 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 10 Sep 2021 12:29:06 +0200 Subject: [PATCH 28/32] household resume page, improve ux --- .../Resources/views/Form/fields.html.twig | 6 + .../Resources/public/chill/chillperson.scss | 23 ++ .../Address/_insert_vue_address.html.twig | 3 + .../views/Household/_render_member.html.twig | 2 +- .../views/Household/layout.html.twig | 4 + .../views/Household/summary.html.twig | 308 ++++++++++-------- .../translations/messages+intl-icu.fr.yaml | 5 +- 7 files changed, 210 insertions(+), 141 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig index 1e2bf713f..ce406286b 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig @@ -192,3 +192,9 @@ {% endif %} {% endfor %} {% endblock %} + +{% block comment_widget %} + {% for entry in form %} + {{ form_widget(entry) }} + {% endfor %} +{% endblock comment_widget %} diff --git a/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss b/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss index f3759aef7..071d0f9a5 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss +++ b/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss @@ -185,6 +185,29 @@ div.banner { } } +div.household-resume { + display: flex; + flex-direction: row; + align-items: center; + + div.col-address { + font-size: 120%; + padding-left: 1em; + + } + div.col-comment { + //padding: 0; + margin-bottom: 1rem; + display: flex; + flex-direction: column; + > * > * { + & > .chill-user-quote { + margin: 1.5em -1.67em 0; + } + } + } +} + /* * BADGES, MARKS, PINS * for chill person theme diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Address/_insert_vue_address.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Address/_insert_vue_address.html.twig index 8038257d6..e235aae15 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Address/_insert_vue_address.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Address/_insert_vue_address.html.twig @@ -9,6 +9,9 @@ * modalTitle twig translated chain * buttonText twig translated chain * buttonSize bootstrap class like 'btn-sm' + * buttonDisplayText bool + * binModalStep1 bool + * binModalStep2 bool #}
    diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig index 25160ff5b..5b41a15e3 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig @@ -31,7 +31,7 @@
  • diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/layout.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/layout.html.twig index d97de654f..0bd208e7a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/layout.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/layout.html.twig @@ -17,4 +17,8 @@ 'layout': '@ChillPerson/menu.html.twig', 'args' : { 'household': household } }) }} + + {% block block_post_menu %} + {% endblock %} + {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig index 1568b6bed..9b553f0f0 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig @@ -2,163 +2,195 @@ {% block title 'household.Household summary'|trans %} +{% block block_post_menu %} +
    +{% endblock %} + {% block content %}
    -

    {{ block('title') }}

    + {# +

    {{ block('title') }}

    +

    {{ 'household.Current address'|trans }}

    + #} -

    {{ 'household.Current address'|trans }}

    + {% set address = household.currentAddress %} -{% set address = household.currentAddress %} - -{% if address is empty %} -

    {{ 'household.Household does not have any address currently'|trans }}

    -{% else %} -
    -
    - {{ address|chill_entity_render_box({'multiline': true}) }} -
    -
    -{% endif %} - -

    {{ 'household.Household members'|trans }}

    - -{% if form is not null %} - {{ form_start(form) }} - - {{ form_row(form.commentMembers) }} - -
    - {{ form_row(form.waitingForBirth) }} -
    - -
    - {{ form_row(form.waitingForBirthDate) }} -
    - -
      -
    • - -
    • -
    - - {{ form_end(form) }} -{% else %} - - {% if not household.commentMembers.isEmpty() %} - {{ household.commentMembers|chill_entity_render_box }} - {% endif %} - - {% if household.waitingForBirth %} - {% if household.waitingForBirthDate is not null %} - {{ 'household.Expecting for birth on date'|trans({ 'date': household.waitingForBirthDate|format_date('long') }) }} + {% if address is empty %} +

    {{ 'household.Household does not have any address currently'|trans }}

    {% else %} - {{ 'household.Expecting for birth'|trans }} +
    + +
    + +

    {{ 'Address'|trans }}

    + + {{ address|chill_entity_render_box({'multiline': true}) }} + +
      +
    • + {# include vue_address component #} + {% include '@ChillPerson/Address/_insert_vue_address.html.twig' with { + mode: 'create', + buttonSize: 'btn-sm', + buttonText: 'Move household', + modalTitle: 'Move household', + buttonDisplayText: false + } %} +
    • +
    • + + + +
    • +
    + +
    +
    + {% if form is null %} + + {% if household.waitingForBirth or not household.commentMembers.isEmpty() %} +
    + {% if household.waitingForBirth %} + + {% if household.waitingForBirthDate is not null %} + {{ 'household.Expecting for birth on date'|trans({ 'date': household.waitingForBirthDate|format_date('long') }) }} + {% else %} + {{ 'household.Expecting for birth'|trans }} + {% endif %} + {% endif %} + + {% if not household.commentMembers.isEmpty() %} + {{ household.commentMembers|chill_entity_render_box }} + {% endif %} +
    + {% endif %} + + {% if not household.commentMembers.isEmpty() %} + + {{ 'household.Edit comment and expecting birth'|trans }} + + {% else %} + + {{ 'household.New comment and expecting birth'|trans }} + + {% endif %} + + {% else %} + + {{ form_start(form) }} +
    + {{ form_widget(form.waitingForBirth) }} +
    +
    + {{ form_widget(form.waitingForBirthDate) }} +
    +
    + {{ form_widget(form.commentMembers) }} +
    +
      +
    • + +
    • +
    + {{ form_end(form) }} + + {% endif %} + +
    +
    {% endif %} - {% else %} -

    - {{ 'household.Any expecting birth'|trans }} -

    - {% endif %} - +

    {{ 'household.Household members'|trans }}

    -{% endif %} + {% for p in positions %} +
    +

    {{ p.label|localize_translatable_string }} + {% if false == p.shareHousehold %} + + {% endif %} +

    + {%- set members = household.currentMembersByPosition(p) %} -{% for p in positions %} -
    -

    {{ p.label|localize_translatable_string }} - {% if false == p.shareHousehold %} - + {% macro customButtons(member, household) %} +
  • + +
  • +
  • + +
  • + {% endmacro %} + + {% if members|length > 0 %} +
    + {% for m in members %} + {% include '@ChillPerson/Household/_render_member.html.twig' with { + 'member': m, + 'customButtons': { 'after': _self.customButtons(m, household) } + } %} + {% endfor %} +
    + {% else %} +

    {{ 'household.Any persons into this position'|trans }}

    {% endif %} -

    - {%- set members = household.currentMembersByPosition(p) %} + {% set members = household.nonCurrentMembersByPosition(p) %} + {% if members|length > 0 %} - {% macro customButtons(member, household) %} -
  • - - {{ 'household.Leave'|trans }} -
  • -
  • - -
  • - {% endmacro %} - - {% if members|length > 0 %} -
    - {% for m in members %} - {% include '@ChillPerson/Household/_render_member.html.twig' with { - 'member': m, - 'customButtons': { 'after': _self.customButtons(m, household) } - } %} - {% endfor %} -
    - {% else %} -

    {{ 'household.Any persons into this position'|trans }}

    - {% endif %} - - {% set members = household.nonCurrentMembersByPosition(p) %} - {% if members|length > 0 %} - - -
    -
    -

    - -

    -
    -
    - {% for m in members %} - {% include '@ChillPerson/Household/_render_member.html.twig' with { 'member': m } %} - {% endfor %} + +
    +
    +

    + +

    +
    +
    + {% for m in members %} + {% include '@ChillPerson/Household/_render_member.html.twig' with { 'member': m } %} + {% endfor %} +
    + {% endif %} +
    - {% endif %} + {% endfor %} -
    -{% endfor %} - - +
    {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml index f1362e7ae..cea908ccf 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml +++ b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml @@ -43,7 +43,7 @@ household: Current household members: Membres actuels Household summary: Résumé du ménage Accompanying period: Parcours d'accompagnement - Addresses: Adresses + Addresses: Historique adresse Current address: Adresse actuelle Household does not have any address currently: Le ménage n'a pas d'adresse renseignée actuellement Edit household members: Modifier l'appartenance au ménage @@ -56,7 +56,8 @@ household: Expecting for birth on date: Naissance attendue pour le {date} Expecting for birth: Naissance attendue (date inconnue) Any expecting birth: Aucune naissance proche n'a été renseignée. - Comment and expecting birth: Mettre à jour le commentaire + New comment and expecting birth: Écrire un commentaire + Edit comment and expecting birth: Mettre à jour le commentaire Edit member metadata: Données supplémentaires comment_membership: Commentaire général sur les membres expecting_birth: Naissance attendue ? From fa938471aa205a6efe117429c1af61fc453aa29e Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 10 Sep 2021 16:39:59 +0200 Subject: [PATCH 29/32] vue_accourse: move no-household warning above table --- .../components/PersonsAssociated.vue | 45 +++++++++---------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue index da1b4c4e6..f04674cef 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue @@ -9,6 +9,26 @@
    +
    + +
    +
    + +
    +

    {{ $t('persons_associated.person_without_household_warning') }}

    +
    + + +
    +
    +
    +
    -
    - -
    -
    - -
    -

    {{ $t('persons_associated.person_without_household_warning') }}

    -
    - - -
    - -
    - - -
    -
    @@ -118,7 +115,7 @@ export default { div#accompanying-course { div.vue-component { & > div.alert { - margin: 1em 0 0; + margin: 0 0 -1em; } div.no-household { display: flex; From da9d81dc050f0a28dd84536ec6f0c20e0fbe9451 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 10 Sep 2021 17:18:43 +0200 Subject: [PATCH 30/32] vue_accourse: GET form submit for no_household persons --- .../components/PersonsAssociated.vue | 47 ++++++++++++------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue index f04674cef..79a9df5a6 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue @@ -11,22 +11,30 @@
    -
    -
    - -
    -

    {{ $t('persons_associated.person_without_household_warning') }}

    -
    - - -
    -
    +
    +
    +
    + +
    +

    {{ $t('persons_associated.person_without_household_warning') }}

    +
    + + +
    + + + +
    +
    @@ -78,6 +86,7 @@ export default { }, computed: { ...mapState({ + courseId: state => state.accompanyingCourse.id, participations: state => state.accompanyingCourse.participations }), currentParticipations() { @@ -88,6 +97,9 @@ export default { }, participationWithoutHousehold() { return this.currentParticipations.filter(p => p.person.current_household_id === null); + }, + getReturnPath() { + return window.location.pathname + window.location.search + window.location.hash; } }, methods: { @@ -118,6 +130,7 @@ div#accompanying-course { margin: 0 0 -1em; } div.no-household { + padding-bottom: 1.5em; display: flex; flex-direction: row; & > i { @@ -125,7 +138,7 @@ div#accompanying-course { padding-top: 0.2em; opacity: 0.75; } - & > div { + & > form { flex-basis: auto; div.action { button.btn-update { From 672133fb5eba7217be30532cc6aed8c1e2f1339d Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 13 Sep 2021 10:48:38 +0200 Subject: [PATCH 31/32] repair banner in vue_household_members_editor component --- .../Resources/views/Household/members_editor.html.twig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/members_editor.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/members_editor.html.twig index a65867fb9..301054666 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/members_editor.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/members_editor.html.twig @@ -22,5 +22,6 @@ {% endblock %} {% block css %} - {{ encore_entry_link_tags('vue_household_members_editor') }} + {{ parent() }} + {{ encore_entry_link_tags('vue_household_members_editor') }} {% endblock %} From 6ab0007f02160ca74a73258290b8dc94efae5e72 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 13 Sep 2021 11:10:02 +0200 Subject: [PATCH 32/32] fix: person-render-box need props options --- .../Resources/public/vuejs/AccompanyingCourseWorkCreate/App.vue | 2 +- .../Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue | 2 +- .../vuejs/HouseholdMembersEditor/components/Concerned.vue | 2 +- .../vuejs/HouseholdMembersEditor/components/MemberDetails.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkCreate/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkCreate/App.vue index 2623509a7..b6333b426 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkCreate/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkCreate/App.vue @@ -35,7 +35,7 @@
    • - +
    diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue index 8162faddf..c99685680 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue @@ -122,7 +122,7 @@
    • - +
    diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Concerned.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Concerned.vue index 5ae594c8d..b8ca3be30 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Concerned.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Concerned.vue @@ -25,7 +25,7 @@
    - +
    {{ $t('person.born', {'gender': conc.person.gender} ) }} diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/MemberDetails.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/MemberDetails.vue index 99f92aaf1..687fc7b9f 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/MemberDetails.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/MemberDetails.vue @@ -3,7 +3,7 @@
    - + {{ $t('household_members_editor.holder') }}