diff --git a/src/components/PinnedModules.vue b/src/components/PinnedModules.vue index 1193c951a..c85b6b2fa 100644 --- a/src/components/PinnedModules.vue +++ b/src/components/PinnedModules.vue @@ -20,14 +20,15 @@ defineExpose({ const pinnedModules = computed(() => navigation.getPinnedModules()); async function redirect() { + if (route.path == '/dashboard') return (window.location.href = await getUrl('')); let section = route.path.substring(1); - if (!route.path.includes('/')) return (window.location.href = await getUrl(section)); section = section.substring(0, section.indexOf('/')); + if (route?.params?.id) return (window.location.href = await getUrl( `${section}/${route.params.id}/summary` )); - return (window.location.href = await getUrl(section + 'dashboard')); + return (window.location.href = await getUrl(section + '/index')); }