Skip to content

Commit

Permalink
Merge pull request #1744 from bcgov/hotfix/ALCS-2022
Browse files Browse the repository at this point in the history
Fix Corporate Summary file issue on Parcel Owners table in NOIs/Apps
  • Loading branch information
Abradat committed Jun 6, 2024
2 parents be9f32c + a0bef28 commit 4c3a98d
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down Expand Up @@ -170,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);
Expand Down

0 comments on commit 4c3a98d

Please sign in to comment.