diff --git a/components/member/List.vue b/components/member/List.vue index e14ed56ae98eaa5f4e31c2f39c327156b6ef02b1..77730ae31061bbd12e5faab8eb77a45f978d7c78 100644 --- a/components/member/List.vue +++ b/components/member/List.vue @@ -148,7 +148,7 @@ export default { if (this.certif) return member.received_certifications.limit return Math.min(member.limitDate, member.received_certifications.limit) }, - sort(a, b, order) { + getOrder(a, b, order) { if (a < b) return -1 * order if (a > b) return 1 * order return 0 @@ -157,23 +157,26 @@ export default { computed: { membersSorted() { return this.members - .slice() .sort((a, b) => { let modifier = this.currentSortDir === "desc" ? -1 : 1 if (this.currentSort == "uid") { - this.sort(a["uid"].toLowerCase(), b["uid"].toLowerCase(), modifier) + return this.getOrder( + a["uid"].toLowerCase(), + b["uid"].toLowerCase(), + modifier + ) } else if (this.currentSort == "pubkey") { - this.sort( + return this.getOrder( a["pubkey"].toLowerCase(), b["pubkey"].toLowerCase(), modifier ) } else if (this.currentSort == "date_sortie") { if (this.adhesion) { - this.sort(a["limitDate"], b["limitDate"], modifier) + return this.getOrder(a["limitDate"], b["limitDate"], modifier) } else if (this.certif) { - this.sort( + return this.getOrder( a["received_certifications"]["limit"], b["received_certifications"]["limit"], modifier @@ -187,7 +190,7 @@ export default { b["limitDate"], b["received_certifications"]["limit"] ) - this.sort(minA, minB, modifier) + return this.getOrder(minA, minB, modifier) } } return 0