iptdevs-design-system 3.1.239 → 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 -20
- package/fesm2015/iptdevs-design-system.mjs +23 -19
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +23 -19
- 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,29 +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
|
-
this.codFormStepOne.controls['course_type'].setValue(this.dataPreviusCodData.course_type.code);
|
|
3159
|
-
this.getAvailibleCourses();
|
|
3160
|
-
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();
|
|
3161
3150
|
}
|
|
3162
3151
|
}
|
|
3163
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
|
+
}
|
|
3164
3168
|
setDataFromUserHistory() {
|
|
3165
3169
|
this.codFormStepOne.controls['academic_plan'].setValue(this.initialData.course_type.academic_plan.code);
|
|
3166
3170
|
this.codFormStepOne.controls['course_type'].setValue(this.initialData.course_type.code);
|