From 2fc71dad0cb2da24afb67818e8421b91782bb1ee Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Tue, 2 Jun 2020 08:40:56 +0000 Subject: [PATCH] [Library|Trunk] Impact factors: add a check for identifiers add showImpactFactors input in search-tab git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58820 d315682c-612b-4755-9ff5-7f18f6832af3 --- searchPages/searchUtils/searchResult.component.ts | 12 ++++++++---- utils/tabs/contents/search-tab.component.ts | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/searchPages/searchUtils/searchResult.component.ts b/searchPages/searchUtils/searchResult.component.ts index 18ef6305..ad24d244 100644 --- a/searchPages/searchUtils/searchResult.component.ts +++ b/searchPages/searchUtils/searchResult.component.ts @@ -43,11 +43,15 @@ export class SearchResultComponent implements OnInit, OnChanges { impact[result.doi]=result; }); this.previewResults.forEach(function (result) { - result.identifiers.get("doi").forEach(function (doi) { - if(impact[doi]) { - result.DOI = doi; + if(result.identifiers) { + result.identifiers.get("doi").forEach(function (doi) { + if (impact[doi]) { + result.DOI = doi; + } + + }) } - })}); + }); for (let i = 0; i < this.previewResults.length; i++) { if (this.previewResults[i].DOI) { this.previewResults[i].pop_inf = new Array(); diff --git a/utils/tabs/contents/search-tab.component.ts b/utils/tabs/contents/search-tab.component.ts index 3c75a878..5669114b 100644 --- a/utils/tabs/contents/search-tab.component.ts +++ b/utils/tabs/contents/search-tab.component.ts @@ -24,7 +24,7 @@ import {ErrorCodes} from "../../properties/errorCodes"; + [type]="resultType" [showImpactFactors]="showImpactFactors" >
@@ -45,6 +45,7 @@ export class SearchTabComponent { @Input() public searchNumber: number = 5; @Input() public searchLinkToAdvancedPage: string; @Input() properties: EnvProperties; + @Input() showImpactFactors; public errorCodes: ErrorCodes = new ErrorCodes(); public getEntityName(entityType: string, plural: boolean, full: boolean): string {