#6891 showRightSideFilterPanel #353

Merged
jorgep merged 48 commits from 6891-showRightSideFilterPanel into dev 2024-05-15 13:39:23 +00:00
1 changed files with 2 additions and 7 deletions
Showing only changes of commit 4d1cef7f68 - Show all commits

View File

@ -12,16 +12,11 @@ export default function useRedirect() {
const { matched: matches } = router.currentRoute.value;
const { path } = matches.at(-1);
const [, moduleName] = path.split('/');
if (!data.length || data.length > 1)
return router.push({ path: `/${moduleName}/list` });
return router.push({ path: path.replace(/:id.*/, '') });
const targetId = data[0].id;
if (/\/list|-list/.test(path))
router.push({ path: `/${moduleName}/${targetId}/summary` });
else router.push({ path: path.replace(/:id/, targetId) });
router.push({ path: path.replace(/\/(list|-list|:id)/, `/${data[0].id}`) });
};
return { navigate };