Skip to content

Commit f895b48

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 f895b48

2 files changed

Lines changed: 13 additions & 1 deletion

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/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)