Skip to content

Commit

Permalink
initial commit (#2624)
Browse files Browse the repository at this point in the history
Co-authored-by: Alan Leung <[email protected]>
  • Loading branch information
bergomi02 and neophyte57 authored Nov 14, 2024
1 parent 23133ac commit b07bd63
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class RegulatoryComponent extends BaseEnrolmentProfilePage implements OnI
.subscribe((result: boolean) => {
if (result) {
// Enrollees can not have certifications and jobs
this.removeOboSites();
this.removeCertificationsAndOboSites();
// Remove remote access data when enrollee is no longer eligible, e.g., licence type changes
if (this.cannotRequestRemoteAccess) {
this.removeRemoteAccessData();
Expand All @@ -210,6 +210,9 @@ export class RegulatoryComponent extends BaseEnrolmentProfilePage implements OnI
}
});
} else {
if (this.formState.certifications.value.some(c => c.collegeCode !== '')) {
this.enrolmentFormStateService.patchOboSitesForm(null);
}
super.handleSubmission();
}
} else {
Expand Down Expand Up @@ -264,7 +267,7 @@ export class RegulatoryComponent extends BaseEnrolmentProfilePage implements OnI
* Remove obo sites from the enrolment as enrollees can not have
* certificate(s), as well as, OBO site(s).
*/
private removeOboSites() {
private removeCertificationsAndOboSites() {
this.removeIncompleteCertifications(true);

if (this.formState.certifications.length || (this.isDeviceProvider && this.formState.deviceProviderRoleCode.value !== 15)) {
Expand Down

0 comments on commit b07bd63

Please sign in to comment.