mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-19 11:14:06 +00:00
Refactor Administration entrypoint
We moved the administration item to the company switcher in the header
This commit is contained in:
2
resources/scripts/router/index.js
vendored
2
resources/scripts/router/index.js
vendored
@@ -26,7 +26,7 @@ router.beforeEach((to) => {
|
||||
const { isAppLoaded } = globalStore
|
||||
|
||||
if (isAppLoaded && to.meta.requiresAuth && to.name !== 'no.company') {
|
||||
if (!companyStore.selectedCompany && !(to.meta.isSuperAdmin && userStore.currentUser?.is_super_admin)) {
|
||||
if (!companyStore.selectedCompany && !companyStore.isAdminMode && !(to.meta.isSuperAdmin && userStore.currentUser?.is_super_admin)) {
|
||||
return { name: 'no.company' }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user