accourse: don't display old participations

(they will be still visible in history)
This commit is contained in:
Mathieu Jaumotte 2021-09-06 15:12:53 +02:00
parent 93c08f7e18
commit 1a95b44577

View File

@ -11,7 +11,7 @@
<div class="flex-table mb-3">
<participation-item
v-for="participation in participations"
v-for="participation in currentParticipations"
v-bind:participation="participation"
v-bind:key="participation.id"
@remove="removeParticipation"
@ -56,10 +56,15 @@ export default {
}
}
},
computed: mapState({
participations: state => 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);