iptdevs-design-system 3.1.872 → 3.1.873
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 +38 -19
- package/fesm2015/iptdevs-design-system.mjs +37 -18
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +37 -18
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -3784,23 +3784,32 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3784
3784
|
course_modality: [''],
|
|
3785
3785
|
});
|
|
3786
3786
|
}
|
|
3787
|
+
// setValuesByLocalStorage() {
|
|
3788
|
+
// const academicPlan = this.codFormStepOne.controls['academic_plan'].value || null;
|
|
3789
|
+
// if (!academicPlan) return;
|
|
3790
|
+
// this.selectAcademicPlan(academicPlan);
|
|
3791
|
+
// const agreementByCategory = this.codFormStepOne.controls['agreement_by_category'].value || null;
|
|
3792
|
+
// if (!agreementByCategory) return;
|
|
3793
|
+
// this.getAvailibleCourses();
|
|
3794
|
+
// const englishLevel = this.codFormStepOne.controls['english_level'].value || null;
|
|
3795
|
+
// if (!englishLevel) return;
|
|
3796
|
+
// this.getAvailibleCourses();
|
|
3797
|
+
// const courseModality = this.codFormStepOne.controls['course_modality'].value || null;
|
|
3798
|
+
// if (!courseModality) return;
|
|
3799
|
+
// this.getAvailibleCourses();
|
|
3800
|
+
// }
|
|
3787
3801
|
setValuesByLocalStorage() {
|
|
3788
|
-
const academicPlan = this.codFormStepOne.controls['academic_plan'].value
|
|
3789
|
-
if (
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
const agreementByCategory = this.codFormStepOne.controls['agreement_by_category'].value
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
this.getAvailibleCourses();
|
|
3800
|
-
const courseModality = this.codFormStepOne.controls['course_modality'].value || null;
|
|
3801
|
-
if (!courseModality)
|
|
3802
|
-
return;
|
|
3803
|
-
this.getAvailibleCourses();
|
|
3802
|
+
const academicPlan = this.codFormStepOne.controls['academic_plan'].value;
|
|
3803
|
+
if (academicPlan) {
|
|
3804
|
+
this.selectAcademicPlan(academicPlan);
|
|
3805
|
+
}
|
|
3806
|
+
const agreementByCategory = this.codFormStepOne.controls['agreement_by_category'].value;
|
|
3807
|
+
const englishLevel = this.codFormStepOne.controls['english_level'].value;
|
|
3808
|
+
const courseModality = this.codFormStepOne.controls['course_modality'].value;
|
|
3809
|
+
if (agreementByCategory && englishLevel && courseModality) {
|
|
3810
|
+
console.log("se llama getAvailibleCourses desde setValuesByLocalStorage");
|
|
3811
|
+
this.getAvailibleCourses();
|
|
3812
|
+
}
|
|
3804
3813
|
}
|
|
3805
3814
|
sendForm() {
|
|
3806
3815
|
this.codFormStepOne.markAsTouched();
|
|
@@ -3872,7 +3881,7 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3872
3881
|
this.codFormStepOne.controls['course_modality'].setValue(null);
|
|
3873
3882
|
this.codFormStepOne.controls['agreement_by_category'].setValue(agreementByCategories);
|
|
3874
3883
|
this.communicatorService.setCurrentAgreement(agreementByCategories);
|
|
3875
|
-
this.getAvailibleCourses();
|
|
3884
|
+
// this.getAvailibleCourses();
|
|
3876
3885
|
}
|
|
3877
3886
|
else {
|
|
3878
3887
|
this.codFormStepOne.controls['agreement_by_category'].setValue(null);
|
|
@@ -3926,11 +3935,21 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3926
3935
|
let startTime = scheduleParts[2];
|
|
3927
3936
|
this.availibleCourses.push({
|
|
3928
3937
|
code: course.code,
|
|
3929
|
-
name:
|
|
3938
|
+
name: `${course.code} Curso ${course.course_modality.name === 'Presencial' ? 'Presencial' : 'Virtual'} - Teacher ${course.teacher} - Fecha de inicio: ${course.to_start}, Hora de inicio: ${startTime}, Cupos disp: ${course.available_capacity}`,
|
|
3930
3939
|
modality: course.course_modality.code
|
|
3931
3940
|
});
|
|
3932
3941
|
});
|
|
3933
3942
|
this.isLoading = false;
|
|
3943
|
+
console.log("availibleCourses", this.availibleCourses);
|
|
3944
|
+
console.log("Valores del formulario:", {
|
|
3945
|
+
academic_plan: this.codFormStepOne.controls['academic_plan'].value,
|
|
3946
|
+
course_type: this.codFormStepOne.controls['course_type'].value,
|
|
3947
|
+
agreement_by_category: this.codFormStepOne.controls['agreement_by_category'].value,
|
|
3948
|
+
english_level: this.codFormStepOne.controls['english_level'].value,
|
|
3949
|
+
availible_courses: this.codFormStepOne.controls['availible_courses'].value,
|
|
3950
|
+
course_modality: this.codFormStepOne.controls['course_modality'].value,
|
|
3951
|
+
agreement: this.codFormStepOne.controls['agreement'].value,
|
|
3952
|
+
});
|
|
3934
3953
|
}
|
|
3935
3954
|
else {
|
|
3936
3955
|
this.hasAvailableCourse = false;
|