From 5a2646766aad8831f507aa64a18dce969a6a92d2 Mon Sep 17 00:00:00 2001 From: Konstantinos Triantafyllou Date: Mon, 27 Jul 2020 17:52:39 +0000 Subject: [PATCH] [Monitor | Trunk]: Fix search stakeholders base url. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor@59179 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../search-stakeholders.component.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/app/search-stakeholders/search-stakeholders.component.ts b/src/app/search-stakeholders/search-stakeholders.component.ts index b9f4f3f..b91df3b 100644 --- a/src/app/search-stakeholders/search-stakeholders.component.ts +++ b/src/app/search-stakeholders/search-stakeholders.component.ts @@ -13,6 +13,7 @@ import {UserManagementService} from "../openaireLibrary/services/user-management import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service"; import {NewSearchPageComponent} from "../openaireLibrary/searchPages/searchUtils/newSearchPage.component"; import {StakeholderInfo} from "../openaireLibrary/monitor/entities/stakeholder"; +import {properties} from "../../environments/environment"; @Component({ selector: 'search-stakeholders', @@ -59,7 +60,7 @@ export class SearchStakeholdersComponent { }; public keyword = ""; public searchLink; - properties: EnvProperties; + properties: EnvProperties = properties; @ViewChild(NewSearchPageComponent) searchPage: NewSearchPageComponent; private user: User; private userFilterLoaded: boolean = false; @@ -73,12 +74,8 @@ export class SearchStakeholdersComponent { } public ngOnInit() { - this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; - this.piwikSiteId = this.properties.piwikSiteId; - this.baseUrl = "/search/find/stakeholders"; - }); + this.piwikSiteId = this.properties.piwikSiteId; + this.baseUrl = this.properties.searchLinkToStakeholders; this.sub = this.route.queryParams.subscribe(params => { this.searchPage.resultsPerPage = 10; this.keyword = (params['fv0'] ? params['fv0'] : '');