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

add warning symbol ofr ids that will lose certs

parent fc11da53
No related branches found
No related tags found
No related merge requests found
...@@ -41,4 +41,8 @@ $close-font-weight: 500; ...@@ -41,4 +41,8 @@ $close-font-weight: 500;
.card-subtitle { .card-subtitle {
font-style: italic; font-style: italic;
font-size: 90%; font-size: 90%;
}
.table-hover {
cursor: pointer;
} }
\ No newline at end of file
...@@ -82,8 +82,4 @@ export default { ...@@ -82,8 +82,4 @@ export default {
} }
} }
} }
</script> </script>
\ No newline at end of file
<style>
</style>
\ No newline at end of file
<template>
<span class="font-weight-normal" :class="classWarning" :title="textWarning" v-if="($options.filters.dateStatus(limitDate) != 'success') && (['MEMBER', 'MISSING'].includes(memberStatus))">
<span class="sr-only">{{ textWarning }}</span>
</span>
</template>
<script>
export default {
props: {
limitDate : {
type: Number,
default: 0
},
memberStatus : String
},
computed: {
classWarning: function() {
return {
'text-danger' : this.$options.filters.dateStatus(this.limitDate) == 'danger',
'text-warning' : this.$options.filters.dateStatus(this.limitDate) == 'warning'
}
},
textWarning: function() {
return (this.$options.filters.dateStatus(this.limitDate) == 'danger') ? 'En manque de certifications' : 'Bientôt en manque de certifications'
}
}
}
</script>
\ No newline at end of file
...@@ -19,8 +19,4 @@ export default { ...@@ -19,8 +19,4 @@ export default {
} }
} }
} }
</script> </script>
\ No newline at end of file
<style>
</style>
\ No newline at end of file
...@@ -36,8 +36,4 @@ export default { ...@@ -36,8 +36,4 @@ export default {
} }
} }
} }
</script> </script>
\ No newline at end of file
<style>
</style>
\ No newline at end of file
<template> <template>
<div class="list-group"> <div class="table-responsive">
<NuxtLink <table class="table table-striped table-hover">
:to="'/membres/'+getNeighbor(certif).hash" <tbody>
class="list-group-item list-group-item-action d-lg-flex justify-content-between align-items-center" <tr v-for="certif in certifsTriees" :key="getNeighbor(certif).uid"
:class="'list-group-item-'+ $options.filters.dateStatus(certif.expires_on)" @click="$router.push({ path: '/membres/' + getNeighbor(certif).hash })">
v-for="certif in certifsTriees" <th scope="row">
:key="getNeighbor(certif).uid"> {{ getNeighbor(certif).uid }}
<div> <BadgeCertifStatus :limitDate="getNeighbor(certif).received_certifications.limit" :memberStatus="getNeighbor(certif).status" />
{{ getNeighbor(certif).uid }} <BadgeStatus :membre="getNeighbor(certif)" />
<BadgeStatus :membre="getNeighbor(certif)" /> <BadgeQuality :quality="getNeighbor(certif).quality.ratio" />
<BadgeQuality :quality="getNeighbor(certif).quality.ratio" /> </th>
</div> <td class="text-right">
<small>Expire le {{ certif.expires_on | formatDate }}</small> <small><span class="badge" :class="'badge-'+ $options.filters.dateStatus(certif.expires_on)">Expire le {{ certif.expires_on | formatDate }}</span></small>
</NuxtLink> </td>
</div> </tr>
</tbody>
</table>
</div>
</template> </template>
<script> <script>
...@@ -43,8 +46,4 @@ export default { ...@@ -43,8 +46,4 @@ export default {
} }
} }
} }
</script> </script>
\ No newline at end of file
<style>
</style>
\ No newline at end of file
...@@ -36,9 +36,4 @@ export default { ...@@ -36,9 +36,4 @@ export default {
$nuxt.$emit('changeRoute',this.breadcrumb) $nuxt.$emit('changeRoute',this.breadcrumb)
} }
} }
</script> </script>
\ No newline at end of file
<style lang="sass" scoped>
// CSS Lié au composant
</style>
\ No newline at end of file
...@@ -10,10 +10,7 @@ ...@@ -10,10 +10,7 @@
<div class="row mt-3" v-if="idFromHash.status != 'REVOKED'"> <div class="row mt-3" v-if="idFromHash.status != 'REVOKED'">
<div class="col-12 col-md-6 mb-3"> <div class="col-12 col-md-6 mb-3">
<h3>Certifications reçues <h3>Certifications reçues
<span :class="classWarning" v-if="(($options.filters.dateStatus(idFromHash.received_certifications.limit) == 'warning') || (!idFromHash.received_certifications.limit)) && idFromHash.status != 'NEWCOMER'"> <BadgeCertifStatus :limitDate="idFromHash.received_certifications.limit" :memberStatus="idFromHash.status" />
<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>
</h3> </h3>
<CertifList :certifs="idFromHash.received_certifications.certifications" type="recieved" /> <CertifList :certifs="idFromHash.received_certifications.certifications" type="recieved" />
</div> </div>
...@@ -71,7 +68,6 @@ export default { ...@@ -71,7 +68,6 @@ export default {
dist_ok dist_ok
} }
received_certifications { received_certifications {
limit
certifications { certifications {
from { from {
...memberAttributes ...memberAttributes
...@@ -94,6 +90,9 @@ export default { ...@@ -94,6 +90,9 @@ export default {
quality { quality {
ratio ratio
} }
received_certifications {
limit
}
} }
`, `,
variables() { variables() {
...@@ -121,8 +120,4 @@ export default { ...@@ -121,8 +120,4 @@ export default {
} }
} }
}; };
</script> </script>
\ No newline at end of file
<style lang="sass">
</style>
...@@ -22,7 +22,11 @@ ...@@ -22,7 +22,11 @@
<tbody> <tbody>
<tr v-for="member in idSearch.ids" :key="member.uid" <tr v-for="member in idSearch.ids" :key="member.uid"
@click="redirect('/membres/' + member.hash)"> @click="redirect('/membres/' + member.hash)">
<th scope="row">{{ member.uid }} <BadgeStatus :membre="member" /></th> <th scope="row">
{{ member.uid }}
<BadgeCertifStatus :limitDate="member.received_certifications.limit" :memberStatus="member.status" />
<BadgeStatus :membre="member" />
</th>
<td class="d-none d-xl-table-cell">{{ member.pubkey }}</td> <td class="d-none d-xl-table-cell">{{ member.pubkey }}</td>
</tr> </tr>
</tbody> </tbody>
...@@ -73,6 +77,9 @@ export default { ...@@ -73,6 +77,9 @@ export default {
status status
hash hash
limitDate limitDate
received_certifications {
limit
}
} }
} }
} `, } `,
...@@ -89,11 +96,4 @@ export default { ...@@ -89,11 +96,4 @@ export default {
} }
} }
} }
</script> </script>
\ No newline at end of file
<style lang="sass" scoped>
// CSS Lié au composant
.table.table-striped tbody
tr
cursor: pointer
</style>
\ No newline at end of file
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