iptdevs-design-system 3.1.233 → 3.1.235
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/cod-form/cod-form.component.mjs +38 -29
- package/fesm2015/iptdevs-design-system.mjs +37 -28
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +37 -28
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/lib/cod/cod-form/cod-form.component.d.ts +3 -2
- package/package.json +1 -1
|
@@ -4643,6 +4643,11 @@ class CodFormComponent {
|
|
|
4643
4643
|
}
|
|
4644
4644
|
}
|
|
4645
4645
|
}
|
|
4646
|
+
ngOnDestroy() {
|
|
4647
|
+
if (this.subscription) {
|
|
4648
|
+
this.subscription.unsubscribe();
|
|
4649
|
+
}
|
|
4650
|
+
}
|
|
4646
4651
|
allowedRole() {
|
|
4647
4652
|
return this.allowedRoles.includes(this.userRole);
|
|
4648
4653
|
}
|
|
@@ -4670,36 +4675,40 @@ class CodFormComponent {
|
|
|
4670
4675
|
}
|
|
4671
4676
|
const totalData = [];
|
|
4672
4677
|
this.subscription = this.codFormControls.getControlValues().subscribe((controls) => {
|
|
4673
|
-
|
|
4674
|
-
let
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4678
|
+
if (controls) {
|
|
4679
|
+
for (let i = 1; i <= this.formSteps; i++) {
|
|
4680
|
+
let controlsByStep = controls[i - 1];
|
|
4681
|
+
if (controlsByStep) {
|
|
4682
|
+
controlsByStep.forEach(control => {
|
|
4683
|
+
let value = this.localStorageCOD.getCodFormData(i, control.name);
|
|
4684
|
+
// Cambiar True/False del multiculturalismo 1/0
|
|
4685
|
+
if (value === 'false' && control.description === 'Multiculturalismo') {
|
|
4686
|
+
totalData.push({
|
|
4687
|
+
control: control.name,
|
|
4688
|
+
isRequired: control.required,
|
|
4689
|
+
value: '0',
|
|
4690
|
+
description: control.description
|
|
4691
|
+
});
|
|
4692
|
+
}
|
|
4693
|
+
else if (value === 'true' && control.description === 'Multiculturalismo') {
|
|
4694
|
+
totalData.push({
|
|
4695
|
+
control: control.name,
|
|
4696
|
+
isRequired: control.required,
|
|
4697
|
+
value: '1',
|
|
4698
|
+
description: control.description
|
|
4699
|
+
});
|
|
4700
|
+
}
|
|
4701
|
+
else {
|
|
4702
|
+
totalData.push({
|
|
4703
|
+
control: control.name,
|
|
4704
|
+
isRequired: control.required,
|
|
4705
|
+
value,
|
|
4706
|
+
description: control.description
|
|
4707
|
+
});
|
|
4708
|
+
}
|
|
4684
4709
|
});
|
|
4685
4710
|
}
|
|
4686
|
-
|
|
4687
|
-
totalData.push({
|
|
4688
|
-
control: control.name,
|
|
4689
|
-
isRequired: control.required,
|
|
4690
|
-
value: '1',
|
|
4691
|
-
description: control.description
|
|
4692
|
-
});
|
|
4693
|
-
}
|
|
4694
|
-
else {
|
|
4695
|
-
totalData.push({
|
|
4696
|
-
control: control.name,
|
|
4697
|
-
isRequired: control.required,
|
|
4698
|
-
value,
|
|
4699
|
-
description: control.description
|
|
4700
|
-
});
|
|
4701
|
-
}
|
|
4702
|
-
});
|
|
4711
|
+
}
|
|
4703
4712
|
}
|
|
4704
4713
|
// Validar errores
|
|
4705
4714
|
for (let i = 0; i < totalData.length; i++) {
|