mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
accourse: don't display old participations (fix counter)
This commit is contained in:
parent
cf78c59e76
commit
a94a757ae6
@ -277,7 +277,7 @@ div.floatbutton {
|
|||||||
div.action {
|
div.action {
|
||||||
padding: 0 0 1em 1em;
|
padding: 0 0 1em 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
// avoid a position relative that make links unclickable
|
// avoid a position relative that make links unclickable
|
||||||
.fa-ul > li {
|
.fa-ul > li {
|
||||||
position: initial;
|
position: initial;
|
||||||
|
@ -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