[develop | WIP | UPDATED] Search author: allow keyword to be orcid url, show properly single author results

This commit is contained in:
argirok 2023-11-13 11:19:57 +02:00
parent bd46630319
commit 02f42e773a
1 changed files with 4 additions and 2 deletions

View File

@ -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){