|
|
|
|
@ -164,9 +164,16 @@ router.beforeEach(async (to) => {
|
|
|
|
|
|
|
|
|
|
if (!adminDynamicRoutesRegistered()) {
|
|
|
|
|
await registerAdminDynamicRoutes(router)
|
|
|
|
|
if (to.name === 'AdminLayout' || to.path === '/admin') {
|
|
|
|
|
return { name: 'admin-dashboard', replace: true }
|
|
|
|
|
}
|
|
|
|
|
return { ...to, replace: true }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (to.name === 'AdminLayout' || to.path === '/admin') {
|
|
|
|
|
return { name: 'admin-dashboard', replace: true }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|