From ba01273bb2b612cc7c87d4720db0d29104b5384d Mon Sep 17 00:00:00 2001 From: Daniel Haselhan Date: Wed, 26 Jul 2023 17:24:35 -0700 Subject: [PATCH] LFNG As applicant bug fixes * Check if submission is to own users government to control copying * Add error to step 8 when missing Department * Fix logic in primary contact to show errors at the right time --- .../application-details/application-details.component.html | 5 ++++- .../primary-contact/primary-contact.component.html | 2 +- .../primary-contact/primary-contact.component.ts | 7 ++----- .../application-submission-review.controller.ts | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/portal-frontend/src/app/features/application-details/application-details.component.html b/portal-frontend/src/app/features/application-details/application-details.component.html index 65529b59be..fc85a50f39 100644 --- a/portal-frontend/src/app/features/application-details/application-details.component.html +++ b/portal-frontend/src/app/features/application-details/application-details.component.html @@ -48,7 +48,10 @@

3. Primary Contact

{{ primaryContact?.organizationName }} - +
Phone
diff --git a/portal-frontend/src/app/features/edit-submission/primary-contact/primary-contact.component.html b/portal-frontend/src/app/features/edit-submission/primary-contact/primary-contact.component.html index dd83477975..8a32cf1e4b 100644 --- a/portal-frontend/src/app/features/edit-submission/primary-contact/primary-contact.component.html +++ b/portal-frontend/src/app/features/edit-submission/primary-contact/primary-contact.component.html @@ -160,7 +160,7 @@
Authorization Letters (if applicable)
(uploadFiles)="attachFile($event, DOCUMENT_TYPE.AUTHORIZATION_LETTER)" (deleteFile)="onDeleteFile($event)" (openFile)="openFile($event)" - [showErrors]="showErrors || selectedLocalGovernment" + [showErrors]="showErrors" [isRequired]="needsAuthorizationLetter" >
diff --git a/portal-frontend/src/app/features/edit-submission/primary-contact/primary-contact.component.ts b/portal-frontend/src/app/features/edit-submission/primary-contact/primary-contact.component.ts index 56f837e845..bd05e3c1a7 100644 --- a/portal-frontend/src/app/features/edit-submission/primary-contact/primary-contact.component.ts +++ b/portal-frontend/src/app/features/edit-submission/primary-contact/primary-contact.component.ts @@ -143,9 +143,7 @@ export class PrimaryContactComponent extends FilesStepComponent implements OnIni } private calculateLetterRequired() { - const isSelfApplicant = - this.owners[0].type.code === APPLICATION_OWNER.INDIVIDUAL || - this.owners[0].type.code === APPLICATION_OWNER.GOVERNMENT; + const isSelfApplicant = this.owners[0].type.code === APPLICATION_OWNER.INDIVIDUAL || this.selectedLocalGovernment; this.needsAuthorizationLetter = this.selectedThirdPartyAgent || @@ -226,8 +224,6 @@ export class PrimaryContactComponent extends FilesStepComponent implements OnIni phoneNumber: selectedOwner.phoneNumber, email: selectedOwner.email, }); - - this.calculateLetterRequired(); } else if (selectedOwner) { this.onSelectOwner(selectedOwner.uuid); } else { @@ -246,6 +242,7 @@ export class PrimaryContactComponent extends FilesStepComponent implements OnIni this.form.markAllAsTouched(); } this.isDirty = false; + this.calculateLetterRequired(); } } diff --git a/services/apps/alcs/src/portal/application-submission-review/application-submission-review.controller.ts b/services/apps/alcs/src/portal/application-submission-review/application-submission-review.controller.ts index 3448114556..16fa1c1ae8 100644 --- a/services/apps/alcs/src/portal/application-submission-review/application-submission-review.controller.ts +++ b/services/apps/alcs/src/portal/application-submission-review/application-submission-review.controller.ts @@ -205,8 +205,8 @@ export class ApplicationSubmissionReviewController { } if ( - primaryContact && - primaryContact.type.code === APPLICATION_OWNER.GOVERNMENT + userLocalGovernment.uuid === applicationSubmission.localGovernmentUuid && + primaryContact ) { //Copy contact details over to government form await this.applicationSubmissionReviewService.update(