[orcid-openaireId-claim | DONE | FIXED]: orcid-work.component.ts & result-preview.component.ts & result-preview.component.html: Removed checks for development environment in ORCID claim - allow also ORCID claim with OpenAIRE ID.

This commit is contained in:
Konstantina Galouni 2024-09-18 14:36:14 +03:00
parent 8f668cd4ff
commit 9fb0baa847
3 changed files with 22 additions and 22 deletions

View File

@ -24,8 +24,8 @@ declare var UIkit: any;
<span *ngIf="!putCodes || putCodes.length == 0"
[ngClass]="isMobile && pageType == 'landing' ? ' uk-width-1-1' : ''"
[attr.uk-tooltip]="isMobile? 'cls: uk-invisible' : 'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
[title]="((noPids && properties.environment != 'development') || !isLoggedIn) ? ((noPids && properties.environment != 'development') ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd">
<!-- [title]="!isLoggedIn ? tooltipNoLoggedInUser : tooltipAdd">-->
[title]="!isLoggedIn ? tooltipNoLoggedInUser : tooltipAdd">
<!-- [title]="((noPids && properties.environment != 'development') || !isLoggedIn) ? ((noPids && properties.environment != 'development') ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd">-->
<span (click)="currentAction='add'; saveWorkPreparation();"
[class.uk-disabled]="isDisabled"
@ -34,33 +34,33 @@ declare var UIkit: any;
[ngClass]="isMobile && !(pageType == 'landing') ? 'uk-margin-left' : ''"
[class.uk-text-bolder]="!(isMobile && pageType == 'landing')"
[class.uk-text-muted]="isDisabled">
<!-- <icon *ngIf="!showLoading" [class.text-orcid]="properties.environment != 'beta' && !showLoading && isLoggedIn"-->
<icon *ngIf="!showLoading" [class.text-orcid]="properties.environment != 'beta' && !showLoading && isLoggedIn && (pids || identifiers?.size > 0 || properties.environment == 'development')"
<!-- <icon *ngIf="!showLoading" [class.text-orcid]="properties.environment != 'beta' && !showLoading && isLoggedIn && (pids || identifiers?.size > 0 || properties.environment == 'development')"-->
<icon *ngIf="!showLoading" [class.text-orcid]="properties.environment != 'beta' && !showLoading && isLoggedIn"
[class.uk-text-muted]="isDisabled"
name="orcid_add" [ratio]="(isMobile && pageType == 'search') ? 0.7 : 1" visuallyHidden="add"></icon>
<span *ngIf="showLoading" class="uk-icon"><loading
[top_margin]="false" [size]="'small'"></loading></span>
<span *ngIf="!compactView" [ngClass]="(isMobile && pageType == 'landing') ? 'uk-margin-small-left' : 'uk-margin-xsmall-left'">Claim</span>
</a>
<div *ngIf="isMobile && pageType == 'landing'" class="uk-margin-xsmall-top uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall"
[innerHTML]="((noPids && properties.environment != 'development') || !isLoggedIn) ? ((noPids && properties.environment != 'development') ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd"></div>
<!-- [innerHTML]="!isLoggedIn ? tooltipNoLoggedInUser : tooltipAdd"></div>-->
<div *ngIf="isMobile && pageType == 'landing'" class="uk-margin-xsmall-top uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall"
[innerHTML]="!isLoggedIn ? tooltipNoLoggedInUser : tooltipAdd"></div>
<!-- [innerHTML]="((noPids && properties.environment != 'development') || !isLoggedIn) ? ((noPids && properties.environment != 'development') ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd"></div>-->
</span>
</span>
<span *ngIf="putCodes && putCodes.length > 0" [ngClass]="isMobile && pageType == 'landing' ? ' uk-width-1-1' : ''"
[attr.uk-tooltip]="isMobile? 'cls: uk-invisible' : 'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
[title]="((noPids && properties.environment != 'development') || !isLoggedIn) ? ((noPids && properties.environment != 'development') ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete">
<!-- [title]="!isLoggedIn ? tooltipNoLoggedInUser : tooltipDelete">-->
<span (click)="currentAction='delete'; deleteWorks();"
[title]="!isLoggedIn ? tooltipNoLoggedInUser : tooltipDelete">
<!-- [title]="((noPids && properties.environment != 'development') || !isLoggedIn) ? ((noPids && properties.environment != 'development') ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete">-->
<span (click)="currentAction='delete'; deleteWorks();"
[class.uk-disabled]="isDisabled"
[class.clickable]="!isDisabled">
<a class="uk-flex uk-flex-middle uk-button-link"
[ngClass]="isMobile && !(pageType == 'landing') ? 'uk-margin-left' : ''"
[class.uk-text-bolder]="!(isMobile && pageType == 'landing')"
[class.uk-text-muted]="isDisabled">
<!-- <icon *ngIf="!showLoading" [class.text-orcid]="!showLoading && isLoggedIn"-->
<icon *ngIf="!showLoading" [class.text-orcid]="!showLoading && isLoggedIn && (pids || identifiers?.size > 0 || properties.environment == 'development')"
<!-- <icon *ngIf="!showLoading" [class.text-orcid]="!showLoading && isLoggedIn && (pids || identifiers?.size > 0 || properties.environment == 'development')"-->
<icon *ngIf="!showLoading" [class.text-orcid]="!showLoading && isLoggedIn"
[class.uk-text-muted]="isDisabled"
name="orcid_bin" [ratio]="(isMobile && pageType == 'search') ? 0.7 : 1" visuallyHidden="delete"></icon>
<span *ngIf="showLoading" class="uk-icon"><loading
@ -68,8 +68,8 @@ declare var UIkit: any;
<span *ngIf="!compactView" [ngClass]="(isMobile && pageType == 'landing') ? 'uk-margin-small-left' : 'uk-margin-xsmall-left'">Remove</span>
</a>
<div *ngIf="isMobile && pageType == 'landing'" class="uk-margin-xsmall-top uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall"
[innerHTML]="((noPids && properties.environment != 'development') || !isLoggedIn) ? ((noPids && properties.environment != 'development') ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete"></div>
<!-- [innerHTML]="!isLoggedIn ? tooltipNoLoggedInUser : tooltipDelete"></div>-->
[innerHTML]="!isLoggedIn ? tooltipNoLoggedInUser : tooltipDelete"></div>
<!-- [innerHTML]="((noPids && properties.environment != 'development') || !isLoggedIn) ? ((noPids && properties.environment != 'development') ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete"></div>-->
</span>
</span>
</ng-container>
@ -900,8 +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 || (!this.pids && (!this.identifiers || this.identifiers.size == 0) && properties.environment != 'development'));
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() {

View File

@ -193,8 +193,8 @@
[url]="properties.domain + properties.baseLink + url + '?' + urlParam + '=' + result.id"
[showTooltip]="false" [compactView]="compactView">
<span *ngIf="orcid">
<!-- <orcid-work *ngIf="showOrcid"-->
<orcid-work *ngIf="showOrcid && ((result.identifiers && result.identifiers.size > 0) || properties.environment == 'development')"
<!-- <orcid-work *ngIf="showOrcid && ((result.identifiers && result.identifiers.size > 0) || properties.environment == 'development')"-->
<orcid-work *ngIf="showOrcid"
[resultId]="result.relcanId" [resultTitle]="result.title"
[type]="result.resultType" [pageType]="'search'"
[putCodes]="result.orcidPutCodes" [givenPutCode]="true" [identifiers]="result.identifiers"
@ -340,8 +340,8 @@
[isMobile]="isMobile"
[showTooltip]="false">
<span *ngIf="orcid">
<!-- <orcid-work *ngIf="showOrcid"-->
<orcid-work *ngIf="showOrcid && ((result.identifiers && result.identifiers.size > 0) || properties.environment == 'development')"
<!-- <orcid-work *ngIf="showOrcid && ((result.identifiers && result.identifiers.size > 0) || properties.environment == 'development')"-->
<orcid-work *ngIf="showOrcid"
[resultId]="result.relcanId" [resultTitle]="result.title"
[type]="result.resultType" [pageType]="'search'"
[putCodes]="result.orcidPutCodes" [givenPutCode]="true" [identifiers]="result.identifiers"

View File

@ -129,8 +129,8 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
this.share = true;
this.cite = true;
this.orcid = (this.properties.adminToolsPortalType == 'explore' || this.properties.adminToolsPortalType == 'community' || this.properties.adminToolsPortalType == 'aggregator' || this.properties.dashboard == 'irish') &&
this.showOrcid && ((this.result.identifiers && this.result.identifiers.size > 0) || properties.environment == 'development');
// this.showOrcid;
// this.showOrcid && ((this.result.identifiers && this.result.identifiers.size > 0) || properties.environment == 'development');
this.showOrcid;
}
projectActions() {