From 9a0c8f1d217107ae5478beacb95ec1def2b341bf Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 13 Nov 2023 20:23:05 +0200 Subject: [PATCH] [main | DONE | FIXED] app-routing.module.ts: Updated routes for search pages - same page for all entities. --- src/app/app-routing.module.ts | 65 +++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 6a97171..599f70e 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -2,6 +2,7 @@ import {NgModule} from '@angular/core'; import {Router, RouterModule, Routes} from '@angular/router'; import {OpenaireErrorPageComponent} from './error/errorPage.component'; import {ConfigurationService} from "./openaireLibrary/utils/configuration/configuration.service"; +import {PageURLResolverComponent} from "./openaireLibrary/utils/pageURLResolver.component"; const routes: Routes = [ {path: '', loadChildren: () => import('./home/home.module').then(m => m.HomeModule)}, @@ -43,36 +44,48 @@ const routes: Routes = [ path: 'search/organization', loadChildren: () => import('./landingPages/organization/libOrganization.module').then(m => m.LibOrganizationModule), data: { showHeader: true, hasMenuSearchBar: true} }, + + // Search Pages { - path: 'search/find', - // redirectTo: '' - loadChildren: () => import('./searchPages/find/libSearch.module').then(m => m.LibMainSearchModule) + path: 'search/find', loadChildren: () => import('./searchPages/find/libSearch.module').then(m => m.LibMainSearchModule) }, + {path: 'search/find/publications', component: PageURLResolverComponent}, + {path: 'search/find/datasets', component: PageURLResolverComponent}, + {path: 'search/find/software', component: PageURLResolverComponent}, + {path: 'search/find/other', component: PageURLResolverComponent}, { - path: 'search/find/research-outcomes', - // redirectTo: '' - loadChildren: () => import('./searchPages/simple/searchResearchResults.module').then(m => m.OpenaireSearchResearchResultsModule) - }, - { - path: 'search/find/projects', - // redirectTo: '' - loadChildren: () => import('./searchPages/simple/searchProjects.module').then(m => m.LibSearchProjectsModule) - }, - { - path: 'search/find/dataproviders', - // redirectTo: '' - loadChildren: () => import('./searchPages/simple/searchDataProviders.module').then(m => m.LibSearchDataProvidersModule) - }, - { - path: 'search/find/services', - // redirectTo: '' - loadChildren: () => import('./searchPages/simple/searchServices.module').then(m => m.LibSearchServicesModule) - }, - { - path: 'search/find/organizations', - // redirectTo: '' - loadChildren: () => import('./searchPages/simple/searchOrganizations.module').then(m => m.LibSearchOrganizationsModule) + path: 'search/find/:entity', loadChildren: () => import('./searchPages/find/libSearch.module').then(m => m.LibMainSearchModule) }, + // { + // path: 'search/find', + // // redirectTo: '' + // loadChildren: () => import('./searchPages/find/libSearch.module').then(m => m.LibMainSearchModule) + // }, + // { + // path: 'search/find/research-outcomes', + // // redirectTo: '' + // loadChildren: () => import('./searchPages/simple/searchResearchResults.module').then(m => m.OpenaireSearchResearchResultsModule) + // }, + // { + // path: 'search/find/projects', + // // redirectTo: '' + // loadChildren: () => import('./searchPages/simple/searchProjects.module').then(m => m.LibSearchProjectsModule) + // }, + // { + // path: 'search/find/dataproviders', + // // redirectTo: '' + // loadChildren: () => import('./searchPages/simple/searchDataProviders.module').then(m => m.LibSearchDataProvidersModule) + // }, + // { + // path: 'search/find/services', + // // redirectTo: '' + // loadChildren: () => import('./searchPages/simple/searchServices.module').then(m => m.LibSearchServicesModule) + // }, + // { + // path: 'search/find/organizations', + // // redirectTo: '' + // loadChildren: () => import('./searchPages/simple/searchOrganizations.module').then(m => m.LibSearchOrganizationsModule) + // }, { path: 'search/advanced/research-outcomes', // redirectTo: ''