iptdevs-design-system 3.1.283 → 3.1.284

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4612,7 +4612,7 @@ class CodFormStepFiveComponent extends CodFormSteps {
4612
4612
  this.codFormStepFive.controls['health_regimen'].setValue(this.initialData.aditional_information?.health_regimen);
4613
4613
  this.codFormStepFive.controls['observation'].setValue(this.initialData.aditional_information?.observation);
4614
4614
  this.codFormStepFive.controls['code_refers'].setValue(this.initialData.cod_referral?.user_referred.code);
4615
- if (this.codFormStepFive.get('code_refers')?.value != null) {
4615
+ if (this.codFormStepFive.get('marketing_reasons')?.value == 1) {
4616
4616
  this.visbleReferred = true;
4617
4617
  // this.codFormStepFive.controls['code_refers'].setValue(this.initialData.cod_referral?.user_referred.code);
4618
4618
  this.codFormStepFive.controls['document_refers'].setValue(this.initialData.cod_referral?.user_referred.id_card);
@@ -4620,6 +4620,15 @@ class CodFormStepFiveComponent extends CodFormSteps {
4620
4620
  this.codFormStepFive.controls['phone_refers'].setValue(this.initialData.cod_referral?.user_referred.phone_number);
4621
4621
  this.codFormStepFive.controls['email_refers'].setValue(this.initialData.cod_referral?.user_referred.email);
4622
4622
  }
4623
+ else {
4624
+ this.visbleReferred = false;
4625
+ this.codFormStepFive.controls['code_refers'].setValue(null);
4626
+ this.codFormStepFive.controls['document_refers'].setValue(null);
4627
+ this.codFormStepFive.controls['name_refers'].setValue(null);
4628
+ this.codFormStepFive.controls['phone_refers'].setValue(null);
4629
+ this.codFormStepFive.controls['email_refers'].setValue(null);
4630
+ this.codFormStepFive.controls['marketing_reasons'].setValue(null);
4631
+ }
4623
4632
  this.codFormStepFive.controls['code_cod'].setValue(this.initialData.code);
4624
4633
  }
4625
4634
  setDataFromUserHistory() {