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

116 lines
2.4 KiB
TypeScript
Raw Normal View History

2019-01-18 18:03:45 +01:00
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DmpEditorComponent } from './editor/dmp-editor.component';
import { InvitationAcceptedComponent } from './invitation/accepted/dmp-invitation-accepted.component';
import { DmpListingComponent } from './listing/dmp-listing.component';
import { DmpWizardComponent } from './wizard/dmp-wizard.component';
2019-05-21 15:42:28 +02:00
import { DmpOverviewComponent } from './overview/dmp-overview.component';
import { DmpCloneComponent } from './clone/dmp-clone.component';
import { AuthGuard } from '@app/core/auth-guard.service';
2019-01-18 18:03:45 +01:00
const routes: Routes = [
{
path: '',
component: DmpListingComponent,
data: {
breadcrumb: true
},
},
{
path: 'versions/:groupId',
component: DmpListingComponent,
data: {
breadcrumb: true
},
},
// Uncomment to get dmp plans for grant with grantId
{
path: 'grant/:grantId',
component: DmpListingComponent,
data: {
breadcrumb: true
},
},
2019-01-18 18:03:45 +01:00
{
path: 'edit/:id',
component: DmpEditorComponent,
data: {
2019-09-16 17:46:19 +02:00
breadcrumb: true,
title: 'GENERAL.TITLES.DMP-EDIT'
2019-01-18 18:03:45 +01:00
},
},
2019-05-21 15:42:28 +02:00
{
path: 'publicEdit/:publicId',
component: DmpEditorComponent,
2019-05-21 15:42:28 +02:00
data: {
2019-09-16 17:46:19 +02:00
breadcrumb: true,
title: 'GENERAL.TITLES.DMP-PUBLIC-EDIT'
2019-05-21 15:42:28 +02:00
},
},
2019-04-26 16:05:15 +02:00
{
path: 'overview/:id',
component: DmpOverviewComponent,
data: {
breadcrumb: true,
title: 'GENERAL.TITLES.DMP-OVERVIEW'
},
},
{
path: 'publicOverview/:publicId',
component: DmpOverviewComponent,
2019-04-26 16:05:15 +02:00
data: {
2019-09-16 17:46:19 +02:00
breadcrumb: true,
title: 'GENERAL.TITLES.DMP-OVERVIEW'
2019-04-26 16:05:15 +02:00
},
},
// ----------- UNCOMMENT TO ADD AGAIN GRANTS --------
// {
// path: 'new/grant/:grantId',
// component: DmpEditorComponent,
// data: {
// breadcrumbs: 'new'
// }
// },
2019-01-18 18:03:45 +01:00
{
path: 'new',
component: DmpEditorComponent,
canActivate: [AuthGuard],
2019-01-18 18:03:45 +01:00
data: {
2019-09-16 17:46:19 +02:00
breadcrumbs: 'new',
title: 'GENERAL.TITLES.PLANS-NEW'
2019-01-18 18:03:45 +01:00
}
},
{
path: 'new_version/:id',
2019-09-02 10:19:16 +02:00
// component: DmpWizardComponent,
component: DmpCloneComponent,
2019-01-18 18:03:45 +01:00
data: {
clone: false,
2019-09-16 17:46:19 +02:00
breadcrumb: true,
title: 'GENERAL.TITLES.DMP-NEW-VERSION'
2019-01-18 18:03:45 +01:00
},
},
{
path: 'clone/:id',
component: DmpCloneComponent,
2019-01-18 18:03:45 +01:00
data: {
clone: false,
2019-09-16 17:46:19 +02:00
breadcrumb: true,
title: 'GENERAL.TITLES.DMP-CLONE'
2019-01-18 18:03:45 +01:00
},
},
{
path: 'invitation/:id',
component: InvitationAcceptedComponent,
data: {
breadcrumb: true
},
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
2019-04-26 16:05:15 +02:00
export class DmpRoutingModule { }