Skip to content
Snippets Groups Projects
Commit 4d091ca9 authored by sebastien dupuy's avatar sebastien dupuy
Browse files

correctif issue_14 des couleurs de la progress-bar (rouge jaune vert) pour les non admins

parent d1e62438
No related branches found
No related tags found
No related merge requests found
Pipeline #42180 passed
...@@ -60,11 +60,11 @@ export default { ...@@ -60,11 +60,11 @@ export default {
}, },
computed: { computed: {
evaluations () { evaluations () {
return this.$store.state.evaluations.all return this.$store.state.evaluations.all
}, },
organizations () { organizations () {
return this.$store.state.organizations.all return this.$store.state.organizations.all
.map( org => ({...org, .map( org => ({...org,
evaluations : this.evaluations.filter( e => e.organization_id === org.id) evaluations : this.evaluations.filter( e => e.organization_id === org.id)
.filter( e => e.status === 2) .filter( e => e.status === 2)
.sort( (a,b) => new Date(b.updated_at) - new Date(a.updated_at)) , .sort( (a,b) => new Date(b.updated_at) - new Date(a.updated_at)) ,
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
}, },
chartData() { chartData() {
// niveaux de mesures planifiés en moyenne dans les plan d’actions des structures actives // niveaux de mesures planifiés en moyenne dans les plan d’actions des structures actives
// Dans chaque Organisation active > Prendre la dernière evaluation > // Dans chaque Organisation active > Prendre la dernière evaluation >
// Regarder les measures_levels, mettre la measure id 1 à la première place du tableau correspondant au expected_level de la measure. // Regarder les measures_levels, mettre la measure id 1 à la première place du tableau correspondant au expected_level de la measure.
const labels = this.$store.state.measures.all.map( m => m.short_name) const labels = this.$store.state.measures.all.map( m => m.short_name)
...@@ -92,17 +92,17 @@ export default { ...@@ -92,17 +92,17 @@ export default {
datasets: [ datasets: [
{ {
label: 'Niveau 1', label: 'Niveau 1',
backgroundColor: '#ff327b', backgroundColor: '#D63F49',
data: this.data1 data: this.data1
}, },
{ {
label: 'Niveau 2', label: 'Niveau 2',
backgroundColor: '#0698ed', backgroundColor: '#FFC107',
data: this.data2 data: this.data2
}, },
{ {
label: 'Niveau 3', label: 'Niveau 3',
backgroundColor: '#00c6c3', backgroundColor: '#468355',
data: this.data3 data: this.data3
}, },
] ]
...@@ -110,4 +110,4 @@ export default { ...@@ -110,4 +110,4 @@ export default {
} }
} }
} }
</script> </script>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div v-if="favoriteMeasures" class="card py-3 px-2"> <div v-if="favoriteMeasures" class="card py-3 px-2">
<div class="card-title mb-3"> Top 3 des niveaux de mesures de sécurité planifiées</div> <div class="card-title mb-3"> Top 3 des niveaux de mesures de sécurité planifiées</div>
<div v-for="(ml, i) in favoriteMeasures" :key="i" class="card flex-row"> <div v-for="(ml, i) in favoriteMeasures" :key="i" class="card flex-row">
<div class="col-2 bg-primary font-weight-bold"> <div class="col-2 bg-primary font-weight-bold">
<span style="font-size: 50px;">{{ i + 1 }}</span> <span style="font-size: 50px;">{{ i + 1 }}</span>
</div> </div>
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
</div> </div>
<div class="progress progress-xs my-1"> <div class="progress progress-xs my-1">
<div <div
class="progress-bar bg-success" role="progressbar" class="progress-bar" role="progressbar"
:style="{width: ml.max_levels == 1 ? '33%' : ml.max_levels == 2 ? '66%' : ml.max_levels == 3 ? '100%' : '0%'}" :style="{width: ml.max_levels === 1 ? '33%' : ml.max_levels === 2 ? '66%' : ml.max_levels === 3 ? '100%' : '0%',
:class="ml.max_levels == 1 ? 'bg-danger' : ml.max_levels == 2 ? 'bg-info' : ml.max_levels == 3 ? 'bg-success' : 'black'" background: ml.max_levels === 1 ? '#D63F49' : ml.max_levels === 2 ? '#FFC107' : ml.max_levels === 3 ? '#468355' : 'black'}"
aria-valuemin="0" aria-valuemax="100"> aria-valuemin="0" aria-valuemax="100">
</div> </div>
</div> </div>
...@@ -65,4 +65,4 @@ export default { ...@@ -65,4 +65,4 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
</style> </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