iptdevs-design-system 3.1.951 → 3.1.953
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.
- package/esm2020/lib/cod/steps/cod-form-step-two/cod-form-step-two.component.mjs +5 -26
- package/fesm2015/iptdevs-design-system.mjs +4 -25
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +4 -25
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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,12 @@ 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 || [])];
|
|
4874
|
-
console.log('idTypes after clean:', this.idTypes); // Depuración
|
|
4866
|
+
this.idTypes = [...(this.parametersAll?.TypeIdCardByCountryCol || [])];
|
|
4875
4867
|
}
|
|
4876
4868
|
validateErrors() {
|
|
4877
4869
|
this.codFormStepTwo.valueChanges.subscribe(changes => {
|
|
@@ -4930,7 +4922,6 @@ class CodFormStepTwoComponent extends CodFormSteps {
|
|
|
4930
4922
|
this.codFormStepTwo.patchValue({
|
|
4931
4923
|
birthdate: currentDate
|
|
4932
4924
|
});
|
|
4933
|
-
// Calcular edad y setear valor
|
|
4934
4925
|
this.codFormStepTwo.controls['birthdate'].valueChanges.subscribe({
|
|
4935
4926
|
next: (change) => {
|
|
4936
4927
|
let today = new Date();
|
|
@@ -4954,13 +4945,10 @@ class CodFormStepTwoComponent extends CodFormSteps {
|
|
|
4954
4945
|
getParameters() {
|
|
4955
4946
|
if (this.parametersAll?.TypeIdCardByCountryCol) {
|
|
4956
4947
|
this.idTypes = [...this.parametersAll.TypeIdCardByCountryCol];
|
|
4957
|
-
console.log('Initial idTypes:', this.idTypes); // Depuración
|
|
4958
4948
|
}
|
|
4959
4949
|
else {
|
|
4960
4950
|
this.idTypes = [];
|
|
4961
|
-
console.log('TypeIdCardByCountryCol is undefined'); // Depuración
|
|
4962
4951
|
}
|
|
4963
|
-
console.log('Initial idTypes:', this.idTypes); // Depuración
|
|
4964
4952
|
this.indicatives = this.parametersAll?.indicatives;
|
|
4965
4953
|
this.countries = this.parametersAll?.country;
|
|
4966
4954
|
this.stratums = this.parametersAll?.stratum;
|
|
@@ -5083,28 +5071,19 @@ class CodFormStepTwoComponent extends CodFormSteps {
|
|
|
5083
5071
|
}
|
|
5084
5072
|
}
|
|
5085
5073
|
trackStudentIdCardChanges() {
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
control?.valueChanges.subscribe((value) => {
|
|
5089
|
-
console.log('student_id_card value:', value); // Depuración
|
|
5090
|
-
this.updateIdTypes(value);
|
|
5091
|
-
});
|
|
5074
|
+
const controlOne = this.codFormStepTwo.get('student_id_card');
|
|
5075
|
+
this.updateIdTypes(controlOne?.value || '');
|
|
5092
5076
|
}
|
|
5093
5077
|
updateIdTypes(value) {
|
|
5094
|
-
console.log('updateIdTypes called with value:', value); // Depuración
|
|
5095
5078
|
if (this.parametersAll?.TypeIdCardByCountryCol) {
|
|
5096
5079
|
if (value && /[a-zA-Z]/.test(value)) {
|
|
5097
|
-
|
|
5098
|
-
this.idTypes = this.parametersAll.TypeIdCardByCountryCol.filter((_, index) => ![0, 1, 2, 7].includes(index));
|
|
5080
|
+
this.idTypes = this.parametersAll.TypeIdCardByCountryCol.filter((_, index) => ![0, 1, 2, 3, 5, 7, 8].includes(index));
|
|
5099
5081
|
}
|
|
5100
5082
|
else {
|
|
5101
|
-
console.log('No letters, restoring idTypes'); // Depuración
|
|
5102
5083
|
this.idTypes = [...this.parametersAll.TypeIdCardByCountryCol];
|
|
5103
5084
|
}
|
|
5104
|
-
console.log('Current idTypes:', this.idTypes); // Depuración
|
|
5105
5085
|
}
|
|
5106
5086
|
else {
|
|
5107
|
-
console.log('TypeIdCardByCountryCol is undefined'); // Depuración
|
|
5108
5087
|
this.idTypes = [];
|
|
5109
5088
|
}
|
|
5110
5089
|
}
|