iptdevs-design-system 3.1.183 → 3.1.186
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 +3 -13
- package/fesm2015/iptdevs-design-system.mjs +2 -12
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +2 -12
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/lib/cod/steps/cod-form-step-one/cod-form-step-one.component.d.ts +2 -3
- package/package.json +1 -1
|
@@ -3108,15 +3108,6 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3108
3108
|
this.controls = new CodFormControls().controls[0];
|
|
3109
3109
|
this.copies = this.copiesService.copies;
|
|
3110
3110
|
}
|
|
3111
|
-
ngOnInit() {
|
|
3112
|
-
// this.getParameters();
|
|
3113
|
-
// this.initForm();
|
|
3114
|
-
// this.startLocalStorageWork();
|
|
3115
|
-
// this.setValuesByLocalStorage()
|
|
3116
|
-
// this.codFormStepOne.controls['course_type'].valueChanges
|
|
3117
|
-
// .subscribe(value => this.communicatorService.setCurrentCourseType(value));
|
|
3118
|
-
// this.communicatorService.setCurrentAgreement(this.localStorageCOD.getCodFormData(1, 'agreement_by_category')!);
|
|
3119
|
-
}
|
|
3120
3111
|
/* Es necesario recorrer el array de controls de nuestro formulario para:
|
|
3121
3112
|
✅ Leer el Local Storage y setear los valores
|
|
3122
3113
|
✅ Subscribirse a los cambios del formulario para setear valores nuevos
|
|
@@ -3132,9 +3123,7 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3132
3123
|
.subscribe(value => this.communicatorService.setCurrentCourseType(value));
|
|
3133
3124
|
this.communicatorService.setCurrentAgreement(this.localStorageCOD.getCodFormData(1, 'agreement_by_category'));
|
|
3134
3125
|
if (changes['initialData']) {
|
|
3135
|
-
console.log(this.initialData);
|
|
3136
3126
|
if (this.initialData != null) {
|
|
3137
|
-
console.log(this.initialData);
|
|
3138
3127
|
this.getAgreementByPlan(this.initialData.course_type.academic_plan.code);
|
|
3139
3128
|
this.getCourseType(this.initialData.course_type.academic_plan.code);
|
|
3140
3129
|
this.codFormStepOne.controls['english_level'].setValue(this.initialData.english_level.code);
|
|
@@ -3142,6 +3131,7 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3142
3131
|
this.codFormStepOne.controls['course_type'].setValue(this.initialData.course_type.code);
|
|
3143
3132
|
this.getAvailibleCourses();
|
|
3144
3133
|
this.setDataFromUserHistory();
|
|
3134
|
+
this.selectAvailibleCourses(this.initialData);
|
|
3145
3135
|
}
|
|
3146
3136
|
}
|
|
3147
3137
|
}
|
|
@@ -3267,7 +3257,7 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3267
3257
|
selectAvailibleCourses(availibleCourses) {
|
|
3268
3258
|
if (availibleCourses !== 'Grupos disponibles') {
|
|
3269
3259
|
let courseMod = this.availibleCourses.find(objeto => objeto.code === parseInt(availibleCourses, 10));
|
|
3270
|
-
this.codFormStepOne.controls['course_modality'].setValue(courseMod.modality);
|
|
3260
|
+
this.codFormStepOne.controls['course_modality'].setValue(courseMod.modality ? courseMod.modality : availibleCourses.course_modality.code);
|
|
3271
3261
|
this.codFormStepOne.controls['availible_courses'].setValue(availibleCourses);
|
|
3272
3262
|
}
|
|
3273
3263
|
else {
|