From 8508e9327cbea697fc94f418903d7c7c1a88b5f9 Mon Sep 17 00:00:00 2001 From: Tristan Slater <1631008+trslater@users.noreply.github.com> Date: Tue, 11 Jun 2024 10:29:19 -0700 Subject: [PATCH] Reorder condition for initial contact selection By putting government user check first, it only checks the parcel owners length if not a government user. --- .../primary-contact/primary-contact.component.ts | 4 ++-- .../primary-contact/primary-contact.component.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/portal-frontend/src/app/features/applications/edit-submission/primary-contact/primary-contact.component.ts b/portal-frontend/src/app/features/applications/edit-submission/primary-contact/primary-contact.component.ts index 99a10a18b..b409cb500 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/primary-contact/primary-contact.component.ts +++ b/portal-frontend/src/app/features/applications/edit-submission/primary-contact/primary-contact.component.ts @@ -240,10 +240,10 @@ export class PrimaryContactComponent extends FilesStepComponent implements OnIni // onSelectOwner only not called on first load of page if (selectedOwner) { this.onSelectOwner(selectedOwner.uuid); - } else if (parcelOwners.length === 1) { - this.onSelectOwner(parcelOwners[0].uuid); } else if (this.isGovernmentUser) { this.onSelectGovernment(); + } else if (parcelOwners.length === 1) { + this.onSelectOwner(parcelOwners[0].uuid); } if (this.isGovernmentUser && this.selectedLocalGovernment) { diff --git a/portal-frontend/src/app/features/notice-of-intents/edit-submission/primary-contact/primary-contact.component.ts b/portal-frontend/src/app/features/notice-of-intents/edit-submission/primary-contact/primary-contact.component.ts index 152ff63c2..a7a1a72ea 100644 --- a/portal-frontend/src/app/features/notice-of-intents/edit-submission/primary-contact/primary-contact.component.ts +++ b/portal-frontend/src/app/features/notice-of-intents/edit-submission/primary-contact/primary-contact.component.ts @@ -242,10 +242,10 @@ export class PrimaryContactComponent extends FilesStepComponent implements OnIni // onSelectOwner only not called on first load of page if (selectedOwner) { this.onSelectOwner(selectedOwner.uuid); - } else if (parcelOwners.length === 1) { - this.onSelectOwner(parcelOwners[0].uuid); } else if (this.isGovernmentUser) { this.onSelectGovernment(); + } else if (parcelOwners.length === 1) { + this.onSelectOwner(parcelOwners[0].uuid); } if (this.selectedLocalGovernment) {