File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ import { useUniqueId } from "../../composables/useUniqueId";
1515import { TabData } from " ../../types" ;
1616import { slugify } from " ../../utils" ;
1717
18+ defineExpose ({
19+ getSelectedTabLabel : () => selectedTab .value ?.label
20+ });
21+
1822interface TabsRouteParams {
1923 name: string ;
2024 params: {
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ const router = useRouter();
3636
3737const showCopyAlert = ref (false );
3838const 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
4047const 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"
You can’t perform that action at this time.
0 commit comments