- added organizations - added industries - added logo in 2 colors for light and dark theme - improved authorization to allow multi tenancy
73 lines
3.3 KiB
TypeScript
73 lines
3.3 KiB
TypeScript
import { Routes } from '@angular/router';
|
|
import { AppLayout } from './app/layout/component/app.layout';
|
|
import { Dashboard } from './app/pages/dashboard/dashboard';
|
|
import { Documentation } from './app/pages/documentation/documentation';
|
|
import { Landing } from './app/pages/landing/landing';
|
|
import { Notfound } from './app/pages/notfound/notfound';
|
|
import { Properties } from '@/pages/properties/properties';
|
|
import { PropertyDetails } from '@/pages/property-details/property-details';
|
|
import { PropertyManager } from '@/pages/property-manager/property-manager';
|
|
import { canActivateAuthRole } from '@/guards/auth.guard';
|
|
import { Projects } from '@/pages/projects/projects';
|
|
import { ProjectDetails } from '@/pages/project-details/project-details';
|
|
import { Contacts } from '@/pages/contacts/contacts';
|
|
import { Organizations } from '@/pages/organizations/organizations';
|
|
import { IndustryManager } from '@/pages/industry-manager/industry-manager';
|
|
|
|
export const appRoutes: Routes = [
|
|
{
|
|
path: '',
|
|
component: AppLayout,
|
|
children: [
|
|
{
|
|
path: '', component: Dashboard,
|
|
// data: { role: ['dev', 'admin', 'can-view-dashboard'] }, canActivate: [canActivateAuthRole]
|
|
},
|
|
|
|
{
|
|
path: 'projects', component: Projects,
|
|
data: { role: ['dev', 'admin', 'can-view-projects'] }, canActivate: [canActivateAuthRole]
|
|
},
|
|
{
|
|
path: 'organizations', component: Organizations,
|
|
data: { role: ['dev', 'admin', 'can-view-organizations'] }, canActivate: [canActivateAuthRole]
|
|
},
|
|
{
|
|
path: 'projects/:id', component: ProjectDetails,
|
|
data: { role: ['dev', 'admin', 'can-view-projects'] }, canActivate: [canActivateAuthRole]
|
|
},
|
|
|
|
{
|
|
path: 'contacts', component: Contacts,
|
|
data: { role: ['dev', 'admin', 'can-view-contacts'] }, canActivate: [canActivateAuthRole]
|
|
},
|
|
|
|
// admin pages
|
|
{
|
|
path: 'admin/industries', component: IndustryManager,
|
|
data: { role: ['dev', 'admin', 'can-manage-industries'] }, canActivate: [canActivateAuthRole]
|
|
},
|
|
{
|
|
path: 'properties', component: Properties,
|
|
data: { role: ['dev', 'admin', 'can-view-properties'] }, canActivate: [canActivateAuthRole]
|
|
},
|
|
{
|
|
path: 'properties/:id', component: PropertyDetails,
|
|
data: { role: ['dev', 'admin', 'can-view-properties'] }, canActivate: [canActivateAuthRole]
|
|
},
|
|
{
|
|
path: 'admin/properties', component: PropertyManager,
|
|
data: { role: ['dev', 'admin', 'can-manage-properties'] }, canActivate: [canActivateAuthRole]
|
|
},
|
|
|
|
{ path: 'uikit', loadChildren: () => import('./app/pages/uikit/uikit.routes') },
|
|
{ path: 'documentation', component: Documentation },
|
|
{ path: 'pages', loadChildren: () => import('./app/pages/pages.routes') }
|
|
]
|
|
},
|
|
{ path: 'landing', component: Landing },
|
|
{ path: 'notfound', component: Notfound },
|
|
{ path: 'auth', loadChildren: () => import('./app/pages/auth/auth.routes') },
|
|
{ path: '**', redirectTo: '/notfound' }
|
|
];
|