import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { Oauth2DialogComponent } from './ui/misc/oauth2-dialog/oauth2-dialog.component'; import { AppComponent } from './app.component'; import { AppPermission } from './core/common/enum/permission.enum'; import { BreadcrumbService } from './ui/misc/breadcrumb/breadcrumb.service'; import { ReloadHelperComponent } from './ui/misc/reload-helper/reload-helper.component'; const appRoutes: Routes = [ { path: '', component: AppComponent, data: { breadcrumbs: false, title: 'GENERAL.TITLES.GENERAL', ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.HOME' }) }, pathMatch: 'full' }, { path: 'home', loadChildren: () => import('./ui/dashboard/dashboard.module').then(m => m.DashboardModule), data: { breadcrumb: true } }, { path: 'descriptions', loadChildren: () => import('./ui/description/description.module').then(m => m.DescriptionModule), data: { breadcrumb: true, title: 'GENERAL.TITLES.DESCRIPTIONS' } }, { path: 'explore-descriptions', loadChildren: () => import('./ui/description/description.module').then(m => m.DescriptionModule), data: { breadcrumb: true, title: 'GENERAL.TITLES.EXPLORE' } }, { path: 'plans', loadChildren: () => import('./ui/dmp/dmp.module').then(m => m.DmpModule), data: { breadcrumb: true, title: 'GENERAL.TITLES.PLANS' } }, { path: 'explore-plans', loadChildren: () => import('./ui/dmp/dmp.module').then(m => m.DmpModule), data: { breadcrumb: true, title: 'GENERAL.TITLES.EXPLORE-PLANS' } }, { path: 'dmp-blueprints', loadChildren: () => import('./ui/admin/dmp-blueprint/dmp-blueprint.module').then(m => m.DmpBlueprintModule), data: { authContext: { permissions: [AppPermission.ViewDmpBlueprintPage] }, ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.DMP-BLUEPRINTS' }) } }, { path: 'about', loadChildren: () => import('./ui/about/about.module').then(m => m.AboutModule), data: { breadcrumb: true, title: 'GENERAL.TITLES.ABOUT' } }, { path: 'description-templates', loadChildren: () => import('./ui/admin/description-template/description-template.module').then(m => m.DescriptionTemplateModule), data: { authContext: { permissions: [AppPermission.ViewDescriptionTemplatePage] }, ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.DESCRIPTION-TEMPLATES' }) } }, { path: 'description-template-type', loadChildren: () => import('./ui/admin/description-types/description-template-type.module').then(m => m.DescriptionTemplateTypesModule), data: { authContext: { permissions: [AppPermission.ViewDescriptionTemplateTypePage] }, ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.DESCRIPTION-TEMPLATE-TYPES' }) }, }, { path: 'contact-support', loadChildren: () => import('./ui/contact/contact.module').then(m => m.ContactModule), data: { breadcrumb: true, title: 'CONTACT.SUPPORT.TITLE' } }, { path: 'glossary', loadChildren: () => import('./ui/glossary/glossary.module').then(m => m.GlossaryModule), data: { breadcrumb: true, title: 'GLOSSARY.TITLE' } }, { path: 'faq', loadChildren: () => import('./ui/faq/faq.module').then(m => m.FaqModule), data: { breadcrumb: true, title: 'FAQ.TITLE' } }, { path: 'user-guide', loadChildren: () => import('./ui/user-guide/user-guide.module').then(m => m.UserGuideModule), data: { breadcrumb: true, title: 'GUIDE.TITLE' } }, { path: 'privacy-policy', loadChildren: () => import('./ui/sidebar/sidebar-footer/privacy/privacy.module').then(m => m.PrivacyModule), data: { breadcrumb: true, title: 'GENERAL.TITLES.PRIVACY' } }, { path: 'opensource-licences', loadChildren: () => import('./ui/sidebar/sidebar-footer/opensource-licences/opensource-licenses.module').then(m => m.OpensourceLicencesModule), data: { breadcrumb: true, title: 'GENERAL.TITLES.OPENSOURCE-LICENCES' } }, { path: 'terms-and-conditions', loadChildren: () => import('./ui/sidebar/sidebar-footer/terms/terms.module').then(m => m.TermsModule), data: { breadcrumb: true, title: 'GENERAL.TITLES.TERMS' } }, { path: 'cookies-policy', loadChildren: () => import('./ui/sidebar/sidebar-footer/cookies-policy/cookies-policy.module').then(m => m.CookiesPolicyModule), data: { breadcrumb: true, title: 'GENERAL.TITLES.COOKIES-POLICY' } }, // { // path: 'splash', // loadChildren: () => import('./ui/splash/splash.module').then(m => m.SplashModule), // data: { // breadcrumb: true // } // }, { path: 'unauthorized', loadChildren: () => import('./ui/misc/unauthorized/unauthorized.module').then(m => m.UnauthorizedModule), data: { breadcrumb: true }, }, { path: 'users', loadChildren: () => import('./ui/admin/user/user.module').then(m => m.UsersModule), data: { breadcrumb: true, title: 'GENERAL.TITLES.USERS' }, }, { path: 'profile', loadChildren: () => import('./ui/user-profile/user-profile.module').then(m => m.UserProfileModule), data: { breadcrumb: true, title: 'GENERAL.TITLES.PROFILE' }, }, { path: 'languages', loadChildren: () => import('./ui/admin/language/language.module').then(m => m.LanguageModule), data: { authContext: { permissions: [AppPermission.ViewLanguagePage] }, ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.LANGUAGES' }) }, }, { path: 'supportive-material', loadChildren: () => import('./ui/supportive-material-editor/supportive-material-editor.module').then(m => m.SupportiveMaterialEditorModule), data: { authContext: { permissions: [AppPermission.ViewSupportiveMaterialPage] }, ...BreadcrumbService.generateRouteDataConfiguration({ title: 'GENERAL.TITLES.SUPPORTIVE-MATERIAL' }) }, }, { path: 'references', loadChildren: () => import('./ui/admin/reference/reference.module').then(m => m.ReferenceModule), data: { authContext: { permissions: [AppPermission.ViewReferencePage] }, ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.REFERENCES' }) }, }, { path: 'reference-type', loadChildren: () => import('./ui/admin/reference-type/reference-type.module').then(m => m.ReferenceTypeModule), data: { authContext: { permissions: [AppPermission.ViewReferenceTypePage] }, ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.REFERENCE-TYPES' }) }, }, { path: 'prefilling-sources', loadChildren: () => import('./ui/admin/prefilling-source/prefilling-source.module').then(m => m.PrefillingSourceModule), data: { authContext: { permissions: [AppPermission.ViewPrefillingSourcePage] }, ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.PREFILLING-SOURCES' }) }, }, { path: 'tenants', loadChildren: () => import('./ui/admin/tenant/tenant.module').then(m => m.TenantModule), data: { authContext: { permissions: [AppPermission.ViewTenantPage] }, ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.TENANTS' }) }, }, { path: 'notifications', loadChildren: () => import('./ui/admin/notification/notification.module').then(m => m.NotificationModule), data: { authContext: { permissions: [AppPermission.ViewNotificationPage] }, ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.NOTIFICATIONS' }) }, }, { path: 'notification-templates', loadChildren: () => import('./ui/admin/notification-template/notification-template.module').then(m => m.NotificationTemplateModule), data: { authContext: { permissions: [AppPermission.ViewNotificationTemplatePage] }, ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.NOTIFICATION-TEMPLATES' }) }, }, { path: 'mine-notifications', loadChildren: () => import('./ui/inapp-notification/mine-inapp-notification.module').then(m => m.MineInAppNotificationModule), data: { authContext: { permissions: [AppPermission.ViewMineInAppNotificationPage] }, ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.INAPP-NOTIFICATIONS' }) }, }, { path: 'entity-locks', loadChildren: () => import('./ui/admin/entity-locks/lock.module').then(m => m.LockModule), data: { authContext: { permissions: [AppPermission.ViewEntityLockPage] }, ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.ENTITY-LOCKS' }) }, }, { path: 'index-managment', loadChildren: () => import('./ui/admin/index-managment/index-managment.module').then(m => m.IndexManagmentModule), data: { breadcrumb: true, title: 'GENERAL.TITLES.INDEX-MANAGMENT' }, }, { path: 'maintenance-tasks', loadChildren: () => import('./ui/admin/maintenance-tasks/maintenance-tasks.module').then(m => m.MaintenanceTasksModule), data: { breadcrumb: true }, }, { path: 'login', loadChildren: () => import('./ui/auth/login/login.module').then(m => m.LoginModule), data: { breadcrumb: true, title: 'GENERAL.TITLES.LOGIN' }, }, { path: 'logout', loadChildren: () => import('./ui/auth/logout/logout.module').then(m => m.LogoutModule) }, { path: 'reload', component: ReloadHelperComponent }, { path: 'oauth2', component: Oauth2DialogComponent }, ]; @NgModule({ imports: [RouterModule.forRoot(appRoutes, {})], exports: [RouterModule], }) export class AppRoutingModule { }