mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
accourse: don't display old participations (fix counter)
This commit is contained in:
parent
cf78c59e76
commit
a94a757ae6
@ -2,7 +2,7 @@
|
|||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
<h2><a name="section-10"></a>{{ $t('persons_associated.title')}}</h2>
|
<h2><a name="section-10"></a>{{ $t('persons_associated.title')}}</h2>
|
||||||
|
|
||||||
<div v-if="participations.length > 0">
|
<div v-if="currentParticipations.length > 0">
|
||||||
<label class="col-form-label">{{ $tc('persons_associated.counter', counter) }}</label>
|
<label class="col-form-label">{{ $tc('persons_associated.counter', counter) }}</label>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
@ -58,11 +58,13 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
participations: state => state.accompanyingCourse.participations,
|
participations: state => state.accompanyingCourse.participations
|
||||||
counter: state => state.accompanyingCourse.participations.length
|
|
||||||
}),
|
}),
|
||||||
currentParticipations() {
|
currentParticipations() {
|
||||||
return this.participations.filter(p => p.endDate === null)
|
return this.participations.filter(p => p.endDate === null)
|
||||||
|
},
|
||||||
|
counter() {
|
||||||
|
return this.currentParticipations.length;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user