From 6b20db41629abfaaa20452a650a71e43ea1364f1 Mon Sep 17 00:00:00 2001 From: David Mendy Date: Fri, 31 May 2024 15:14:25 +0200 Subject: [PATCH 1/2] refactor: :recycle: remove isDummyTypology and refactor guideFactice --- frontend/src/components/ResultPage.vue | 12 ++++---- .../utils/firearms-utils/autre-pistolet.ts | 1 - .../epaule-a-levier-sous-garde.ts | 1 - .../utils/firearms-utils/epaule-a-pompe.ts | 1 - .../epaule-a-un-coup-par-canon.ts | 1 - .../utils/firearms-utils/epaule-a-verrou.ts | 27 ++++++++++-------- .../epaule-semi-auto-militaire-milieu-20e.ts | 1 - .../epaule-semi-auto-style-chasse.ts | 1 - .../firearms-utils/epaule_mecanisme_ancien.ts | 1 - .../pistolet-mecanisme-ancien.ts | 1 - .../pistolet-semi-auto-moderne.ts | 27 ++++++++++-------- frontend/src/utils/firearms-utils/revolver.ts | 28 ++++++++++--------- .../semi-auto-style-militaire-autre.ts | 27 ++++++++++-------- .../GuideIdentificationFirearm.vue | 8 ++---- .../IdentificationSelectAmmo.vue | 4 +-- 15 files changed, 71 insertions(+), 70 deletions(-) diff --git a/frontend/src/components/ResultPage.vue b/frontend/src/components/ResultPage.vue index 1f6a218f..62b08fb7 100644 --- a/frontend/src/components/ResultPage.vue +++ b/frontend/src/components/ResultPage.vue @@ -20,7 +20,7 @@ const img = computed(() => resultStore.img) const typology = TYPOLOGIES[resultStore.typology] const isDummy = computed(() => stepsStore.isDummy) -const isDummyTypology = computed(() => typology?.isDummyTypology === true) +const hasGuideDummy = typology?.guideDummy !== undefined const isCardDetected = computed(() => resultStore.gunLength !== null && resultStore.gunBarrelLength !== null) const isUp = ref(false) @@ -75,7 +75,7 @@ function sendFeedback (isCorrect: boolean) {

Typologie de l'arme @@ -144,7 +144,7 @@ function sendFeedback (isCorrect: boolean) { > {{ label }}

-