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 {
},
computed: {
evaluations () {
return this.$store.state.evaluations.all
return this.$store.state.evaluations.all
},
organizations () {
return this.$store.state.organizations.all
.map( org => ({...org,
.map( org => ({...org,
evaluations : this.evaluations.filter( e => e.organization_id === org.id)
.filter( e => e.status === 2)
.sort( (a,b) => new Date(b.updated_at) - new Date(a.updated_at)) ,
......@@ -73,7 +73,7 @@ export default {
},
chartData() {
// 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.
const labels = this.$store.state.measures.all.map( m => m.short_name)
......@@ -92,17 +92,17 @@ export default {
datasets: [
{
label: 'Niveau 1',
backgroundColor: '#ff327b',
backgroundColor: '#D63F49',
data: this.data1
},
{
label: 'Niveau 2',
backgroundColor: '#0698ed',
backgroundColor: '#FFC107',
data: this.data2
},
{
label: 'Niveau 3',
backgroundColor: '#00c6c3',
backgroundColor: '#468355',
data: this.data3
},
]
......@@ -110,4 +110,4 @@ export default {
}
}
}
</script>
\ No newline at end of file
</script>
......@@ -2,7 +2,7 @@
<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 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">
<span style="font-size: 50px;">{{ i + 1 }}</span>
</div>
......@@ -13,9 +13,9 @@
</div>
<div class="progress progress-xs my-1">
<div
class="progress-bar bg-success" role="progressbar"
: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'"
class="progress-bar" role="progressbar"
:style="{width: ml.max_levels === 1 ? '33%' : ml.max_levels === 2 ? '66%' : ml.max_levels === 3 ? '100%' : '0%',
background: ml.max_levels === 1 ? '#D63F49' : ml.max_levels === 2 ? '#FFC107' : ml.max_levels === 3 ? '#468355' : 'black'}"
aria-valuemin="0" aria-valuemax="100">
</div>
</div>
......@@ -65,4 +65,4 @@ export default {
align-items: center;
justify-content: center;
}
</style>
\ No newline at end of file
</style>
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