Skip to content

Commit

Permalink
Merge pull request #2035 from ORCID/leo/update-trust-summary-endpoint
Browse files Browse the repository at this point in the history
Leo/update trust summary endpoint
  • Loading branch information
leomendoza123 authored Aug 8, 2023
2 parents be0b021 + 8f58caa commit 3bd5833
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
<mat-icon
[attr.aria-label]="validatedSourceAriaLabel"
class="verified"
*ngIf="activity.validatedOrSelfAsserted"
*ngIf="activity.validated"
>check_circle</mat-icon
>
<mat-icon
class="margin-compensation"
[attr.aria-label]="selftAssertedSource"
*ngIf="!activity.validatedOrSelfAsserted"
*ngIf="!activity.validated"
><img src="./assets/vectors/profile-not-verified.svg" />
</mat-icon>
<h3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@
class="orc-font-body-small cursor-pointer header-name"
href="{{ trustedSummary.orcid }}"
>
<h1 class="orc-font-body-large">{{ trustedSummary.name }}</h1>
<h1 class="orc-font-body-large">
<ng-container
*ngIf="!trustedSummary?.name"
i18n="@@summary.nameIsPrivateOrLimited"
>Name is private or limited</ng-container
>
<ng-container *ngIf="trustedSummary?.name">{{
trustedSummary.name
}}</ng-container>
</h1>

<div class="label-with-icon">
<label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy {
})
}
if (
this.trustedSummary.reviews &&
this.trustedSummary.peerReviewsTotal &&
this.trustedSummary.peerReviewPublicationGrants
) {
this.peerReviews.push({
Expand All @@ -122,9 +122,9 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy {
this.trustedSummary.peerReviewPublicationGrants > 1
? this.labelReviesFor
: this.labelReviewFor,
countB: this.trustedSummary.reviews,
countB: this.trustedSummary.peerReviewsTotal,
stringB:
this.trustedSummary.reviews > 1
this.trustedSummary.peerReviewsTotal > 1
? this.labelpublicationgrants
: this.labelpublicationgrant,
})
Expand Down
4 changes: 2 additions & 2 deletions src/app/types/trust-summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface TrustedSummary {
lastModified: string
validatedWorks: number
selfAssertedWorks: number
reviews: number
peerReviewsTotal: number
peerReviewPublicationGrants: number
validatedFunds: number
selfAssertedFunds: number
Expand All @@ -24,5 +24,5 @@ export interface ActivitySummary {
role?: string
title: any
type: string
validatedOrSelfAsserted: boolean
validated: boolean
}
1 change: 1 addition & 0 deletions src/locale/properties/summary/summary.en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ summary.reviewsFor=Reviews for
summary.reviewFor=Review for
summary.publicationgrantes=publication/grants
summary.publicationgrant=publication/grant
summary.nameIsPrivateOrLimited=Name is private or limited

0 comments on commit 3bd5833

Please sign in to comment.