From 8f668cd4ff51655caacdab42304c32cb2446fe64 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Wed, 18 Sep 2024 11:50:12 +0300 Subject: [PATCH] [develop | DONE | FIXED]: orcid-work.component.ts & result-preview.component.html & result-preview.component.ts: Added checks not to allow ORCID claim for results with no PIDs when not on development environment (until new version of orcid service is deployed). --- orcid/orcid-work.component.ts | 22 +++++++++++++------ .../result-preview.component.html | 6 +++-- .../result-preview.component.ts | 3 ++- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/orcid/orcid-work.component.ts b/orcid/orcid-work.component.ts index fbb996f5..77c53aa4 100644 --- a/orcid/orcid-work.component.ts +++ b/orcid/orcid-work.component.ts @@ -24,7 +24,9 @@ declare var UIkit: any; + [title]="((noPids && properties.environment != 'development') || !isLoggedIn) ? ((noPids && properties.environment != 'development') ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd"> + + @@ -32,7 +34,8 @@ declare var UIkit: any; [ngClass]="isMobile && !(pageType == 'landing') ? 'uk-margin-left' : ''" [class.uk-text-bolder]="!(isMobile && pageType == 'landing')" [class.uk-text-muted]="isDisabled"> - + Claim
+ [innerHTML]="((noPids && properties.environment != 'development') || !isLoggedIn) ? ((noPids && properties.environment != 'development') ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd"> +
+ [title]="((noPids && properties.environment != 'development') || !isLoggedIn) ? ((noPids && properties.environment != 'development') ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete"> + @@ -54,7 +59,8 @@ declare var UIkit: any; [ngClass]="isMobile && !(pageType == 'landing') ? 'uk-margin-left' : ''" [class.uk-text-bolder]="!(isMobile && pageType == 'landing')" [class.uk-text-muted]="isDisabled"> - + Remove
+ [innerHTML]="((noPids && properties.environment != 'development') || !isLoggedIn) ? ((noPids && properties.environment != 'development') ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete"> +
@@ -893,7 +900,8 @@ export class OrcidWorkComponent { } get isDisabled() { - return (this.properties.environment == 'beta' || this.showLoading || !this.isLoggedIn); + // return (this.properties.environment == 'beta' || this.showLoading || !this.isLoggedIn); + return (this.properties.environment == 'beta' || this.showLoading || !this.isLoggedIn || (!this.pids && (!this.identifiers || this.identifiers.size == 0) && properties.environment != 'development')); } get noPids() { diff --git a/utils/result-preview/result-preview.component.html b/utils/result-preview/result-preview.component.html index 717ca160..8e2caa9c 100644 --- a/utils/result-preview/result-preview.component.html +++ b/utils/result-preview/result-preview.component.html @@ -193,7 +193,8 @@ [url]="properties.domain + properties.baseLink + url + '?' + urlParam + '=' + result.id" [showTooltip]="false" [compactView]="compactView"> - + - + 0) || properties.environment == 'development'); + // this.showOrcid; } projectActions() {