Add business registration for customers, owner panel, role-based nav, and Montime branding.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-23 18:13:25 +03:30
co-authored by Cursor
parent e07527c1db
commit 6897acc846
10 changed files with 404 additions and 9 deletions
+11 -1
View File
@@ -41,6 +41,12 @@ const router = createRouter({
component: () => import('@/views/app/AppProfileView.vue'),
meta: { requiresAuth: true },
},
{
path: '/app/register-business',
name: 'app-register-business',
component: () => import('@/views/app/AppRegisterBusinessView.vue'),
meta: { requiresAuth: true, requiresCustomer: true },
},
{
path: '/app/owner',
name: 'app-owner',
@@ -54,7 +60,7 @@ const router = createRouter({
router.beforeEach(async (to) => {
const auth = useAuthStore();
if (auth.token && !auth.user) {
if (auth.token) {
await auth.loadUser();
}
@@ -66,6 +72,10 @@ router.beforeEach(async (to) => {
return { name: 'app-home' };
}
if (to.meta.requiresCustomer && !auth.isCustomer) {
return auth.isBusinessOwner ? { name: 'app-owner' } : { name: 'app-home' };
}
if (to.meta.guest && auth.isLoggedIn) {
return { name: 'app-home' };
}