Skip to content

Commit

Permalink
Merge pull request #1168 from ORCID/remove-dummy-member-data
Browse files Browse the repository at this point in the history
Remove dummy member data
  • Loading branch information
bobcaprice authored Apr 25, 2024
2 parents 44c04fa + 9e34175 commit 2fe327f
Showing 1 changed file with 2 additions and 31 deletions.
33 changes: 2 additions & 31 deletions ui/src/app/home/member-info/member-info-edit.component.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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'

Expand All @@ -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

Expand Down Expand Up @@ -90,35 +87,9 @@ export class MemberInfoEditComponent implements OnInit, OnDestroy {
)
.subscribe((data) => {
this.memberData = data
this.memberData = new SFMemberData(
'123',
true,
'123',
true,
'rara',
'roro',
'hehe.com',
'Lithuania',
'ruru',
'riri',
'rere',
'[email protected]',
'2022',
'2050',
'',
[new SFConsortiumMemberData('he', 'ho'), new SFConsortiumMemberData('hee', 'hoo')],
[
new SFMemberContact('124', true, ['goob'], 'name', 'phone', 'email'),
new SFMemberContact('124', false, ['goob'], 'name', 'phone', 'email'),
],
{ ROR: ['123', '456'], GRID: ['1213', '1415'] },
new SFAddress('street', 'United Kingdom', 'state', 'Lithuania', 'code', 'postalCode', 'city')
)

this.orgIdsTransformed = Object.entries(this.memberData?.orgIds || {}).flatMap(([name, ids]) =>
ids.map((id: string) => ({ id, name }))
)

this.validateUrl()
if (data) {
this.updateForm(data)
Expand Down

0 comments on commit 2fe327f

Please sign in to comment.