argos/dmp-frontend/src/app/app-routing.module.ts

328 lines
8.8 KiB
TypeScript

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ReloadHelperComponent } from '@app/ui/misc/reload-helper/reload-helper.component';
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';
const appRoutes: Routes = [
{
path: '',
component: AppComponent,
data: {
breadcrumbs: false,
title: 'GENERAL.TITLES.GENERAL',
...BreadcrumbService.generateRouteDataConfiguration({
title: 'BREADCRUMBS.HOME'
})
},
pathMatch: 'full'
},
{
path: 'datasetcreatewizard',
loadChildren: () => import('./ui/dataset-create-wizard/dataset-create-wizard.module').then(m => m.DatasetCreateWizardModule),
data: {
breadcrumb: true,
title: 'GENERAL.TITLES.DATASETCREATEWIZARD'
}
},
{
path: 'explore',
// loadChildren: () => import('./ui/explore-dataset/explore-dataset.module').then(m => m.ExploreDatasetModule),
loadChildren: () => import('./ui/dataset/dataset.module').then(m => m.DatasetModule),
data: {
breadcrumb: true,
title: 'GENERAL.TITLES.EXPLORE'
}
},
{
path: 'explore-plans',
// loadChildren: () => import('./ui/explore-dmp/explore-dmp.module').then(m => m.ExploreDmpModule),
loadChildren: () => import('./ui/dmp/dmp.module').then(m => m.DmpModule),
data: {
breadcrumb: true,
title: 'GENERAL.TITLES.EXPLORE-PLANS'
}
},
{
path: 'datasets',
loadChildren: () => import('./ui/dataset/dataset.module').then(m => m.DatasetModule),
data: {
breadcrumb: true,
title: 'GENERAL.TITLES.DESCRIPTIONS'
}
},
{
path: 'about',
loadChildren: () => import('./ui/about/about.module').then(m => m.AboutModule),
data: {
breadcrumb: true,
title: 'GENERAL.TITLES.ABOUT'
}
},
// ----------- UNCOMMENT TO ADD AGAIN GRANTS --------
// {
// path: 'grants',
// loadChildren: () => import('./ui/grant/grant.module').then(m => m.GrantModule),
// data: {
// breadcrumb: true,
// title: 'GENERAL.TITLES.GRANTS'
// }
// },
{
path: 'plans',
loadChildren: () => import('./ui/dmp/dmp.module').then(m => m.DmpModule),
data: {
breadcrumb: true,
title: 'GENERAL.TITLES.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: 'quick-wizard',
loadChildren: () => import('./ui/quick-wizard/quick-wizard.module').then(m => m.OuickWizardModule),
data: {
breadcrumb: true,
title: "GENERAL.TITLES.QUICK-WIZARD"
}
},
{
path: 'dataset-profiles',
loadChildren: () => import('./ui/admin/dataset-profile/dataset-profile.module').then(m => m.DatasetProfileModule),
data: {
breadcrumb: true,
title: 'GENERAL.TITLES.DATASET-PROFILES'
}
},
{
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: 'home',
loadChildren: () => import('./ui/dashboard/dashboard.module').then(m => m.DashboardModule),
data: {
breadcrumb: true
}
},
// {
// 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.ViewLanguagePage]
},
...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: 'tenants',
loadChildren: () => import('./ui/admin/tenant/tenant.module').then(m => m.TenantModule),
data: {
authContext: {
permissions: [AppPermission.ViewTenantPage]
},
...BreadcrumbService.generateRouteDataConfiguration({
title: 'BREADCRUMBS.TENANTS'
})
},
},
{
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 { }