iptdevs-design-system 3.1.886 → 3.1.888
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-one/cod-form-step-one.component.mjs +4 -21
- package/fesm2015/iptdevs-design-system.mjs +3 -20
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +3 -20
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -3697,12 +3697,6 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3697
3697
|
this.communicatorService.setCurrentAgreement(this.localStorageCOD.getCodFormData(1, 'agreement_by_category'));
|
|
3698
3698
|
// Lógica principal de cambios
|
|
3699
3699
|
if (changes['initialData'] || changes['dataPreviusCodData']) {
|
|
3700
|
-
console.log(changes);
|
|
3701
|
-
console.log("initialData", this.initialData);
|
|
3702
|
-
console.log("dataPreviusCodData", this.dataPreviusCodData);
|
|
3703
|
-
console.log("isRenovation", this.isRenovation);
|
|
3704
|
-
console.log("isEditCod", this.isEditCod);
|
|
3705
|
-
console.log("courseSelectRenovation", this.courseSelectRenovation);
|
|
3706
3700
|
this.handleDataChanges(changes);
|
|
3707
3701
|
}
|
|
3708
3702
|
this.cdRef.detectChanges();
|
|
@@ -3756,7 +3750,6 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3756
3750
|
handleDataChanges(changes) {
|
|
3757
3751
|
// Caso 1: Hay initialData y NO hay dataPreviusCodData
|
|
3758
3752
|
if (changes['initialData']?.currentValue && !this.isRenovation && !this.isEditCod) {
|
|
3759
|
-
console.log("Procesando initialData (tiene prioridad)");
|
|
3760
3753
|
this.processData(this.initialData);
|
|
3761
3754
|
return;
|
|
3762
3755
|
}
|
|
@@ -3764,28 +3757,24 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3764
3757
|
if (changes['dataPreviusCodData']?.currentValue) {
|
|
3765
3758
|
// Subcaso 2.1: Es edición
|
|
3766
3759
|
if (this.isEditCod && !this.isRenovation) {
|
|
3767
|
-
console.log("Procesando dataPreviusCodData en modo edición");
|
|
3768
3760
|
this.processData(this.dataPreviusCodData);
|
|
3769
3761
|
this.isDisabledSel = !this.dataPreviusCodData.edit_course_payment;
|
|
3770
3762
|
return;
|
|
3771
3763
|
}
|
|
3772
3764
|
// Subcaso 2.2: Es renovación
|
|
3773
3765
|
if (!this.isEditCod && this.isRenovation && this.courseSelectRenovation) {
|
|
3774
|
-
console.log("Procesando dataPreviusCodData en modo renovación");
|
|
3775
3766
|
this.setDataCodRenovationSelect();
|
|
3776
3767
|
this.isDisabledSel = true;
|
|
3777
3768
|
return;
|
|
3778
3769
|
}
|
|
3779
3770
|
// Subcaso 2.2: viene con initialData
|
|
3780
3771
|
if (this.initialData && !this.isEditCod && !this.isRenovation) {
|
|
3781
|
-
console.log("Procesando dataPreviusCodData en modo dataPreviusCodData con initialData");
|
|
3782
3772
|
this.processData(this.initialData);
|
|
3783
3773
|
this.isDisabledSel = false;
|
|
3784
3774
|
return;
|
|
3785
3775
|
}
|
|
3786
3776
|
}
|
|
3787
3777
|
// Caso 3: Ninguna condición anterior se cumplió (reset controlado)
|
|
3788
|
-
console.log("Reseteando formulario (condición no reconocida)");
|
|
3789
3778
|
this.resetForm();
|
|
3790
3779
|
}
|
|
3791
3780
|
processData(data) {
|
|
@@ -3861,7 +3850,6 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3861
3850
|
const englishLevel = parseInt(this.codFormStepOne.controls['english_level'].value);
|
|
3862
3851
|
const courseModality = parseInt(this.codFormStepOne.controls['course_modality'].value);
|
|
3863
3852
|
if (agreementByCategory && englishLevel && courseModality) {
|
|
3864
|
-
console.log("se llama getAvailibleCourses desde setValuesByLocalStorage");
|
|
3865
3853
|
this.getAvailibleCourses();
|
|
3866
3854
|
}
|
|
3867
3855
|
}
|
|
@@ -3923,6 +3911,7 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3923
3911
|
selectCoursesTypesByPlan(coursesTypes) {
|
|
3924
3912
|
if (coursesTypes !== 'Tipo de plan') {
|
|
3925
3913
|
this.codFormStepOne.controls['course_modality'].setValue(null);
|
|
3914
|
+
this.codFormStepOne.controls['availible_courses'].setValue(null);
|
|
3926
3915
|
this.codFormStepOne.controls['course_type'].setValue(coursesTypes);
|
|
3927
3916
|
this.getAvailibleCourses();
|
|
3928
3917
|
}
|
|
@@ -3932,7 +3921,7 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3932
3921
|
}
|
|
3933
3922
|
selectAgreementByCategory(agreementByCategories) {
|
|
3934
3923
|
if (agreementByCategories !== 'Convenio por categoria') {
|
|
3935
|
-
this.codFormStepOne.controls['course_modality'].setValue(null);
|
|
3924
|
+
// this.codFormStepOne.controls['course_modality'].setValue(null);
|
|
3936
3925
|
this.codFormStepOne.controls['agreement_by_category'].setValue(agreementByCategories);
|
|
3937
3926
|
this.communicatorService.setCurrentAgreement(agreementByCategories);
|
|
3938
3927
|
// this.getAvailibleCourses();
|
|
@@ -3945,6 +3934,7 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3945
3934
|
selectLevel(levels) {
|
|
3946
3935
|
if (levels !== 'Nivel de inglés') {
|
|
3947
3936
|
this.codFormStepOne.controls['course_modality'].setValue(null);
|
|
3937
|
+
this.codFormStepOne.controls['availible_courses'].setValue(null);
|
|
3948
3938
|
this.codFormStepOne.controls['english_level'].setValue(levels);
|
|
3949
3939
|
this.getAvailibleCourses();
|
|
3950
3940
|
}
|
|
@@ -3965,13 +3955,6 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3965
3955
|
this.codFormStepOne.controls['english_level'].setValue(null);
|
|
3966
3956
|
}
|
|
3967
3957
|
}
|
|
3968
|
-
// private validRequest(): boolean {
|
|
3969
|
-
// return (
|
|
3970
|
-
// this.codFormStepOne.controls['english_level'].value != '' &&
|
|
3971
|
-
// this.codFormStepOne.controls['agreement_by_category'].value != '' &&
|
|
3972
|
-
// this.codFormStepOne.controls['course_type'].value != ''
|
|
3973
|
-
// );
|
|
3974
|
-
// }
|
|
3975
3958
|
validRequest() {
|
|
3976
3959
|
const form = this.codFormStepOne;
|
|
3977
3960
|
return !!(form.get('english_level')?.value &&
|