From 02f42e773ac2ac98aa9af73933c0167798ed2f75 Mon Sep 17 00:00:00 2001 From: argirok Date: Mon, 13 Nov 2023 11:19:57 +0200 Subject: [PATCH] [develop | WIP | UPDATED] Search author: allow keyword to be orcid url, show properly single author results --- .../search-researcher/search-researcher.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/researcher/search-researcher/search-researcher.component.ts b/src/app/researcher/search-researcher/search-researcher.component.ts index 69b2139..578a0ab 100644 --- a/src/app/researcher/search-researcher/search-researcher.component.ts +++ b/src/app/researcher/search-researcher/search-researcher.component.ts @@ -69,7 +69,7 @@ export class SearchResearcherComponent extends BaseComponent implements OnInit this.page = 1; this.authorsRendered = 0; if(Identifier.isValidORCID(this.keyword)){ - this.getOrcidAuthor(this.keyword, true); + this.getOrcidAuthor(this.keyword.indexOf(properties.orcidURL)!=-1?this.keyword.split(properties.orcidURL)[1]:this.keyword, true, -1); }else{ this.getOrcidAuthors(this.keyword) } @@ -84,11 +84,11 @@ export class SearchResearcherComponent extends BaseComponent implements OnInit data => { if (data != null) { this.orcidStatus = this.errorCodes.LOADING; + this.authors.push(data); if(count ==-1) { this.getOpenaireResultsFor(0,1); }else{ data.resultsCount = count; - this.authors.push(data); this.authorsToShow.push(data); } }else{ @@ -153,9 +153,11 @@ private getOpenaireResultsFor(start, end){ } })); }else{ + this.orcidStatus = this.errorCodes.DONE; if(this.authorsToShow.length == 0){ this.orcidStatus = this.errorCodes.NONE; } + } } private getOpenaireResultsObs(author){