diff --git a/components/member/Card.vue b/components/member/Card.vue index 7d3e60a92e715d2814fd8d15aa3ca1b270618703..ce3c7cc79727d8a7c017492a287fcb1c6d63a12b 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 bf731fb62abb4716dd9c0fae5e30a917d8cfb433..157f88238f5a385ce7283e71eea7f17c65b052db 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 28e33b2d7131a177c0097d3efdb9ada8079bfe4b..e6b2487883eaeb7863d810cb44c213fd92b14f39 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