[WIP] Fix claims routes

This commit is contained in:
argirok 2023-11-15 11:14:39 +02:00
parent a9b2f14c50
commit 44aee8801f
4 changed files with 13 additions and 16 deletions

View File

@ -27,11 +27,11 @@ const routes: Routes = [
loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule),
data: {title: Irish.METADATA_PREFIX + ' Admin | '},
},
{path: 'participate', loadChildren: () => import('./claims/claims.module').then(m => m.ClaimsModule)},
{
path: '',
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: 'my-orcid-links', loadChildren: () => import('./orcid/my-orcid-links/myOrcidLinks.module').then(m => m.LibMyOrcidLinksModule)},
{path: 'error', component: ErrorPageComponent},

View File

@ -4,14 +4,13 @@ import { RouterModule } from '@angular/router';
import {OpenaireDirectLinkingComponent} from './directLinking.component';
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireDirectLinkingComponent, canActivate: [IsRouteEnabled, LoginGuard], data: {
{ path: '', component: OpenaireDirectLinkingComponent, canActivate: [LoginGuard], data: {
redirect: properties.errorLink, community : 'openaire'
}, canDeactivate: [PreviousRouteRecorder]},

View File

@ -3,14 +3,13 @@ import { RouterModule } from '@angular/router';
import {OpenaireLinkingComponent} from './linkingGeneric.component';
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import {properties} from "../../../environments/environment";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireLinkingComponent, canActivate: [IsRouteEnabled, LoginGuard], data: {
{ path: '', component: OpenaireLinkingComponent, canActivate: [ LoginGuard], data: {
redirect: properties.errorLink, community : 'openaire'
}, canDeactivate: [PreviousRouteRecorder]},

View File

@ -4,7 +4,6 @@ import { RouterModule } from '@angular/router';
import {OpenaireMyClaimsComponent} from './myClaims.component';
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import {properties} from "../../../environments/environment";
@ -12,7 +11,7 @@ import {properties} from "../../../environments/environment";
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireMyClaimsComponent, canActivate: [LoginGuard],
data: {redirect: properties.errorLink, community : 'openaire'}, canDeactivate: [PreviousRouteRecorder]}])
data: {redirect: properties.errorLink}, canDeactivate: [PreviousRouteRecorder]}])
]
})
export class MyClaimsRoutingModule { }