[Library]: Fixes in ORCID put-codes query & query dynamic menu only in development environment.

1. dataProvider.component.ts: Comment log for dataProviderInfo.fundedContent.
2. searchResult.component.ts: In initialize() method, before calling orcidService.getPutCodes, added more checks for type (result, publication, dataset, software, other).
3. navigationBar.component.ts: Call _helpContentService.getMenuItems only in development environment.
This commit is contained in:
Konstantina Galouni 2022-02-16 11:40:05 +02:00
parent dccf62d445
commit 304276f3bc
3 changed files with 5 additions and 3 deletions

View File

@ -290,7 +290,7 @@ export class DataProviderComponent {
this.subscriptions.push(this._searchResearchResultsService.countCollectedResultsWithFundingInfo(this.datasourceId).subscribe( this.subscriptions.push(this._searchResearchResultsService.countCollectedResultsWithFundingInfo(this.datasourceId).subscribe(
fundedContent => { fundedContent => {
this.dataProviderInfo.fundedContent = fundedContent; this.dataProviderInfo.fundedContent = fundedContent;
console.log(this.dataProviderInfo.fundedContent); // console.log(this.dataProviderInfo.fundedContent);
}, },
err => { err => {
this.handleError("Error getting results with funding information for datasource id: " + this.datasourceId, err); this.handleError("Error getting results with funding information for datasource id: " + this.datasourceId, err);

View File

@ -42,7 +42,9 @@ export class SearchResultComponent implements OnInit, OnChanges {
} }
if((properties.adminToolsPortalType == "explore" || properties.adminToolsPortalType == "community") if((properties.adminToolsPortalType == "explore" || properties.adminToolsPortalType == "community")
&& Session.isLoggedIn() && this.results && this.results.length > 0) { && Session.isLoggedIn() && this.results && this.results.length > 0
&& (this.type == "result" || this.type == "publication" || this.type == "dataset" || this.type == "software" || this.type == "other")
) {
this.orcidService.getPutCodes(this.previewResults.map( this.orcidService.getPutCodes(this.previewResults.map(
previewResult => { previewResult => {
if(previewResult.identifiers) { if(previewResult.identifiers) {

View File

@ -103,7 +103,7 @@ export class NavigationBarComponent implements OnInit, OnDestroy {
this.handleError('Error getting community information (e.g. pages,entities) for community with id: ' + this.communityId, error); this.handleError('Error getting community information (e.g. pages,entities) for community with id: ' + this.communityId, error);
})); }));
} }
if(this.portal != 'connect' && this.portal != 'connect-admin' && this.properties.adminToolsPortalType == 'community') { if(this.properties.environment == "development" && this.portal != 'connect' && this.portal != 'connect-admin' && this.properties.adminToolsPortalType == 'community') {
this.subs.push( this.subs.push(
this._helpContentService.getMenuItems(this.portal).subscribe( this._helpContentService.getMenuItems(this.portal).subscribe(
data => { data => {