Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leo/update trust summary endpoint #2035

Merged
merged 2 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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