From 4e531ae68dee7e466c2f1f9e550782a8833db3f5 Mon Sep 17 00:00:00 2001 From: Yaacov Date: Mon, 10 Feb 2025 15:57:01 +0100 Subject: [PATCH 1/4] fix buggy refresh (patch) (#948) --- .../src/pages/audit/AuditGenerationPage.vue | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/confiture-web-app/src/pages/audit/AuditGenerationPage.vue b/confiture-web-app/src/pages/audit/AuditGenerationPage.vue index 990350dc..4210ef9d 100644 --- a/confiture-web-app/src/pages/audit/AuditGenerationPage.vue +++ b/confiture-web-app/src/pages/audit/AuditGenerationPage.vue @@ -1,6 +1,6 @@ @@ -69,17 +176,21 @@ watch(currentTab, (currentTab) => { --> diff --git a/confiture-web-app/src/components/audit/AraTabsPanel.vue b/confiture-web-app/src/components/audit/AraTabsPanel.vue new file mode 100644 index 00000000..29fe3c1c --- /dev/null +++ b/confiture-web-app/src/components/audit/AraTabsPanel.vue @@ -0,0 +1,27 @@ + + + diff --git a/confiture-web-app/src/components/audit/AraTabsTabData.ts b/confiture-web-app/src/components/audit/AraTabsTabData.ts new file mode 100644 index 00000000..856482fd --- /dev/null +++ b/confiture-web-app/src/components/audit/AraTabsTabData.ts @@ -0,0 +1,32 @@ +import { type Component } from "vue"; + +import LayoutIcon from "../../components/icons/LayoutIcon.vue"; +import { slugify } from "../../utils"; + +export class AraTabsTabData { + label: string; + #slug: string; // do not allow slug to be defined from outside + icon: typeof LayoutIcon | undefined; + component: Component; + componentParams: object | undefined; + + constructor(data: { + label: string; + icon?: typeof LayoutIcon; + component: Component; + componentParams?: object; + }) { + const label = data.label; + this.label = label; + this.#slug = slugify(label); + this.icon = data.icon; + this.component = data.component; + this.componentParams = data.componentParams; + } + + // TODO: check how to expose "slug" to DevTools + // Currently it is not exposed because #slug is private + public get slug(): string { + return this.#slug; + } +} diff --git a/confiture-web-app/src/components/audit/AuditGenerationHeader.vue b/confiture-web-app/src/components/audit/AuditGenerationHeader.vue index b37f3ec7..3a75c2af 100644 --- a/confiture-web-app/src/components/audit/AuditGenerationHeader.vue +++ b/confiture-web-app/src/components/audit/AuditGenerationHeader.vue @@ -289,7 +289,7 @@ onMounted(() => {
    diff --git a/confiture-web-app/src/components/audit/AuditSettingsForm.vue b/confiture-web-app/src/components/audit/AuditSettingsForm.vue index be36ed49..5da06b39 100644 --- a/confiture-web-app/src/components/audit/AuditSettingsForm.vue +++ b/confiture-web-app/src/components/audit/AuditSettingsForm.vue @@ -3,6 +3,7 @@ import { computed, nextTick, ref, toRaw, watch } from "vue"; import { useRoute } from "vue-router"; import { usePreviousRoute } from "../../composables/usePreviousRoute"; +import router from "../../router"; import { useAccountStore } from "../../store/account"; import { AuditPage, AuditType, CreateAuditRequestData } from "../../types"; import { formatEmail } from "../../utils"; @@ -112,7 +113,7 @@ const backLinkLabel = computed(() => { :label="backLinkLabel" :to="{ name: previousRoute.route?.name || 'audit-overview', - params: { uniqueId: route.params.uniqueId } + params: previousRoute.route?.params }" /> @@ -189,15 +190,12 @@ const backLinkLabel = computed(() => { Enregistrer les modifications - Annuler - +