iptdevs-design-system 3.1.951 → 3.1.952

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.
@@ -4797,7 +4797,6 @@ class CodFormStepTwoComponent extends CodFormSteps {
4797
4797
  this.hasErrors = false;
4798
4798
  this.idTypes = [];
4799
4799
  this.genders = [];
4800
- // Controls del formulario
4801
4800
  this.controls = new CodFormControls().controls[1];
4802
4801
  }
4803
4802
  ngOnChanges(changes) {
@@ -4835,9 +4834,6 @@ class CodFormStepTwoComponent extends CodFormSteps {
4835
4834
  this.codFormStepTwo.controls['student_email'].setValue(this.initialData.email);
4836
4835
  this.codFormStepTwo.controls['password'].setValue(this.initialData.id_card);
4837
4836
  this.codFormStepTwo.controls['re_password'].setValue(this.initialData.id_card);
4838
- this.codFormStepTwo.patchValue({
4839
- student_id_card: this.initialData.student.id_card
4840
- });
4841
4837
  this.updateIdTypes(this.initialData?.id_card || '');
4842
4838
  }
4843
4839
  setDataFromPreviusCod() {
@@ -4862,16 +4858,13 @@ class CodFormStepTwoComponent extends CodFormSteps {
4862
4858
  this.codFormStepTwo.controls['student_email'].setValue(this.initialData.student.email);
4863
4859
  this.codFormStepTwo.controls['password'].setValue(this.initialData.student.id_card);
4864
4860
  this.codFormStepTwo.controls['re_password'].setValue(this.initialData.student.id_card);
4865
- this.codFormStepTwo.patchValue({
4866
- student_id_card: this.initialData.student.id_card
4867
- });
4868
4861
  this.updateIdTypes(this.initialData?.student?.id_card || '');
4869
4862
  }
4870
4863
  cleanComponent() {
4871
4864
  this.resetLocalStorage(this.controls);
4872
4865
  this.codFormStepTwo.reset();
4873
- this.idTypes = [...(this.parametersAll?.TypeIdCardByCountryCol || [])]; // Restaurar idTypes
4874
- console.log('idTypes after clean:', this.idTypes); // Depuración
4866
+ this.idTypes = [...(this.parametersAll?.TypeIdCardByCountryCol || [])];
4867
+ console.log('idTypes after clean:', this.idTypes);
4875
4868
  }
4876
4869
  validateErrors() {
4877
4870
  this.codFormStepTwo.valueChanges.subscribe(changes => {
@@ -4930,7 +4923,6 @@ class CodFormStepTwoComponent extends CodFormSteps {
4930
4923
  this.codFormStepTwo.patchValue({
4931
4924
  birthdate: currentDate
4932
4925
  });
4933
- // Calcular edad y setear valor
4934
4926
  this.codFormStepTwo.controls['birthdate'].valueChanges.subscribe({
4935
4927
  next: (change) => {
4936
4928
  let today = new Date();
@@ -4954,13 +4946,12 @@ class CodFormStepTwoComponent extends CodFormSteps {
4954
4946
  getParameters() {
4955
4947
  if (this.parametersAll?.TypeIdCardByCountryCol) {
4956
4948
  this.idTypes = [...this.parametersAll.TypeIdCardByCountryCol];
4957
- console.log('Initial idTypes:', this.idTypes); // Depuración
4949
+ console.log('Initial idTypes:', this.idTypes);
4958
4950
  }
4959
4951
  else {
4960
4952
  this.idTypes = [];
4961
- console.log('TypeIdCardByCountryCol is undefined'); // Depuración
4953
+ console.log('TypeIdCardByCountryCol is undefined');
4962
4954
  }
4963
- console.log('Initial idTypes:', this.idTypes); // Depuración
4964
4955
  this.indicatives = this.parametersAll?.indicatives;
4965
4956
  this.countries = this.parametersAll?.country;
4966
4957
  this.stratums = this.parametersAll?.stratum;
@@ -5083,28 +5074,29 @@ class CodFormStepTwoComponent extends CodFormSteps {
5083
5074
  }
5084
5075
  }
5085
5076
  trackStudentIdCardChanges() {
5086
- console.log('trackStudentIdCardChanges called'); // Depuración
5087
- const control = this.codFormStepTwo.get('student_id_card');
5088
- control?.valueChanges.subscribe((value) => {
5089
- console.log('student_id_card value:', value); // Depuración
5090
- this.updateIdTypes(value);
5091
- });
5077
+ console.log('trackStudentIdCardChanges called');
5078
+ const controlOne = this.codFormStepTwo.get('student_id_card');
5079
+ console.log('control 1', controlOne);
5080
+ this.updateIdTypes(controlOne?.value || '');
5081
+ const controlTwo = localStorage.getItem('COD FORM - step2(student_id_card)');
5082
+ console.log('control 2', controlTwo);
5083
+ this.updateIdTypes(controlTwo || '');
5092
5084
  }
5093
5085
  updateIdTypes(value) {
5094
- console.log('updateIdTypes called with value:', value); // Depuración
5086
+ console.log('updateIdTypes called with value:', value);
5095
5087
  if (this.parametersAll?.TypeIdCardByCountryCol) {
5096
5088
  if (value && /[a-zA-Z]/.test(value)) {
5097
- console.log('Contains letters, filtering idTypes'); // Depuración
5089
+ console.log('Contains letters, filtering idTypes');
5098
5090
  this.idTypes = this.parametersAll.TypeIdCardByCountryCol.filter((_, index) => ![0, 1, 2, 7].includes(index));
5099
5091
  }
5100
5092
  else {
5101
- console.log('No letters, restoring idTypes'); // Depuración
5093
+ console.log('No letters, restoring idTypes');
5102
5094
  this.idTypes = [...this.parametersAll.TypeIdCardByCountryCol];
5103
5095
  }
5104
- console.log('Current idTypes:', this.idTypes); // Depuración
5096
+ console.log('Current idTypes:', this.idTypes);
5105
5097
  }
5106
5098
  else {
5107
- console.log('TypeIdCardByCountryCol is undefined'); // Depuración
5099
+ console.log('TypeIdCardByCountryCol is undefined');
5108
5100
  this.idTypes = [];
5109
5101
  }
5110
5102
  }