From d8a78282b66bf0c6127c8371e8f4d955d5774bb9 Mon Sep 17 00:00:00 2001 From: George Nash Date: Thu, 30 May 2024 17:24:16 +0100 Subject: [PATCH] fixed bad months --- ui/src/app/affiliation/affiliation-update.component.html | 2 +- ui/src/app/affiliation/affiliation-update.component.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ui/src/app/affiliation/affiliation-update.component.html b/ui/src/app/affiliation/affiliation-update.component.html index 8a8873cec..9f9836406 100644 --- a/ui/src/app/affiliation/affiliation-update.component.html +++ b/ui/src/app/affiliation/affiliation-update.component.html @@ -325,7 +325,7 @@ (change)="onStartDateSelected(true)" > - +
diff --git a/ui/src/app/affiliation/affiliation-update.component.ts b/ui/src/app/affiliation/affiliation-update.component.ts index 9035cb6a9..d71106d6a 100644 --- a/ui/src/app/affiliation/affiliation-update.component.ts +++ b/ui/src/app/affiliation/affiliation-update.component.ts @@ -218,6 +218,9 @@ export class AffiliationUpdateComponent implements OnInit { } updateForm(assertion: IAffiliation) { + console.log('start month is ', assertion.startMonth) + console.log('end month is ', assertion.endMonth) + if (assertion?.id) { this.editForm.patchValue({ id: assertion.id, @@ -227,10 +230,10 @@ export class AffiliationUpdateComponent implements OnInit { roleTitle: assertion.roleTitle, url: assertion.url, startYear: assertion.startYear, - startMonth: parseInt(assertion.startMonth || '') || null, + startMonth: assertion.startMonth, startDay: assertion.startDay, endYear: assertion.endYear, - endMonth: parseInt(assertion.endMonth || '') || null, + endMonth: assertion.endMonth, endDay: assertion.endDay, orgName: assertion.orgName, orgCountry: assertion.orgCountry, @@ -250,6 +253,8 @@ export class AffiliationUpdateComponent implements OnInit { ownerId: assertion.ownerId, }) + console.log('form values set, start month is ', this.editForm.get('startMonth')!.value) + this.onStartDateSelected(false) this.onEndDateSelected(false) }