iptdevs-design-system 3.1.234 → 3.1.236
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 +39 -29
- package/esm2020/lib/cod/logic/cod-form-controls.mjs +2 -2
- package/fesm2015/iptdevs-design-system.mjs +39 -29
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +39 -29
- 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
|
@@ -2559,7 +2559,7 @@ class CodFormControls {
|
|
|
2559
2559
|
}
|
|
2560
2560
|
// Cambiar los valores de los controls, ejemplo: true y false del checkbox
|
|
2561
2561
|
changeValue(step, controlName, newValue) {
|
|
2562
|
-
const controls =
|
|
2562
|
+
const controls = { ...this.controls };
|
|
2563
2563
|
let control = controls[step - 1].filter(element => element.name === controlName);
|
|
2564
2564
|
control[0].required = newValue;
|
|
2565
2565
|
this.$controls.next(controls);
|
|
@@ -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,41 @@ class CodFormComponent {
|
|
|
4670
4675
|
}
|
|
4671
4676
|
const totalData = [];
|
|
4672
4677
|
this.subscription = this.codFormControls.getControlValues().subscribe((controls) => {
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
let
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4678
|
+
console.log(controls);
|
|
4679
|
+
if (controls) {
|
|
4680
|
+
for (let i = 1; i <= this.formSteps; i++) {
|
|
4681
|
+
let controlsByStep = controls[i - 1];
|
|
4682
|
+
if (controlsByStep) {
|
|
4683
|
+
controlsByStep.forEach(control => {
|
|
4684
|
+
let value = this.localStorageCOD.getCodFormData(i, control.name);
|
|
4685
|
+
// Cambiar True/False del multiculturalismo 1/0
|
|
4686
|
+
if (value === 'false' && control.description === 'Multiculturalismo') {
|
|
4687
|
+
totalData.push({
|
|
4688
|
+
control: control.name,
|
|
4689
|
+
isRequired: control.required,
|
|
4690
|
+
value: '0',
|
|
4691
|
+
description: control.description
|
|
4692
|
+
});
|
|
4693
|
+
}
|
|
4694
|
+
else if (value === 'true' && control.description === 'Multiculturalismo') {
|
|
4695
|
+
totalData.push({
|
|
4696
|
+
control: control.name,
|
|
4697
|
+
isRequired: control.required,
|
|
4698
|
+
value: '1',
|
|
4699
|
+
description: control.description
|
|
4700
|
+
});
|
|
4701
|
+
}
|
|
4702
|
+
else {
|
|
4703
|
+
totalData.push({
|
|
4704
|
+
control: control.name,
|
|
4705
|
+
isRequired: control.required,
|
|
4706
|
+
value,
|
|
4707
|
+
description: control.description
|
|
4708
|
+
});
|
|
4709
|
+
}
|
|
4684
4710
|
});
|
|
4685
4711
|
}
|
|
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
|
-
});
|
|
4712
|
+
}
|
|
4703
4713
|
}
|
|
4704
4714
|
// Validar errores
|
|
4705
4715
|
for (let i = 0; i < totalData.length; i++) {
|