From 20c15020a0a65392f0c546ff7547de14a30548f2 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 9 Aug 2023 12:57:35 +0200 Subject: [PATCH] refs #5989 fix: correct redirect --- src/components/PinnedModules.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/PinnedModules.vue b/src/components/PinnedModules.vue index 1193c951af..c85b6b2fa4 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')); }