Skip to content

Commit 93e6a74

Browse files
committed
fix(ReportPage): modify page title
"[tabName] - Rapport d’audit de [procedureName]" instead of "Rapport d’audit accessibilité de [procedureName]"
1 parent ba7cb28 commit 93e6a74

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

confiture-web-app/src/components/audit/AraTabs.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ import { useUniqueId } from "../../composables/useUniqueId";
1515
import { TabData } from "../../types";
1616
import { slugify } from "../../utils";
1717
18+
defineExpose({
19+
getSelectedTabLabel: () => selectedTab.value?.label
20+
});
21+
1822
interface TabsRouteParams {
1923
name: string;
2024
params: {

confiture-web-app/src/pages/audit/AuditGenerationPage.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ const filterResultsCount = computed(() =>
148148
);
149149
150150
const pageTitle = computed(() => {
151-
// X résultats pour « [search] » - [tabName] - Audit de [procedureName]
151+
// X résultats pour « [search] » - [tabName] - Audit de [procedureName]
152152
const titleParts = [];
153153
const curAudit = auditStore.currentAudit;
154154
if (!curAudit) {
@@ -159,7 +159,7 @@ const pageTitle = computed(() => {
159159
"résultat",
160160
"résultats",
161161
filterResultsCount.value
162-
)} pour « ${filterStore.search} »`;
162+
)} pour « ${filterStore.search} »`;
163163
164164
titleParts.push(results);
165165
}

confiture-web-app/src/pages/report/ReportPage.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ const router = useRouter();
3636
3737
const showCopyAlert = ref(false);
3838
const onboardingModalRef = ref<InstanceType<typeof OnboardingModal>>();
39+
const tabsRef = ref<InstanceType<typeof AraTabs>>();
40+
41+
const pageTitle = computed(() => {
42+
// [tabName] - Rapport d’audit de [procedureName]
43+
const tabName = tabsRef.value?.getSelectedTabLabel();
44+
return tabName + " - Rapport d’audit de " + report.data?.procedureName;
45+
});
3946
4047
const hasNotes = computed(() => {
4148
return (
@@ -212,7 +219,7 @@ watch(
212219

213220
<template v-if="report.data">
214221
<PageMeta
215-
:title="`Rapport d’audit accessibilité de ${report.data.procedureName}`"
222+
:title="pageTitle"
216223
:description="`Découvrez la synthèse de l'audit de ${report.data?.procedureName}.`"
217224
/>
218225

@@ -280,6 +287,7 @@ watch(
280287
<!-- sticky-top="-0.1px" to prevent "one line background flickering"
281288
when scrolling the page -->
282289
<AraTabs
290+
ref="tabsRef"
283291
:route="{ name: 'report-full', params: { uniqueId } }"
284292
sticky-top="-0.1px"
285293
:tabs="tabsData"

0 commit comments

Comments
 (0)