[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
This commit is contained in:
Konstantinos Triantafyllou 2020-07-27 17:52:39 +00:00
parent 6c06aa20ed
commit 5a2646766a
1 changed files with 4 additions and 7 deletions

View File

@ -13,6 +13,7 @@ import {UserManagementService} from "../openaireLibrary/services/user-management
import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service"; import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service";
import {NewSearchPageComponent} from "../openaireLibrary/searchPages/searchUtils/newSearchPage.component"; import {NewSearchPageComponent} from "../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
import {StakeholderInfo} from "../openaireLibrary/monitor/entities/stakeholder"; import {StakeholderInfo} from "../openaireLibrary/monitor/entities/stakeholder";
import {properties} from "../../environments/environment";
@Component({ @Component({
selector: 'search-stakeholders', selector: 'search-stakeholders',
@ -59,7 +60,7 @@ export class SearchStakeholdersComponent {
}; };
public keyword = ""; public keyword = "";
public searchLink; public searchLink;
properties: EnvProperties; properties: EnvProperties = properties;
@ViewChild(NewSearchPageComponent) searchPage: NewSearchPageComponent; @ViewChild(NewSearchPageComponent) searchPage: NewSearchPageComponent;
private user: User; private user: User;
private userFilterLoaded: boolean = false; private userFilterLoaded: boolean = false;
@ -73,12 +74,8 @@ export class SearchStakeholdersComponent {
} }
public ngOnInit() { public ngOnInit() {
this.route.data this.piwikSiteId = this.properties.piwikSiteId;
.subscribe((data: { envSpecific: EnvProperties }) => { this.baseUrl = this.properties.searchLinkToStakeholders;
this.properties = data.envSpecific;
this.piwikSiteId = this.properties.piwikSiteId;
this.baseUrl = "/search/find/stakeholders";
});
this.sub = this.route.queryParams.subscribe(params => { this.sub = this.route.queryParams.subscribe(params => {
this.searchPage.resultsPerPage = 10; this.searchPage.resultsPerPage = 10;
this.keyword = (params['fv0'] ? params['fv0'] : ''); this.keyword = (params['fv0'] ? params['fv0'] : '');