reference type routing fix

This commit is contained in:
amentis 2024-04-26 12:14:46 +03:00
parent db80cb1c34
commit d30613b061
1 changed files with 16 additions and 15 deletions

View File

@ -11,25 +11,26 @@ import { ReferenceTypeEditorResolver } from './editor/reference-type-editor.reso
const routes: Routes = [
{
{
path: '',
component: ReferenceTypeListingComponent,
canActivate: [AuthGuard]
},
{
path: 'new',
component: ReferenceTypeEditorComponent,
canActivate: [AdminAuthGuard],
data: {
authContext: {
permissions: [AppPermission.EditReferenceType]
},
...BreadcrumbService.generateRouteDataConfiguration({
title: 'BREADCRUMBS.NEW-REFERENCE-TYPE'
})
}
},
{
path: 'new',
component: ReferenceTypeEditorComponent,
canActivate: [AuthGuard],
canDeactivate: [PendingChangesGuard],
data: {
authContext: {
permissions: [AppPermission.EditReferenceType]
},
...BreadcrumbService.generateRouteDataConfiguration({
title: 'BREADCRUMBS.NEW-REFERENCE-TYPE'
})
}
},
{
path: ':id',
canActivate: [AuthGuard],
component: ReferenceTypeEditorComponent,
@ -47,7 +48,7 @@ const routes: Routes = [
}
},
{ path: '**', loadChildren: () => import('@common/modules/page-not-found/page-not-found.module').then(m => m.PageNotFoundModule) },
{ path: '**', loadChildren: () => import('@common/modules/page-not-found/page-not-found.module').then(m => m.PageNotFoundModule) },
];
@NgModule({