#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 5 additions and 3 deletions
Showing only changes of commit 7b370e6b93 - Show all commits

View File

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

Así redirigimos a la misma sección! 😄 ej. claim/1/basic-data -> claim/2/basic-data

Así redirigimos a la misma sección! 😄 ej. claim/1/basic-data -> claim/2/basic-data