diff --git a/pages/hash/_hash.vue b/pages/hash/_hash.vue index 8021a8d186fc849f7d780ab511ed93c1d28f4e7e..562e94815158d357c0dd7ff4517a5ea2a91fff4b 100644 --- a/pages/hash/_hash.vue +++ b/pages/hash/_hash.vue @@ -9,11 +9,8 @@ </div> <div class="row mt-3" v-if="idFromHash.status != 'REVOKED' && idFromHash.status != 'NEWCOMER'"> <div class="col-12 col-md-6 mb-3"> - <h3>Certifications reçues - <span :class="{ - 'text-danger' : $options.filters.dateStatus(idFromHash.received_certifications.limit) == 'danger', - 'text-warning' : $options.filters.dateStatus(idFromHash.received_certifications.limit) == 'warning' - }" v-if="($options.filters.dateStatus(idFromHash.received_certifications.limit) == 'warning')">⚠+ <h3>Certifications reçues + <span :class="classWarning" v-if="($options.filters.dateStatus(idFromHash.received_certifications.limit) == 'warning') || (!idFromHash.received_certifications.limit)">⚠<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> @@ -107,6 +104,14 @@ export default { }, }, }, + computed: { + classWarning: function() { + return { + 'text-danger' : !this.idFromHash.received_certifications.limit, + 'text-warning' : this.$options.filters.dateStatus(this.idFromHash.received_certifications.limit) == 'warning' + } + } + }, watch: { idFromHash: { handler(n,o) {