diff --git a/src/components/ui/CardSummary.vue b/src/components/ui/CardSummary.vue index 57d1cb19a..ae9a43578 100644 --- a/src/components/ui/CardSummary.vue +++ b/src/components/ui/CardSummary.vue @@ -56,11 +56,20 @@ async function fetch() { } const showRedirectToSummaryIcon = computed(() => { - const routeExists = route.matched.some( - (route) => route.name === `${route.meta.moduleName}Summary` - ); - return !isSummary.value && route.meta.moduleName && routeExists; + const exist = existSummary(route.matched); + return !isSummary.value && route.meta.moduleName && exist; }); + +function existSummary(routes) { + const hasSummary = routes.some((r) => r.name === `${route.meta.moduleName}Summary`); + if (hasSummary) return hasSummary; + for (const current of routes) { + if (current.path != '/' && current.children) { + const exist = existSummary(current.children); + if (exist) return exist; + } + } +}