From fc11da53cbfd8c21eab08cced90d49a10e66cec9 Mon Sep 17 00:00:00 2001 From: paidge <paidge_cs@hotmail.com> Date: Fri, 24 Dec 2021 11:55:28 +0100 Subject: [PATCH] set dateStatus filter limit to 1 month --- components/member/Card.vue | 4 ++-- pages/membres/_hash.vue | 4 ++-- plugins/filters.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/member/Card.vue b/components/member/Card.vue index 7d3e60a..ce3c7cc 100644 --- a/components/member/Card.vue +++ b/components/member/Card.vue @@ -22,8 +22,8 @@ <tr v-if="hash.status != 'NEWCOMER'"> <th scope="row">Distance :</th> <td :class="{ - 'list-group-item-success': hash.distance.value.ratio >= 80, - 'list-group-item-danger': hash.distance.value.ratio < 80, + 'list-group-item-success': hash.distance.dist_ok, + 'list-group-item-danger': !hash.distance.dist_ok, }">{{ Math.round(hash.distance.value.ratio*100)/100 }}</td> </tr> <tr> diff --git a/pages/membres/_hash.vue b/pages/membres/_hash.vue index bf731fb..157f882 100644 --- a/pages/membres/_hash.vue +++ b/pages/membres/_hash.vue @@ -7,10 +7,10 @@ <MemberCard :hash="idFromHash" /> </div> </div> - <div class="row mt-3" v-if="idFromHash.status != 'REVOKED' && idFromHash.status != 'NEWCOMER'"> + <div class="row mt-3" v-if="idFromHash.status != 'REVOKED'"> <div class="col-12 col-md-6 mb-3"> <h3>Certifications reçues - <span :class="classWarning" v-if="($options.filters.dateStatus(idFromHash.received_certifications.limit) == 'warning') || (!idFromHash.received_certifications.limit)">⚠+ <span :class="classWarning" v-if="(($options.filters.dateStatus(idFromHash.received_certifications.limit) == 'warning') || (!idFromHash.received_certifications.limit)) && idFromHash.status != 'NEWCOMER'">⚠<span class="sr-only" v-if="$options.filters.dateStatus(idFromHash.received_certifications.limit) == 'danger'">En manque de certifications</span> <span class="sr-only" v-else>Bientôt en manque de certifications</span> </span> diff --git a/plugins/filters.js b/plugins/filters.js index 28e33b2..e6b2487 100644 --- a/plugins/filters.js +++ b/plugins/filters.js @@ -13,9 +13,9 @@ Vue.filter('dateStatus', (val) => { switch (true) { case diff<0: return 'danger' - case diff<5184000: + case diff<2635200: return 'warning' - case diff>=5184000: + case diff>=2635200: return 'success' } }) \ No newline at end of file -- GitLab