Skip to content

Commit

Permalink
Merge pull request #825 from bcgov/feature/ALCS-928-3
Browse files Browse the repository at this point in the history
LFNG As applicant bug fixes
  • Loading branch information
dhaselhan authored Jul 27, 2023
2 parents 79ce256 + ba01273 commit 2a8df3f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ <h3>3. Primary Contact</h3>
</div>
<div class="grid-double">
{{ primaryContact?.organizationName }}
<app-no-data *ngIf="!primaryContact?.organizationName"></app-no-data>
<app-no-data
[showRequired]="showErrors && primaryContact?.type?.code === APPLICATION_OWNER.GOVERNMENT"
*ngIf="!primaryContact?.organizationName"
></app-no-data>
</div>
<div class="subheading2 grid-1">Phone</div>
<div class="grid-double">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ <h6>Authorization Letters (if applicable)</h6>
(uploadFiles)="attachFile($event, DOCUMENT_TYPE.AUTHORIZATION_LETTER)"
(deleteFile)="onDeleteFile($event)"
(openFile)="openFile($event)"
[showErrors]="showErrors || selectedLocalGovernment"
[showErrors]="showErrors"
[isRequired]="needsAuthorizationLetter"
></app-file-drag-drop>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down Expand Up @@ -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 {
Expand All @@ -246,6 +242,7 @@ export class PrimaryContactComponent extends FilesStepComponent implements OnIni
this.form.markAllAsTouched();
}
this.isDirty = false;
this.calculateLetterRequired();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 2a8df3f

Please sign in to comment.