From b1993dbf2294ebe658f596f7b2a3888fc77eb3b5 Mon Sep 17 00:00:00 2001 From: nobohan Date: Fri, 11 Feb 2022 17:37:45 +0100 Subject: [PATCH 1/3] accompanying course: filter suggested entities by open participations --- .../public/vuejs/AccompanyingCourse/components/Requestor.vue | 2 +- .../public/vuejs/AccompanyingCourse/components/Resources.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue index 92931cfcb..a7c1ee017 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue @@ -195,7 +195,7 @@ export default { ...mapState({ suggestedEntities: state => { return [ - ...state.accompanyingCourse.participations.map(p => p.person), + ...state.accompanyingCourse.participations.filter((p) => p.endDate === null).map((p) => p.person), ...state.accompanyingCourse.resources.map(r => r.resource) ] .filter((e) => e !== null) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue index 3697d8b64..0f8154dc0 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue @@ -73,7 +73,7 @@ export default { counter: state => state.accompanyingCourse.resources.length, suggestedEntities: state => [ state.accompanyingCourse.requestor, - ...state.accompanyingCourse.participations.map(p => p.person), + ...state.accompanyingCourse.participations.filter((p) => p.endDate === null).map((p) => p.person), ] .filter((e) => e !== null) .filter( From fc9deb8ba8d8dcff6d7bc5b993dfec85dc1a018f Mon Sep 17 00:00:00 2001 From: nobohan Date: Fri, 11 Feb 2022 17:37:45 +0100 Subject: [PATCH 2/3] accompanying course: filter suggested entities by open participations --- .../public/vuejs/AccompanyingCourse/components/Requestor.vue | 2 +- .../public/vuejs/AccompanyingCourse/components/Resources.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue index 45521b11e..0f1416b22 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue @@ -199,7 +199,7 @@ export default { ...mapState({ suggestedEntities: state => { return [ - ...state.accompanyingCourse.participations.map(p => p.person), + ...state.accompanyingCourse.participations.filter((p) => p.endDate === null).map((p) => p.person), ...state.accompanyingCourse.resources.map(r => r.resource) ] .filter((e) => e !== null) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue index c7a26bfba..e9b9695ab 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue @@ -77,7 +77,7 @@ export default { counter: state => state.accompanyingCourse.resources.length, suggestedEntities: state => [ state.accompanyingCourse.requestor, - ...state.accompanyingCourse.participations.map(p => p.person), + ...state.accompanyingCourse.participations.filter((p) => p.endDate === null).map((p) => p.person), ] .filter((e) => e !== null) .filter( From 40a1726ca740cb43c5da7fd8fedfa5f1dca77df5 Mon Sep 17 00:00:00 2001 From: nobohan Date: Fri, 11 Feb 2022 17:41:39 +0100 Subject: [PATCH 3/3] upd CHANGELOG --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e113f12c..d99ec283f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,13 @@ and this project adheres to ## Unreleased * AddPersons: remove ul-li html tags from AddPersons (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/419) +* [person] accompanying course: filter suggested entities by open participations (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/415) + * fix normalisation of accompanying course requestor api (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/378) * [person] add a returnPath when clicking on some Person or ThirdParty badge (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/427) -* [person] accompanying course work: fix on-the-fly update of thirdParty +* [person] accompanying course work: fix on-the-fly update of thirdParty * [on-the-fly] close modal only after validation * [person] correct thirdparty PATCH url + add email and altnames in AddPerson and serializer (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/433) * change order for accompanying course work list