generated from bastian/boilerplate
Initial commit
This commit is contained in:
143
apps/frontend/src/app/app.routes.ts
Normal file
143
apps/frontend/src/app/app.routes.ts
Normal file
@@ -0,0 +1,143 @@
|
||||
import type { Routes } from '@angular/router';
|
||||
import { permissionGuard } from './core/permission.guard';
|
||||
import { devRoutes } from './core/dev-routes';
|
||||
|
||||
export const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
loadComponent: () => import('./layout/app-shell').then((m) => m.AppShellComponent),
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
title: 'Dashboard',
|
||||
loadComponent: () =>
|
||||
import('./features/dashboard/dashboard.page').then((m) => m.DashboardPageComponent),
|
||||
},
|
||||
{
|
||||
path: 'profil',
|
||||
title: 'Profil',
|
||||
loadComponent: () =>
|
||||
import('./features/profile/profile.page').then((m) => m.ProfilePageComponent),
|
||||
},
|
||||
{
|
||||
path: 'account/security',
|
||||
title: 'Account-Sicherheit',
|
||||
loadComponent: () =>
|
||||
import('./features/account/account-security.page').then(
|
||||
(m) => m.AccountSecurityPageComponent,
|
||||
),
|
||||
},
|
||||
{
|
||||
path: 'notifications',
|
||||
title: 'Benachrichtigungen',
|
||||
canActivate: [permissionGuard],
|
||||
data: { permissions: ['notifications.readOwn'] },
|
||||
loadComponent: () =>
|
||||
import('./features/notifications/notifications.page').then(
|
||||
(m) => m.NotificationsPageComponent,
|
||||
),
|
||||
},
|
||||
{
|
||||
path: 'sessions',
|
||||
title: 'Eigene Sessions',
|
||||
loadComponent: () =>
|
||||
import('./features/sessions/sessions.page').then((m) => m.SessionsPageComponent),
|
||||
},
|
||||
{
|
||||
path: 'items',
|
||||
title: 'Items',
|
||||
canActivate: [permissionGuard],
|
||||
data: { permissions: ['items.read'] },
|
||||
loadComponent: () =>
|
||||
import('./features/items/items.page').then((m) => m.ItemsPageComponent),
|
||||
},
|
||||
{
|
||||
path: 'benutzer',
|
||||
title: 'Benutzerverwaltung',
|
||||
canActivate: [permissionGuard],
|
||||
data: { permissions: ['users.read'] },
|
||||
loadComponent: () =>
|
||||
import('./features/users/users.page').then((m) => m.UsersPageComponent),
|
||||
},
|
||||
{
|
||||
path: 'admin/users',
|
||||
title: 'Admin / Benutzer',
|
||||
canActivate: [permissionGuard],
|
||||
data: { permissions: ['users.read'] },
|
||||
loadComponent: () =>
|
||||
import('./features/admin/admin-users.page').then((m) => m.AdminUsersPageComponent),
|
||||
},
|
||||
{
|
||||
path: 'admin/users/:id',
|
||||
title: 'Admin / Benutzer',
|
||||
canActivate: [permissionGuard],
|
||||
data: { permissions: ['users.read'] },
|
||||
loadComponent: () =>
|
||||
import('./features/admin/admin-user-detail.page').then(
|
||||
(m) => m.AdminUserDetailPageComponent,
|
||||
),
|
||||
},
|
||||
{
|
||||
path: 'rollen',
|
||||
title: 'Rollenverwaltung',
|
||||
canActivate: [permissionGuard],
|
||||
data: { permissions: ['roles.read'] },
|
||||
loadComponent: () =>
|
||||
import('./features/roles/roles.page').then((m) => m.RolesPageComponent),
|
||||
},
|
||||
{
|
||||
path: 'admin/roles',
|
||||
title: 'Admin / Rollen',
|
||||
canActivate: [permissionGuard],
|
||||
data: { permissions: ['roles.read'] },
|
||||
loadComponent: () =>
|
||||
import('./features/admin/admin-roles.page').then((m) => m.AdminRolesPageComponent),
|
||||
},
|
||||
{
|
||||
path: 'admin/roles/:id',
|
||||
title: 'Admin / Rolle',
|
||||
canActivate: [permissionGuard],
|
||||
data: { permissions: ['roles.read'] },
|
||||
loadComponent: () =>
|
||||
import('./features/admin/admin-role-detail.page').then(
|
||||
(m) => m.AdminRoleDetailPageComponent,
|
||||
),
|
||||
},
|
||||
{
|
||||
path: 'audit-log',
|
||||
title: 'Audit-Log',
|
||||
canActivate: [permissionGuard],
|
||||
data: { permissions: ['audit.read'] },
|
||||
loadComponent: () =>
|
||||
import('./features/audit/audit.page').then((m) => m.AuditPageComponent),
|
||||
},
|
||||
{
|
||||
path: 'admin/audit',
|
||||
title: 'Admin / Audit',
|
||||
canActivate: [permissionGuard],
|
||||
data: { permissions: ['audit.read'] },
|
||||
loadComponent: () =>
|
||||
import('./features/audit/audit.page').then((m) => m.AuditPageComponent),
|
||||
},
|
||||
{
|
||||
path: '403',
|
||||
title: 'Keine Berechtigung',
|
||||
loadComponent: () =>
|
||||
import('./features/errors/forbidden.page').then((m) => m.ForbiddenPageComponent),
|
||||
},
|
||||
{
|
||||
path: 'fehler',
|
||||
title: 'Fehler',
|
||||
loadComponent: () =>
|
||||
import('./features/errors/error.page').then((m) => m.ErrorPageComponent),
|
||||
},
|
||||
...devRoutes,
|
||||
{
|
||||
path: '**',
|
||||
title: 'Nicht gefunden',
|
||||
loadComponent: () =>
|
||||
import('./features/errors/not-found.page').then((m) => m.NotFoundPageComponent),
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user