diff --git a/src/app/app-modules/registrar/registration/register-personal-details/register-personal-details.component.ts b/src/app/app-modules/registrar/registration/register-personal-details/register-personal-details.component.ts index 33686b9..b1d91c8 100644 --- a/src/app/app-modules/registrar/registration/register-personal-details/register-personal-details.component.ts +++ b/src/app/app-modules/registrar/registration/register-personal-details/register-personal-details.component.ts @@ -160,9 +160,7 @@ export class RegisterPersonalDetailsComponent implements OnInit { if (this.personalDataOnHealthIDSubscription) { this.personalDataOnHealthIDSubscription.unsubscribe(); } - if (this.maritalSubscription){ - this.maritalSubscription.unsubscribe(); - } + this.registrarService.clearMaritalDetails(); } setPhoneSelectionEnabledByDefault() { @@ -720,8 +718,10 @@ export class RegisterPersonalDetailsComponent implements OnInit { this.personalDetailsForm.value.ageUnit == "Years" ) { this.enableMaritalStatus = true; + this.MaritalStatus = true; } else { this.enableMaritalStatus = false; + this.MaritalStatus = false; this.clearMaritalStatus(); } } diff --git a/src/app/app-modules/registrar/shared/services/registrar.service.ts b/src/app/app-modules/registrar/shared/services/registrar.service.ts index 8cacf18..2516b21 100644 --- a/src/app/app-modules/registrar/shared/services/registrar.service.ts +++ b/src/app/app-modules/registrar/shared/services/registrar.service.ts @@ -104,7 +104,9 @@ export class RegistrarService { this.isMarriageStatus.next(maritalStatus); } - + clearMaritalDetails() { + this.isMarriageStatus.next(null); + } // GenerateOTPEnable: any; // GenerateOTP = new BehaviorSubject(this.GenerateOTPEnable);