From 8f6ca702b13d5aea831469156d65f9ea8b098dd6 Mon Sep 17 00:00:00 2001 From: argirok Date: Thu, 4 Apr 2024 09:28:59 +0300 Subject: [PATCH] [pluginsFunctionality | DONE | REMOVED] remove FOS component, use directly the library component - fixes the back issue after click to go to search page --- src/app/app-routing.module.ts | 6 +----- src/app/fos/fos-routing.module.ts | 20 -------------------- src/app/fos/fos.component.ts | 21 --------------------- src/app/fos/fos.module.ts | 27 --------------------------- 4 files changed, 1 insertion(+), 73 deletions(-) delete mode 100644 src/app/fos/fos-routing.module.ts delete mode 100644 src/app/fos/fos.component.ts delete mode 100644 src/app/fos/fos.module.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 3a83d08..56ec1ae 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -47,11 +47,7 @@ const routes: Routes = [ loadChildren: () => import('./sdg/sdg.module').then(m => m.LibSdgModule), data: {hasQuickContact: false} }, - { - path: 'fields-of-science', - loadChildren: () => import('./fos/fos.module').then(m => m.LibFosModule), - data: {extraOffset: 100, hasQuickContact: false} - }, + {path: 'fields-of-science', loadChildren: () => import('./openaireLibrary/fos/fos.module').then(m => m.FosModule), data: {extraOffset: 100, hasQuickContact: false}}, { path: 'organizations', loadChildren: () => import('./htmlPages/organizations/organizationsPage.module').then(m => m.OrganizationsPageModule), diff --git a/src/app/fos/fos-routing.module.ts b/src/app/fos/fos-routing.module.ts deleted file mode 100644 index fdbb09c..0000000 --- a/src/app/fos/fos-routing.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import {NgModule} from "@angular/core"; -import {RouterModule} from "@angular/router"; -import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard"; -import {CommunityFosComponent} from "./fos.component"; -import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard"; - -@NgModule({ - imports: [ - RouterModule.forChild([ - { - path: '', - component: CommunityFosComponent, - canActivate: [IsRouteEnabled], - canDeactivate: [PreviousRouteRecorder] - } - ]) - ] -}) -export class LibFosRoutingModule { -} \ No newline at end of file diff --git a/src/app/fos/fos.component.ts b/src/app/fos/fos.component.ts deleted file mode 100644 index 25c0c2d..0000000 --- a/src/app/fos/fos.component.ts +++ /dev/null @@ -1,21 +0,0 @@ -import {Component} from "@angular/core"; -import {properties} from "../../environments/environment"; -import {ConnectHelper} from "../openaireLibrary/connect/connectHelper"; - -@Component({ - selector: 'community-fos', - template: ` - - ` -}) - -export class CommunityFosComponent { - communityId; - - constructor() { - } - - ngOnInit() { - this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); - } -} diff --git a/src/app/fos/fos.module.ts b/src/app/fos/fos.module.ts deleted file mode 100644 index 5d1d24e..0000000 --- a/src/app/fos/fos.module.ts +++ /dev/null @@ -1,27 +0,0 @@ -import {CommonModule} from "@angular/common"; -import {NgModule} from "@angular/core"; -import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard"; -import {LibFosRoutingModule} from "./fos-routing.module"; -import {FosRoutingModule} from "../openaireLibrary/fos/fos-routing.module"; -import {FosModule} from "../openaireLibrary/fos/fos.module"; -import {CommunityFosComponent} from "./fos.component"; - -@NgModule({ - imports: [ - CommonModule, - LibFosRoutingModule, - FosRoutingModule, - FosModule - ], - declarations: [ - CommunityFosComponent - ], - exports: [ - CommunityFosComponent - ], - providers: [ - PreviousRouteRecorder - ] -}) -export class LibFosModule { -} \ No newline at end of file