From 02580acf7d89fa5b1e1f8c557b6171e4218efbc4 Mon Sep 17 00:00:00 2001 From: Quentin Bellanger Date: Wed, 10 Jan 2024 15:37:07 +0100 Subject: [PATCH] remove help alert on report page (#602) --- .../src/components/report/OnboardingModal.vue | 6 ++-- .../src/pages/report/ReportPage.vue | 31 +------------------ 2 files changed, 3 insertions(+), 34 deletions(-) diff --git a/confiture-web-app/src/components/report/OnboardingModal.vue b/confiture-web-app/src/components/report/OnboardingModal.vue index 7a6ab100..51ad0b58 100644 --- a/confiture-web-app/src/components/report/OnboardingModal.vue +++ b/confiture-web-app/src/components/report/OnboardingModal.vue @@ -13,7 +13,7 @@ const props = defineProps<{ }>(); const emit = defineEmits<{ - (e: "close", confirmed: boolean): void; + (e: "close"): void; }>(); const modal = ref>(); @@ -59,7 +59,6 @@ const steps = computed(() => [ const currentStep = ref(0); const contentEl = ref(); -const confirmed = ref(false); const previousStep = () => { currentStep.value = Math.max(0, currentStep.value - 1); @@ -67,7 +66,6 @@ const previousStep = () => { const nextStep = () => { if (currentStep.value === 4) { - confirmed.value = true; modal.value?.hide(); } @@ -85,7 +83,7 @@ watch(currentStep, () => { id="onboarding-modal" ref="modal" aria-label="Bienvenue sur votre rapport d’audit" - @closed="emit('close', confirmed)" + @closed="emit('close')" >
diff --git a/confiture-web-app/src/pages/report/ReportPage.vue b/confiture-web-app/src/pages/report/ReportPage.vue index 7dc72ef9..72aaba1a 100644 --- a/confiture-web-app/src/pages/report/ReportPage.vue +++ b/confiture-web-app/src/pages/report/ReportPage.vue @@ -60,7 +60,6 @@ function hideReportAlert() { } const onboardingModalRef = ref>(); -const showOnboardingAlert = ref(false); watch( () => report.data, @@ -72,25 +71,12 @@ watch( ) { onboardingModalRef.value?.show(); } - - showOnboardingAlert.value = - getAuditStatus(report) !== AuditStatus.IN_PROGRESS && - localStorage.getItem("confiture:hide-onboarding-alert") !== "true"; } } ); -function onOnboardingClose(confirmed: boolean) { +function onOnboardingClose() { localStorage.setItem("confiture:seen-onboarding", "true"); - showOnboardingAlert.value = !confirmed; - if (confirmed) { - localStorage.setItem("confiture:hide-onboarding-alert", "true"); - } -} - -function onOnboardingAlertClose() { - showOnboardingAlert.value = false; - localStorage.setItem("confiture:hide-onboarding-alert", "true"); } const targetTab = ref(route.params.tab as string | undefined); @@ -145,21 +131,6 @@ const siteUrl = computed(() => {