From 1768f79a15316b89c9a0a6578a42d1ba67904a7f Mon Sep 17 00:00:00 2001 From: Daniel Palafox Date: Wed, 25 Oct 2023 13:12:58 -0500 Subject: [PATCH] fix: Add missing private orcid id in sorting method an invert selfAsserted and validated in sort by source --- .../record-affiliations-sort.service.ts | 4 ++-- .../affiliation-stacks-groups.component.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/core/record-affiliations-sort/record-affiliations-sort.service.ts b/src/app/core/record-affiliations-sort/record-affiliations-sort.service.ts index 16b5cb13fb..1d19a5d52d 100644 --- a/src/app/core/record-affiliations-sort/record-affiliations-sort.service.ts +++ b/src/app/core/record-affiliations-sort/record-affiliations-sort.service.ts @@ -101,8 +101,8 @@ export class AffiliationsSortService { 'validated' ) x.affiliationGroup = ascending - ? [...selfAsserted, ...validated] - : [...validated, ...selfAsserted] + ? [...validated, ...selfAsserted] + : [...selfAsserted, ...validated] } } }) diff --git a/src/app/record/components/affiliation-stacks-groups/affiliation-stacks-groups.component.ts b/src/app/record/components/affiliation-stacks-groups/affiliation-stacks-groups.component.ts index 9cdf762a63..402b8a126f 100644 --- a/src/app/record/components/affiliation-stacks-groups/affiliation-stacks-groups.component.ts +++ b/src/app/record/components/affiliation-stacks-groups/affiliation-stacks-groups.component.ts @@ -162,6 +162,7 @@ export class AffiliationStacksGroupsComponent implements OnInit { sortEvent(event: SortData, type: string) { this.userRecordContext.publicRecordId = this.isPublicRecord + this.userRecordContext.privateRecordId = this.userRecord?.userInfo?.EFFECTIVE_USER_ORCID this.userRecordContext.sort = event.type this.userRecordContext.sortAsc = event.direction === 'asc' this._recordAffiliationService.changeUserRecordContext(