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:
@@ -55,12 +55,16 @@ const isAppLoaded = computed(() => {
|
||||
})
|
||||
|
||||
const hasCompany = computed(() => {
|
||||
return !!companyStore.selectedCompany || !!userStore.currentUser?.is_super_admin
|
||||
return !!companyStore.selectedCompany || companyStore.isAdminMode
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
globalStore.bootstrap().then((res) => {
|
||||
if (!res.data.current_company && !res.data.current_user.is_super_admin) {
|
||||
if (companyStore.isAdminMode) {
|
||||
return
|
||||
}
|
||||
|
||||
if (!res.data.current_company) {
|
||||
if (route.name !== 'no.company') {
|
||||
router.push({ name: 'no.company' })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user