File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
src/routes/page/agent/reporting/[reportType] Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 1212 /** @type {any} */
1313 let menuUnsubscribe;
1414
15+ /** @type {string?} */
16+ let label = ' ' ;
17+
1518 /** @type {string} */
1619 let curSlug = ' ' ;
1720
2730 onMount (async () => {
2831 menuUnsubscribe = globalMenuStore .subscribe ((/** @type {import('$pluginTypes').PluginMenuDefModel[]} */ menu) => {
2932 const url = getPathUrl ();
30- let data = menu .find (x => x .link === url)? .embeddingInfo || null ;
31- if (! data) {
32- const found = menu .find (x => !! x .subMenu ? .find (y => y .link === url));
33- data = found? .subMenu ? .find (x => x .link === url)? .embeddingInfo || null ;
33+ let found = menu .find (x => x .link === url);
34+ label = found? .label || null ;
35+ if (! found? .embeddingInfo ) {
36+ const subFound = menu .find (x => !! x .subMenu ? .find (y => y .link === url));
37+ found = subFound? .subMenu ? .find (x => x .link === url);
38+ label = found? .label || null ;
3439 }
35- embed (data );
40+ embed (found ? . embeddingInfo || null );
3641 });
3742 });
3843
7984 };
8085< / script>
8186
82- < HeadTitle title= " {$_('Reporting')}" / >
83- < Breadcrumb title= " {$_('Agent')}" pagetitle= " {$_('Reporting')}" / >
87+ < HeadTitle title= " {$_(label || 'Reporting')}" / >
88+ < Breadcrumb title= " {$_('Agent')}" pagetitle= " {$_(label || 'Reporting')}" / >
8489
8590< Row>
8691 < Col lg= " 12" >
You can’t perform that action at this time.
0 commit comments