iptdevs-design-system 3.1.172 → 3.1.174
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 +11 -26
- package/fesm2015/iptdevs-design-system.mjs +10 -25
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +10 -25
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -3109,13 +3109,13 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3109
3109
|
this.copies = this.copiesService.copies;
|
|
3110
3110
|
}
|
|
3111
3111
|
ngOnInit() {
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
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
3119
|
}
|
|
3120
3120
|
/* Es necesario recorrer el array de controls de nuestro formulario para:
|
|
3121
3121
|
✅ Leer el Local Storage y setear los valores
|
|
@@ -3124,34 +3124,19 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3124
3124
|
Nota: la clase CodFormSteps() se encarga de toda la lógica de LS con los pasos del formulario del COD
|
|
3125
3125
|
*/
|
|
3126
3126
|
ngOnChanges(changes) {
|
|
3127
|
-
this.getParameters();
|
|
3128
|
-
this.initForm();
|
|
3129
|
-
this.startLocalStorageWork();
|
|
3130
|
-
this.setValuesByLocalStorage();
|
|
3131
|
-
this.codFormStepOne.controls['course_type'].valueChanges
|
|
3132
|
-
.subscribe(value => this.communicatorService.setCurrentCourseType(value));
|
|
3133
|
-
this.communicatorService.setCurrentAgreement(this.localStorageCOD.getCodFormData(1, 'agreement_by_category'));
|
|
3134
3127
|
if (changes['initialData']) {
|
|
3135
3128
|
console.log(this.initialData);
|
|
3136
3129
|
if (this.initialData != null) {
|
|
3137
3130
|
console.log(this.initialData);
|
|
3138
|
-
// if (this.initialData.student != null) {
|
|
3139
|
-
// this.setDataFromPreviusCod();
|
|
3140
|
-
// }else{
|
|
3141
|
-
// this.setDataFromUserHistory();
|
|
3142
|
-
// }
|
|
3143
3131
|
this.setDataFromUserHistory();
|
|
3144
3132
|
}
|
|
3145
|
-
else {
|
|
3146
|
-
console.log(this.initialData);
|
|
3147
|
-
}
|
|
3148
3133
|
}
|
|
3149
3134
|
}
|
|
3150
3135
|
setDataFromUserHistory() {
|
|
3151
3136
|
this.codFormStepOne.controls['academic_plan'].setValue(this.initialData.course_type.academic_plan.code);
|
|
3152
|
-
this.codFormStepOne.controls['course_type'].setValue(this.initialData.
|
|
3153
|
-
this.codFormStepOne.controls['agreement_by_category'].setValue(this.initialData.
|
|
3154
|
-
this.codFormStepOne.controls['english_level'].setValue(this.initialData.english_level);
|
|
3137
|
+
this.codFormStepOne.controls['course_type'].setValue(this.initialData.course_type.code);
|
|
3138
|
+
this.codFormStepOne.controls['agreement_by_category'].setValue(this.initialData.agreement.code);
|
|
3139
|
+
this.codFormStepOne.controls['english_level'].setValue(this.initialData.english_level.code);
|
|
3155
3140
|
this.codFormStepOne.controls['availible_courses'].setValue(this.initialData.code);
|
|
3156
3141
|
}
|
|
3157
3142
|
startLocalStorageWork() {
|