From b796eb3e8a829d9076cc1bc143e76144c652042c Mon Sep 17 00:00:00 2001 From: Quentin Bellanger Date: Fri, 6 Sep 2024 14:52:14 +0200 Subject: [PATCH] add transverse callout in results detail tab --- .../audit/AuditGenerationCriterium.vue | 1 - .../src/components/report/ReportResults.vue | 260 +++++++++++------- .../src/pages/report/ReportPage.vue | 10 +- 3 files changed, 162 insertions(+), 109 deletions(-) diff --git a/confiture-web-app/src/components/audit/AuditGenerationCriterium.vue b/confiture-web-app/src/components/audit/AuditGenerationCriterium.vue index df5ee41dd..74148b8b2 100644 --- a/confiture-web-app/src/components/audit/AuditGenerationCriterium.vue +++ b/confiture-web-app/src/components/audit/AuditGenerationCriterium.vue @@ -74,7 +74,6 @@ const result = computed( )! ); -// TODO: UX is not finalized. const transverseStatus = computed((): CriteriumResultStatus | null => { if (store.data) { return store.data?.[-1][props.topicNumber][props.criterium.number].status; diff --git a/confiture-web-app/src/components/report/ReportResults.vue b/confiture-web-app/src/components/report/ReportResults.vue index 81cc3550a..a4869606c 100644 --- a/confiture-web-app/src/components/report/ReportResults.vue +++ b/confiture-web-app/src/components/report/ReportResults.vue @@ -1,5 +1,6 @@ + + diff --git a/confiture-web-app/src/pages/report/ReportPage.vue b/confiture-web-app/src/pages/report/ReportPage.vue index 677225acd..832ca4f04 100644 --- a/confiture-web-app/src/pages/report/ReportPage.vue +++ b/confiture-web-app/src/pages/report/ReportPage.vue @@ -88,7 +88,7 @@ const targetTabIndex = computed(() => { }); const router = useRouter(); -function handleTabChange(tab: { title: string }) { +function handleTabChange(tabTitle: string) { // change the URL in the browser adress bar without triggering vue-router navigation history.pushState( {}, @@ -97,12 +97,12 @@ function handleTabChange(tab: { title: string }) { name: "report", params: { uniqueId, - tab: slugify(tab.title) + tab: slugify(tabTitle) } }).fullPath ); - targetTab.value = slugify(tab.title); + targetTab.value = slugify(tabTitle); } const csvExportUrl = computed(() => `/api/reports/${uniqueId}/exports/csv`); @@ -286,9 +286,9 @@ const siteUrl = computed(() => { role="tabpanel" :aria-labelledby="`tabpanel-${slugify(tab.title)}`" tabindex="0" - v-on="{ 'dsfr.disclose': () => handleTabChange(tab) }" + v-on="{ 'dsfr.disclose': () => handleTabChange(tab.title) }" > - +