diff --git a/CHANGELOG.md b/CHANGELOG.md index aa4a68efe..5e0319d25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to * date versioning for test releases ## Unreleased - +* [person] accompanying course: filter suggested entities by open participations (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/415) [activity] can click through the cross icon for removing person in concerned group (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/476) [activity] correct associated persons by considering only open participations (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/476) 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(