diff --git a/resources/js/components/Dashboard/AdminView/Components/MeasuresInAction.vue b/resources/js/components/Dashboard/AdminView/Components/MeasuresInAction.vue index ad13634283da4f1e69a7b04c2040a8dcd420f514..20e66af3657f7ac85ac7ed9423a2c5140a3d9442 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 43b27dac96a97e5860af9aeadb536d41585de2e1..5c5a468532148a66a6b5958ec60f65f7ce91e982 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>