[WIP] Fix claims routes
This commit is contained in:
parent
a9b2f14c50
commit
44aee8801f
|
@ -27,11 +27,11 @@ const routes: Routes = [
|
||||||
loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule),
|
loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule),
|
||||||
data: {title: Irish.METADATA_PREFIX + ' Admin | '},
|
data: {title: Irish.METADATA_PREFIX + ' Admin | '},
|
||||||
},
|
},
|
||||||
|
{path: 'participate', loadChildren: () => import('./claims/claims.module').then(m => m.ClaimsModule)},
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
loadChildren: () => import('./national/national.module').then(m => m.NationalModule)
|
loadChildren: () => import('./national/national.module').then(m => m.NationalModule)
|
||||||
},
|
},
|
||||||
{path: 'participate', loadChildren: () => import('./claims/claims.module').then(m => m.ClaimsModule)},
|
|
||||||
{path: 'orcid', loadChildren: () => import('./orcid/orcid.module').then(m => m.LibOrcidModule)},
|
{path: 'orcid', loadChildren: () => import('./orcid/orcid.module').then(m => m.LibOrcidModule)},
|
||||||
{path: 'my-orcid-links', loadChildren: () => import('./orcid/my-orcid-links/myOrcidLinks.module').then(m => m.LibMyOrcidLinksModule)},
|
{path: 'my-orcid-links', loadChildren: () => import('./orcid/my-orcid-links/myOrcidLinks.module').then(m => m.LibMyOrcidLinksModule)},
|
||||||
{path: 'error', component: ErrorPageComponent},
|
{path: 'error', component: ErrorPageComponent},
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
import { NgModule } from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import { RouterModule } from '@angular/router';
|
import {RouterModule} from '@angular/router';
|
||||||
|
|
||||||
import { OpenaireDirectLinkingComponent } from './directLinking.component';
|
import {OpenaireDirectLinkingComponent} from './directLinking.component';
|
||||||
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
|
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
|
||||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||||
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
|
|
||||||
import {properties} from "../../../environments/environment";
|
import {properties} from "../../../environments/environment";
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
RouterModule.forChild([
|
RouterModule.forChild([
|
||||||
{ path: '', component: OpenaireDirectLinkingComponent, canActivate: [IsRouteEnabled, LoginGuard], data: {
|
{ path: '', component: OpenaireDirectLinkingComponent, canActivate: [LoginGuard], data: {
|
||||||
redirect: properties.errorLink, community : 'openaire'
|
redirect: properties.errorLink, community : 'openaire'
|
||||||
}, canDeactivate: [PreviousRouteRecorder]},
|
}, canDeactivate: [PreviousRouteRecorder]},
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
import { NgModule } from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import { RouterModule } from '@angular/router';
|
import {RouterModule} from '@angular/router';
|
||||||
import { OpenaireLinkingComponent } from './linkingGeneric.component';
|
import {OpenaireLinkingComponent} from './linkingGeneric.component';
|
||||||
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
|
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
|
||||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||||
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
|
|
||||||
import {properties} from "../../../environments/environment";
|
import {properties} from "../../../environments/environment";
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
RouterModule.forChild([
|
RouterModule.forChild([
|
||||||
{ path: '', component: OpenaireLinkingComponent, canActivate: [IsRouteEnabled, LoginGuard], data: {
|
{ path: '', component: OpenaireLinkingComponent, canActivate: [ LoginGuard], data: {
|
||||||
redirect: properties.errorLink, community : 'openaire'
|
redirect: properties.errorLink, community : 'openaire'
|
||||||
}, canDeactivate: [PreviousRouteRecorder]},
|
}, canDeactivate: [PreviousRouteRecorder]},
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
import { NgModule } from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import { RouterModule } from '@angular/router';
|
import {RouterModule} from '@angular/router';
|
||||||
|
|
||||||
import {OpenaireMyClaimsComponent } from './myClaims.component';
|
import {OpenaireMyClaimsComponent} from './myClaims.component';
|
||||||
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
|
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
|
||||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||||
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
|
|
||||||
import {properties} from "../../../environments/environment";
|
import {properties} from "../../../environments/environment";
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +11,7 @@ import {properties} from "../../../environments/environment";
|
||||||
imports: [
|
imports: [
|
||||||
RouterModule.forChild([
|
RouterModule.forChild([
|
||||||
{ path: '', component: OpenaireMyClaimsComponent, canActivate: [LoginGuard],
|
{ path: '', component: OpenaireMyClaimsComponent, canActivate: [LoginGuard],
|
||||||
data: {redirect: properties.errorLink, community : 'openaire'}, canDeactivate: [PreviousRouteRecorder]}])
|
data: {redirect: properties.errorLink}, canDeactivate: [PreviousRouteRecorder]}])
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class MyClaimsRoutingModule { }
|
export class MyClaimsRoutingModule { }
|
||||||
|
|
Loading…
Reference in New Issue