This commit is contained in:
parent
e326e4e4d7
commit
20c15020a0
|
@ -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'));
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue