From 1a95b44577a4da03b5ffc4988def384da716b0f9 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 6 Sep 2021 15:12:53 +0200 Subject: [PATCH] accourse: don't display old participations (they will be still visible in history) --- .../components/PersonsAssociated.vue | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 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 13294b232..edde7fbdb 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue @@ -11,7 +11,7 @@
state.accompanyingCourse.participations, - counter: state => state.accompanyingCourse.participations.length - }), + computed: { + ...mapState({ + participations: state => state.accompanyingCourse.participations, + counter: state => state.accompanyingCourse.participations.length + }), + currentParticipations() { + return this.participations.filter(p => p.endDate === null) + } + }, methods: { removeParticipation(item) { //console.log('@@ CLICK remove participation: item', item);