diff --git a/components/member/List.vue b/components/member/List.vue index ad0d665fa45b555f62332279220ab60a2ede29bc..2313cd8ab12239b6462e640c5062718abbb6237e 100644 --- a/components/member/List.vue +++ b/components/member/List.vue @@ -66,11 +66,7 @@ class="d-none d-sm-table-cell" v-if="displayDate" @click="redirect(member.hash)"> - <BadgeDate - :date=" - Math.min(member.limitDate, member.received_certifications.limit) - " - styleDate="long" /> + <BadgeDate :date="date(member)" styleDate="long" /> </td> <td class="py-1 text-center" :title="$t('favoris.supprimer')"> <button @@ -111,6 +107,10 @@ export default { displayDate: { type: Boolean, default: true + }, + adhesion: { + type: Boolean, + default: false } }, methods: { @@ -124,6 +124,10 @@ export default { this.currentSortDir = this.currentSortDir === "asc" ? "desc" : "asc" } this.currentSort = s + }, + date(member) { + if (this.adhesion) return member.limitDate + return member.received_certifications.limit } }, computed: { diff --git a/pages/index.vue b/pages/index.vue index 5aeb489a7472fb653b1c5c6d147d3ecd35d63c80..69a87c44724f2e3a18eb6663bf07fd2a172e1509 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -85,7 +85,7 @@ export default { if (!users.includes(member.member.uid)) { if (member.member.history.length == 1) { this.addValue(result["entrees"], member.member) - } else if (member.inOut) { + } else if (member.inOut || member.member.status === "MEMBER") { this.addValue(result["renew"], member.member) } else { this.addValue(result["sorties"], member.member) diff --git a/pages/previsions/futures_sorties.vue b/pages/previsions/futures_sorties.vue index 864725a017fe8e1905c4e79cfcd9b1ccdb966211..dc6fb5fd0229c50ac2df8e4596d315ca7af230f8 100644 --- a/pages/previsions/futures_sorties.vue +++ b/pages/previsions/futures_sorties.vue @@ -44,7 +44,8 @@ <h2 class="h4 text-danger text-center">{{ $t("statut.renew") }}</h2> <MemberList :members="wwResult['membership']" - :displayPubkey="false" /> + :displayPubkey="false" + :adhesion="true" /> </div> </div> </div>