From 4d091ca98f57ecfc436c05f17cdd7d48f938f8e3 Mon Sep 17 00:00:00 2001 From: sebastien <dupuy@datakode.fr> Date: Thu, 2 Mar 2023 12:05:00 +0100 Subject: [PATCH] correctif issue_14 des couleurs de la progress-bar (rouge jaune vert) pour les non admins --- .../AdminView/Components/MeasuresInAction.vue | 14 +++++++------- .../ManagerView/Components/MeasurePlanned.vue | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/resources/js/components/Dashboard/AdminView/Components/MeasuresInAction.vue b/resources/js/components/Dashboard/AdminView/Components/MeasuresInAction.vue index ad136342..20e66af3 100644 --- a/resources/js/components/Dashboard/AdminView/Components/MeasuresInAction.vue +++ b/resources/js/components/Dashboard/AdminView/Components/MeasuresInAction.vue @@ -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> diff --git a/resources/js/components/Dashboard/ManagerView/Components/MeasurePlanned.vue b/resources/js/components/Dashboard/ManagerView/Components/MeasurePlanned.vue index 43b27dac..5c5a4685 100644 --- a/resources/js/components/Dashboard/ManagerView/Components/MeasurePlanned.vue +++ b/resources/js/components/Dashboard/ManagerView/Components/MeasurePlanned.vue @@ -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> -- GitLab