iptdevs-design-system 3.1.498 → 3.1.500
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/steps/cod-form-step-one/cod-self-form-step-one.component.mjs +10 -3
- package/fesm2015/iptdevs-design-system.mjs +9 -2
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +9 -2
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -6391,15 +6391,19 @@ class CodSelfFormStepOneComponent extends CodSelfManagedSteps {
|
|
|
6391
6391
|
});
|
|
6392
6392
|
// Agregar la lógica para mostrar u ocultar el select de acuerdo al valor de grade
|
|
6393
6393
|
this.codSelfFormStepOne.controls['grade'].valueChanges.subscribe((grade) => {
|
|
6394
|
-
if (grade
|
|
6394
|
+
if (grade == 15 || grade == 16) {
|
|
6395
6395
|
this.showAgreementSelect = true;
|
|
6396
|
+
console.log("grade-15 or 16", this.showAgreementSelect);
|
|
6396
6397
|
this.codSelfFormStepOne.controls['agreement_by_category'].setValidators([Validators.required]);
|
|
6397
6398
|
}
|
|
6398
6399
|
else {
|
|
6399
6400
|
this.showAgreementSelect = false;
|
|
6401
|
+
console.log("false", this.showAgreementSelect);
|
|
6400
6402
|
this.codSelfFormStepOne.controls['agreement_by_category'].clearValidators();
|
|
6403
|
+
this.codSelfFormStepOne.controls['agreement_by_category'].setValue(null);
|
|
6401
6404
|
}
|
|
6402
6405
|
this.codSelfFormStepOne.controls['agreement_by_category'].updateValueAndValidity();
|
|
6406
|
+
console.log("suscribeChangesGrade", this.showAgreementSelect);
|
|
6403
6407
|
});
|
|
6404
6408
|
// Calcular edad y setear valor
|
|
6405
6409
|
this.codSelfFormStepOne.controls['birthdate'].valueChanges.subscribe({
|
|
@@ -6544,20 +6548,23 @@ class CodSelfFormStepOneComponent extends CodSelfManagedSteps {
|
|
|
6544
6548
|
this.codSelfFormStepOne.controls['grade'].setValue(grade);
|
|
6545
6549
|
// Verificar si el grado seleccionado es 15 o 16
|
|
6546
6550
|
console.log("selectGrade", grade);
|
|
6547
|
-
if (grade
|
|
6551
|
+
if (grade == 15 || grade == 16) {
|
|
6548
6552
|
// Si es 15 o 16, mostrar el otro ipt-select
|
|
6549
6553
|
this.showAgreementSelect = true;
|
|
6550
6554
|
}
|
|
6551
6555
|
else {
|
|
6552
6556
|
// Si no es 15 ni 16, ocultar el otro ipt-select
|
|
6553
6557
|
this.showAgreementSelect = false;
|
|
6558
|
+
this.codSelfFormStepOne.controls['agreement_by_category'].setValue(null);
|
|
6554
6559
|
}
|
|
6555
6560
|
}
|
|
6556
6561
|
else {
|
|
6557
6562
|
// Reiniciar el valor del select y ocultar el otro ipt-select
|
|
6558
6563
|
this.codSelfFormStepOne.controls['grade'].setValue(null);
|
|
6564
|
+
this.codSelfFormStepOne.controls['agreement_by_category'].setValue(null);
|
|
6559
6565
|
this.showAgreementSelect = false;
|
|
6560
6566
|
}
|
|
6567
|
+
console.log("selectGrade", this.showAgreementSelect);
|
|
6561
6568
|
}
|
|
6562
6569
|
selectAgreement(grade) {
|
|
6563
6570
|
if (grade !== 'Convenio') {
|