From 6243ab5b74004f54b0a1a7d44bf25da258e8a661 Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Thu, 13 Aug 2020 13:18:26 +0000 Subject: [PATCH] [Library|Trunk] Search: - search page component: add check about customFilter - entities selection: correct the custom filter fields for monitor git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59267 d315682c-612b-4755-9ff5-7f18f6832af3 --- searchPages/searchUtils/entitiesSelection.component.ts | 4 ++-- searchPages/searchUtils/newSearchPage.component.ts | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/searchPages/searchUtils/entitiesSelection.component.ts b/searchPages/searchUtils/entitiesSelection.component.ts index 8479b242..1f2ef9b1 100644 --- a/searchPages/searchUtils/entitiesSelection.component.ts +++ b/searchPages/searchUtils/entitiesSelection.component.ts @@ -152,10 +152,10 @@ export class EntitiesSelectionComponent { } } })); - } else if((this.customFilter && this.customFilter.queryFieldName == "communityId") && this.properties.adminToolsCommunity === "monitor") { + } else if((this.customFilter && this.customFilter.queryFieldName == "community") && this.properties.adminToolsCommunity === "monitor") { this.show = 1; this.disableSelect = true; - } else if(this.customFilter && (this.customFilter.queryFieldName == "relfunderid" || this.customFilter.queryFieldName == "funderid")) { + } else if(this.customFilter && (this.customFilter.queryFieldName == "relfunder" || this.customFilter.queryFieldName == "funder")) { /*this.showResearchOutcomes = true; this.showPublications = true; this.showDatasets = true; diff --git a/searchPages/searchUtils/newSearchPage.component.ts b/searchPages/searchUtils/newSearchPage.component.ts index 89d91a21..8912e888 100644 --- a/searchPages/searchUtils/newSearchPage.component.ts +++ b/searchPages/searchUtils/newSearchPage.component.ts @@ -403,10 +403,8 @@ export class NewSearchPageComponent { } } - if(this.customFilter.queryFieldName == filter.filterId && values.indexOf(StringUtils.quote(this.customFilter.valueId)) != -1){ - this.customFilter.selected = true; - }else{ - this.customFilter.selected = false; + if(this.customFilter){ + this.customFilter.selected = this.customFilter.queryFieldName == filter.filterId && values.indexOf(StringUtils.quote(this.customFilter.valueId)) != -1; } } else if (this.quickFilter && this.quickFilter.filterId == filter.filterId && this.quickFilter.selected) { for (let filterValue of filter.values) {