From c7dc018e943522ce3efcecf8a45f691db56fa6bd Mon Sep 17 00:00:00 2001 From: "Burdhi. Shivani" Date: Fri, 22 Mar 2024 18:36:46 +0530 Subject: [PATCH] marital status issue --- .../register-personal-details.component.ts | 6 +++--- .../registrar/shared/services/registrar.service.ts | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) 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);