From f9bcc5b1e97a60cc0c48571a4ca19c7fc3f60559 Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 7 Apr 2022 10:45:46 +0200 Subject: [PATCH 1/2] householdmemberseditor: fix composition type bug --- .../vuejs/HouseholdMembersEditor/components/Dates.vue | 2 +- .../public/vuejs/HouseholdMembersEditor/store/index.js | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Dates.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Dates.vue index 94c1a146a..040d316bb 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Dates.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Dates.vue @@ -53,7 +53,7 @@ export default { return null; }, set(value) { - this.$store.commit('setHouseholdCompositionType', value); + this.$store.dispatch('setHouseholdCompositionType', value); }, }, numberOfChildren: { diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/store/index.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/store/index.js index cc5ab497c..f09b19787 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/store/index.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/store/index.js @@ -430,7 +430,7 @@ const store = createStore({ state.householdCompositionTypes = types; }, setHouseholdCompositionType(state, id) { - state.householdCompositionType = state.householdCompositionTypes.find(t => t.id = id); + state.householdCompositionType = state.householdCompositionTypes.find(t => t.id === id); }, setNumberOfChildren(state, number) { state.numberOfChildren = Number.parseInt(number); @@ -495,6 +495,12 @@ const store = createStore({ setComment({ commit }, payload) { commit('setComment', payload); }, + setHouseholdCompositionTypes({ commit }, payload) { + commit('setHouseholdCompositionTypes', payload); + }, + setHouseholdCompositionType({ commit }, payload) { + commit('setHouseholdCompositionType', payload); + }, fetchHouseholdSuggestionForConcerned({ commit, state }, person) { fetchHouseholdSuggestionByAccompanyingPeriod(person.id) .then(households => { @@ -597,7 +603,7 @@ if (concerned.length > 0) { } fetchResults(`/api/1.0/person/houehold/composition/type.json`).then(types => { - store.commit('setHouseholdCompositionTypes', types); + store.dispatch('setHouseholdCompositionTypes', types); }) export { store }; From c03e38f4ffe5cda3cdebc36a820205366dc31039 Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 7 Apr 2022 10:47:14 +0200 Subject: [PATCH 2/2] upd CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c278ca93e..550b6348f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to ## Unreleased +* [person] householdmemberseditor: fix composition type bug in select form (vuejs) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/543) + * [main] notification toggle read: correct js syntax for compilation in production (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/548) * [parcours] Display of interlocuteurs changed to flex-table in parcours edit page to prevent cut-off of information (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/535) * [activity] espace entre les boutons pour supprimer les documents