iptdevs-design-system 3.1.670 → 3.1.671
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-self-managed/cod-form-self-managed/cod-self-managed.component.mjs +30 -3
- package/fesm2015/iptdevs-design-system.mjs +29 -2
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +29 -2
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/lib/cod-self-managed/cod-form-self-managed/cod-self-managed.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -7644,6 +7644,7 @@ class CodSelfManagedComponent {
|
|
|
7644
7644
|
this.currentStep = 0;
|
|
7645
7645
|
this.loaderMessage = '';
|
|
7646
7646
|
this.isLoading = false;
|
|
7647
|
+
this.formSteps = 4;
|
|
7647
7648
|
this.codCreationSubscription = null;
|
|
7648
7649
|
this.countInitialStep = 0;
|
|
7649
7650
|
this.items = [
|
|
@@ -7698,8 +7699,34 @@ class CodSelfManagedComponent {
|
|
|
7698
7699
|
return;
|
|
7699
7700
|
}
|
|
7700
7701
|
const totalData = [];
|
|
7701
|
-
|
|
7702
|
-
this.
|
|
7702
|
+
this.subscription = this.codSelfManagedFormControls.getControlValues().subscribe((controls) => {
|
|
7703
|
+
for (let i = 1; i <= this.formSteps; i++) {
|
|
7704
|
+
let controlsByStep = controls[i - 1];
|
|
7705
|
+
controlsByStep.forEach(control => {
|
|
7706
|
+
let value = this.localStorageCodSelfManaged.getCodFormData(i, control.name);
|
|
7707
|
+
totalData.push({
|
|
7708
|
+
control: control.name,
|
|
7709
|
+
isRequired: control.required,
|
|
7710
|
+
value,
|
|
7711
|
+
description: control.description
|
|
7712
|
+
});
|
|
7713
|
+
});
|
|
7714
|
+
}
|
|
7715
|
+
// Validar errores
|
|
7716
|
+
for (let i = 0; i < totalData.length; i++) {
|
|
7717
|
+
const element = totalData[i];
|
|
7718
|
+
if (!element.value && element.isRequired) {
|
|
7719
|
+
Swal.fire({
|
|
7720
|
+
title: 'Error Form Action Validate Error',
|
|
7721
|
+
text: `Revisar el campo: "${element.description}"`,
|
|
7722
|
+
icon: 'error'
|
|
7723
|
+
});
|
|
7724
|
+
break;
|
|
7725
|
+
}
|
|
7726
|
+
}
|
|
7727
|
+
if (action === 'create')
|
|
7728
|
+
this.createCOD(totalData);
|
|
7729
|
+
});
|
|
7703
7730
|
this.subscription?.unsubscribe();
|
|
7704
7731
|
}
|
|
7705
7732
|
createCOD(totalData) {
|