mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-15 09:14:08 +00:00
Add frontend handling for users without a company
Make setSelectedCompany null-safe and clear stale localStorage. Conditionally initialize company store state in bootstrap. Add router guard to redirect no-company users to NoCompanyView while allowing super admins through. Hide sidebar when no company. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
11
resources/scripts/admin/admin-router.js
vendored
11
resources/scripts/admin/admin-router.js
vendored
@@ -147,12 +147,6 @@ export default [
|
||||
component: RegisterWithInvitation,
|
||||
meta: { requiresAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/admin/no-company',
|
||||
name: 'no.company',
|
||||
component: NoCompanyView,
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/installation',
|
||||
component: LayoutInstallation,
|
||||
@@ -203,6 +197,11 @@ export default [
|
||||
component: LayoutBasic,
|
||||
meta: { requiresAuth: true },
|
||||
children: [
|
||||
{
|
||||
path: 'no-company',
|
||||
name: 'no.company',
|
||||
component: NoCompanyView,
|
||||
},
|
||||
{
|
||||
path: 'dashboard',
|
||||
name: 'dashboard',
|
||||
|
||||
Reference in New Issue
Block a user