From c1794ce89802438cebb647787848cb847d6c44dd Mon Sep 17 00:00:00 2001 From: abradat Date: Wed, 5 Jun 2024 17:09:05 -0700 Subject: [PATCH 1/2] Fix Corporate Summary file issue on Parcel Owners table in NOIs/Apps Step 1 --- .../owner-dialogs/owner-dialog/owner-dialog.component.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/portal-frontend/src/app/shared/owner-dialogs/owner-dialog/owner-dialog.component.ts b/portal-frontend/src/app/shared/owner-dialogs/owner-dialog/owner-dialog.component.ts index 41c4069f5..524a507ba 100644 --- a/portal-frontend/src/app/shared/owner-dialogs/owner-dialog/owner-dialog.component.ts +++ b/portal-frontend/src/app/shared/owner-dialogs/owner-dialog/owner-dialog.component.ts @@ -97,9 +97,7 @@ export class OwnerDialogComponent { this.corporateSummary.setValidators([Validators.required]); } else { this.organizationName.setValidators([]); - this.corporateSummary.setValidators([]); - this.corporateSummary.reset(); - this.files = []; + this.corporateSummary.setValidators([]); } this.corporateSummary.updateValueAndValidity(); this.organizationName.updateValueAndValidity(); @@ -113,6 +111,11 @@ export class OwnerDialogComponent { } this.isLoading = true; + + if (this.type.value === OWNER_TYPE.INDIVIDUAL) { + this.removeCorporateSummary(); + } + let documentUuid; if (this.pendingFile) { documentUuid = await this.uploadPendingFile(this.pendingFile); From a0bef289ed8e8b411f2df0121b060e7ec9f35c95 Mon Sep 17 00:00:00 2001 From: abradat Date: Wed, 5 Jun 2024 17:30:21 -0700 Subject: [PATCH 2/2] Fix individual type corporate summary file issue after edit --- .../owner-dialogs/owner-dialog/owner-dialog.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/portal-frontend/src/app/shared/owner-dialogs/owner-dialog/owner-dialog.component.ts b/portal-frontend/src/app/shared/owner-dialogs/owner-dialog/owner-dialog.component.ts index 524a507ba..5616bbe50 100644 --- a/portal-frontend/src/app/shared/owner-dialogs/owner-dialog/owner-dialog.component.ts +++ b/portal-frontend/src/app/shared/owner-dialogs/owner-dialog/owner-dialog.component.ts @@ -173,6 +173,10 @@ export class OwnerDialogComponent { if (this.form.valid) { this.isLoading = true; + if (this.type.value === OWNER_TYPE.INDIVIDUAL) { + this.removeCorporateSummary(); + } + let document; if (this.pendingFile) { document = await this.uploadPendingFile(this.pendingFile);