Connect release 25th May 2023 #2

Closed
k.triantafyllou wants to merge 7 commits from develop into master
1 changed files with 10 additions and 4 deletions
Showing only changes of commit 1f29b3200f - Show all commits

View File

@ -232,10 +232,7 @@ export class CommunityComponent {
}
}));
this.countResearchResults("publication");
this.countResearchResults("dataset");
this.countResearchResults("software");
this.countResearchResults("other");
this.getCountResearchResults();
if(this.communityId == "enermaps"){
this.countResearchResults("dataset", "enermaps::selection" );
}
@ -389,6 +386,15 @@ export class CommunityComponent {
}
this.reloadFeaturedDatasets = false;
}
private getCountResearchResults(){
this.fetchPublications.searchUtils.status = this.errorCodes.LOADING;
this._searchResearchResultsService.countResults("communityid", this.communityId).subscribe(res =>{
this.fetchPublications.searchUtils.totalResults = res['publications'];
this.fetchDatasets.searchUtils.totalResults = res['datasets'];
this.fetchSoftware.searchUtils.totalResults = res['software'];
this.fetchOrps.searchUtils.totalResults = res['other'];
})
}
private countResearchResults(resultType: string, contextId = null) {
let fetch: FetchResearchResults;