From 15d28297b0dd798e8d55605c676a60df7f78366d Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Thu, 25 Apr 2024 19:47:11 +0300 Subject: [PATCH 1/2] revert org id change --- ui/src/app/home/member-info/member-info-edit.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/src/app/home/member-info/member-info-edit.component.ts b/ui/src/app/home/member-info/member-info-edit.component.ts index 71ef9c27e..6435f72b6 100644 --- a/ui/src/app/home/member-info/member-info-edit.component.ts +++ b/ui/src/app/home/member-info/member-info-edit.component.ts @@ -88,7 +88,9 @@ export class MemberInfoEditComponent implements OnInit, OnDestroy { ) .subscribe((data) => { this.memberData = data - this.orgIdsTransformed = Object.entries(this.memberData?.orgIds || {}).map(([key, value]) => ({ key, value })) + this.orgIdsTransformed = Object.entries(this.memberData?.orgIds || {}).flatMap(([name, ids]) => + ids.map((id: string) => ({ id, name })) + ) this.validateUrl() if (data) { this.updateForm(data) From 9e341759753256194748447e6718b942c235ffcf Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Thu, 25 Apr 2024 19:49:57 +0300 Subject: [PATCH 2/2] remove unused code --- ui/src/app/home/member-info/member-info-edit.component.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ui/src/app/home/member-info/member-info-edit.component.ts b/ui/src/app/home/member-info/member-info-edit.component.ts index 7caf738a5..d0d77c10c 100644 --- a/ui/src/app/home/member-info/member-info-edit.component.ts +++ b/ui/src/app/home/member-info/member-info-edit.component.ts @@ -1,4 +1,3 @@ -import { KeyValue } from '@angular/common' import { Component, OnDestroy, OnInit } from '@angular/core' import { FormBuilder, FormControl, Validators } from '@angular/forms' import { ActivatedRoute, Router } from '@angular/router' @@ -7,11 +6,10 @@ import { switchMap, take, takeUntil } from 'rxjs/operators' import { AccountService } from 'src/app/account' import { IAccount } from 'src/app/account/model/account.model' import { EMAIL_REGEXP, URL_REGEXP, ORCID_BASE_URL } from 'src/app/app.constants' -import { ISFAddress, SFAddress } from 'src/app/member/model/salesforce-address.model' +import { ISFAddress } from 'src/app/member/model/salesforce-address.model' import { ISFCountry } from 'src/app/member/model/salesforce-country.model' import { ISFState } from 'src/app/member/model/salesforce-country.model copy' -import { SFMemberContact } from 'src/app/member/model/salesforce-member-contact.model' -import { ISFMemberData, SFConsortiumMemberData, SFMemberData } from 'src/app/member/model/salesforce-member-data.model' +import { ISFMemberData } from 'src/app/member/model/salesforce-member-data.model' import { ISFMemberUpdate, SFMemberUpdate } from 'src/app/member/model/salesforce-member-update.model' import { MemberService } from 'src/app/member/service/member.service' @@ -27,7 +25,6 @@ export class MemberInfoEditComponent implements OnInit, OnDestroy { account: IAccount | undefined | null memberData: ISFMemberData | undefined | null objectKeys = Object.keys - objectValues = Object.values orgIdsTransformed: { id: string; name: string }[] = [] ORCID_BASE_URL = ORCID_BASE_URL