-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nouvelle fonctionnalité : qualité des aménagements
QualityText component possibilité de déclarer la qualité de l'aménagement et affichage sur tooltip LineTooltip : si la donnée qualité n'est pas définie, le LineTooltip n'affiche pas de ligne supplémentaire qualityText : notion de Inconnue manquante fix factorisation des label de qualityNames qualité : réduction du nombre d'état (satisfaisant et non satisfaisant) + adapatation du LineTooltip composant StatsQuality créé et ajouté dans le bloc aperçu de la page des lignes ajout du composant qualité sur la page d'accueil
- Loading branch information
Paul LOPEZ
committed
Dec 1, 2024
1 parent
34a6adf
commit a761caf
Showing
11 changed files
with
145 additions
and
8 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<template> | ||
<div v-if="stat.nbZone > 0" class="my-5 not-prose p-4 bg-[#F9FAFB]"> | ||
<div class="flex justify-between"> | ||
<div class="text-base font-normal text-gray-900"> | ||
<span class="italic">Au total, </span> | ||
<span class="text-lvv-pink font-bold">{{ displayDistanceInKm(stat.distance, precision) }}</span> ({{ displayPercent(stat.percent) }}) | ||
<span class="italic">{{ stat.distance < (2 * 1000) ? 'est non satisfaisant' : 'sont non satisfaisants' }}</span> | ||
</div> | ||
<div class="text-base font-normal text-gray-900"> | ||
<span class="text-lvv-pink font-bold">{{ stat.nbZone }}</span> | ||
<span class="italic">{{ stat.nbZone <= 1 ? ' zone problématique subsiste' : ' zones problématiques subsistent' }}</span> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import type { Geojson } from '~/types'; | ||
const { getStatsQuality, displayDistanceInKm, displayPercent } = useStats(); | ||
const { voies, precision } = defineProps<{ | ||
voies: Geojson[]; | ||
precision?: number; | ||
}>(); | ||
const stat = getStatsQuality(voies); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<template> | ||
<span v-if="displayQuality()" :class="qualities[type].color.text" class="font-bold">{{ qualities[type].title }}</span> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import type { LaneQuality } from '~/types'; | ||
const { displayQuality } = useConfig(); | ||
const { qualityNames } = useStats(); | ||
const { type } = defineProps<{ | ||
type: LaneQuality | ||
}>(); | ||
type QualityText = { | ||
[key in LaneQuality]: { | ||
title: string; | ||
color: { | ||
text: string; | ||
} | ||
} | ||
} | ||
const qualities: QualityText = { | ||
unsatisfactory: { | ||
title: qualityNames.unsatisfactory, | ||
color: { | ||
text: 'text-[#FF0000]' | ||
} | ||
}, | ||
satisfactory: { | ||
title: qualityNames.satisfactory, | ||
color: { | ||
text: 'text-[#00b050]' | ||
} | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters