iptdevs-design-system 3.1.240 → 3.1.241
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 +24 -30
- package/fesm2015/iptdevs-design-system.mjs +23 -29
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +23 -29
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/lib/cod/steps/cod-form-step-one/cod-form-step-one.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3138,39 +3138,33 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3138
3138
|
this.codFormStepOne.controls['course_type'].valueChanges
|
|
3139
3139
|
.subscribe(value => this.communicatorService.setCurrentCourseType(value));
|
|
3140
3140
|
this.communicatorService.setCurrentAgreement(this.localStorageCOD.getCodFormData(1, 'agreement_by_category'));
|
|
3141
|
-
if (changes['initialData']) {
|
|
3142
|
-
|
|
3143
|
-
this.getAgreementByPlan(this.initialData.course_type.academic_plan.code);
|
|
3144
|
-
this.getCourseType(this.initialData.course_type.academic_plan.code);
|
|
3145
|
-
this.codFormStepOne.controls['english_level'].setValue(this.initialData.english_level.code);
|
|
3146
|
-
this.codFormStepOne.controls['agreement_by_category'].setValue(this.initialData.agreement.code);
|
|
3147
|
-
this.codFormStepOne.controls['course_type'].setValue(this.initialData.course_type.code);
|
|
3148
|
-
this.getAvailibleCourses();
|
|
3149
|
-
this.setDataFromUserHistory();
|
|
3150
|
-
}
|
|
3141
|
+
if (changes['initialData'] && this.initialData != null) {
|
|
3142
|
+
this.processData(this.initialData);
|
|
3151
3143
|
}
|
|
3152
|
-
if (changes['dataPreviusCodData']) {
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
}
|
|
3159
|
-
else {
|
|
3160
|
-
// Deshabilitar edición
|
|
3161
|
-
codFormStepOne.disable();
|
|
3162
|
-
}
|
|
3163
|
-
// this.dataPreviusCodData.edit_course_payment
|
|
3164
|
-
this.getAgreementByPlan(this.dataPreviusCodData.course_type.academic_plan.code);
|
|
3165
|
-
this.getCourseType(this.dataPreviusCodData.course_type.academic_plan.code);
|
|
3166
|
-
this.codFormStepOne.controls['english_level'].setValue(this.dataPreviusCodData.english_level.code);
|
|
3167
|
-
this.codFormStepOne.controls['agreement_by_category'].setValue(this.dataPreviusCodData.agreement.code);
|
|
3168
|
-
this.codFormStepOne.controls['course_type'].setValue(this.dataPreviusCodData.course_type.code);
|
|
3169
|
-
this.getAvailibleCourses();
|
|
3170
|
-
this.setDataFromEditCodHistory();
|
|
3144
|
+
if (changes['dataPreviusCodData'] && this.dataPreviusCodData != null) {
|
|
3145
|
+
this.processData(this.dataPreviusCodData);
|
|
3146
|
+
const { codFormStepOne } = this;
|
|
3147
|
+
if (!this.dataPreviusCodData.edit_course_payment) {
|
|
3148
|
+
// Deshabilitar edición
|
|
3149
|
+
codFormStepOne.disable();
|
|
3171
3150
|
}
|
|
3172
3151
|
}
|
|
3173
3152
|
}
|
|
3153
|
+
processData(data) {
|
|
3154
|
+
const { codFormStepOne } = this;
|
|
3155
|
+
this.getAgreementByPlan(data.course_type.academic_plan.code);
|
|
3156
|
+
this.getCourseType(data.course_type.academic_plan.code);
|
|
3157
|
+
codFormStepOne.controls['english_level'].setValue(data.english_level.code);
|
|
3158
|
+
codFormStepOne.controls['agreement_by_category'].setValue(data.agreement.code);
|
|
3159
|
+
codFormStepOne.controls['course_type'].setValue(data.course_type.code);
|
|
3160
|
+
this.getAvailibleCourses();
|
|
3161
|
+
if (this.isEditCod) {
|
|
3162
|
+
this.setDataFromEditCodHistory();
|
|
3163
|
+
}
|
|
3164
|
+
else {
|
|
3165
|
+
this.setDataFromUserHistory();
|
|
3166
|
+
}
|
|
3167
|
+
}
|
|
3174
3168
|
setDataFromUserHistory() {
|
|
3175
3169
|
this.codFormStepOne.controls['academic_plan'].setValue(this.initialData.course_type.academic_plan.code);
|
|
3176
3170
|
this.codFormStepOne.controls['course_type'].setValue(this.initialData.course_type.code);
|