Skip to content
Snippets Groups Projects
Commit 507c5a94 authored by Pierre-Jean CHANCELLIER's avatar Pierre-Jean CHANCELLIER
Browse files

improve badge danger

parent 124eda05
No related branches found
No related tags found
No related merge requests found
......@@ -2,13 +2,13 @@
<span
class="danger font-weight-normal"
:class="classWarning"
:title="textWarning"
:title="title"
v-if="
$options.filters.dateStatus(limitDate) != 'success' &&
['MEMBER', 'MISSING'].includes(memberStatus)
"
>
<span class="sr-only">{{ textWarning }}</span>
<span class="sr-only" v-if="title">{{ title }}</span>
</span>
</template>
......@@ -19,6 +19,9 @@ export default {
type: Number,
default: 0
},
title: {
type: String
},
memberStatus: String
},
computed: {
......@@ -29,11 +32,6 @@ export default {
"text-warning":
this.$options.filters.dateStatus(this.limitDate) == "warning"
}
},
textWarning() {
return this.$options.filters.dateStatus(this.limitDate) == "danger"
? this.$i18n.t("statut.manquecertif")
: this.$i18n.t("statut.bientotmanquecertif")
}
}
}
......
......@@ -18,7 +18,7 @@
<th scope="row" class="py-1">
<div>
{{ getNeighbor(certif).uid }}
<BadgeCertifStatus
<BadgeDanger
:limitDate="getNeighbor(certif).received_certifications.limit"
:memberStatus="getNeighbor(certif).status" />
<BadgeQuality
......@@ -118,7 +118,7 @@
<div>
<span v-if="$isFavourite(getNeighbor(certif).uid)">&nbsp;</span>
{{ getNeighbor(certif).uid }}
<BadgeCertifStatus
<BadgeDanger
:limitDate="getNeighbor(certif).received_certifications.limit"
:memberStatus="getNeighbor(certif).status" />
<BadgeQuality
......
......@@ -19,8 +19,10 @@
@click="redirect(member.hash)">
<th scope="row">
<span v-if="$isFavourite(member.uid)">&nbsp;</span>{{ member.uid }}
<BadgeCertifStatus
:limitDate="member.received_certifications.limit"
<BadgeDanger
:limitDate="
Math.min(member.received_certifications.limit, member.limitDate)
"
:memberStatus="member.status" />
<BadgeStatus :membre="member" />
</th>
......
......@@ -107,7 +107,6 @@ export const SEARCH_MEMBER = gql`
isLeaving
sentry
membership_pending
limitDate
distanceE {
__typename
value {
......@@ -150,6 +149,7 @@ export const SEARCH_MEMBER = gql`
uid
hash
status
limitDate
minDate
minDatePassed
quality {
......
......@@ -32,7 +32,7 @@
"&nbsp;+&nbsp;" + nbCertifsPending("received")
}}</span
>)
<BadgeCertifStatus
<BadgeDanger
:limitDate="idFromHash.received_certifications.limit"
:memberStatus="idFromHash.status" />
</h3>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment