iptdevs-design-system 3.1.374 → 3.1.376
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/cod-form/cod-form.component.mjs +1 -3
- package/esm2020/lib/cod/steps/cod-form-step-one/cod-form-step-one.component.mjs +14 -43
- package/fesm2015/iptdevs-design-system.mjs +18 -51
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +13 -44
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -3183,11 +3183,6 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3183
3183
|
Nota: la clase CodFormSteps() se encarga de toda la lógica de LS con los pasos del formulario del COD
|
|
3184
3184
|
*/
|
|
3185
3185
|
ngOnChanges(changes) {
|
|
3186
|
-
console.log("initialData", this.initialData);
|
|
3187
|
-
console.log("dataPreviusCodData", this.dataPreviusCodData);
|
|
3188
|
-
console.log("courseSelectRenovation", this.courseSelectRenovation);
|
|
3189
|
-
console.log("isEditCod", this.isEditCod);
|
|
3190
|
-
console.log("isRenovation", this.isRenovation);
|
|
3191
3186
|
this.getParameters();
|
|
3192
3187
|
this.initForm();
|
|
3193
3188
|
this.startLocalStorageWork();
|
|
@@ -3195,11 +3190,19 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3195
3190
|
this.codFormStepOne.controls['course_type'].valueChanges
|
|
3196
3191
|
.subscribe(value => this.communicatorService.setCurrentCourseType(value));
|
|
3197
3192
|
this.communicatorService.setCurrentAgreement(this.localStorageCOD.getCodFormData(1, 'agreement_by_category'));
|
|
3198
|
-
if (changes['initialData'] && this.initialData != null && this.dataPreviusCodData === null && this.isEditCod === false && this.isRenovation === false) {
|
|
3193
|
+
if (changes['initialData'] && this.initialData != null && this.dataPreviusCodData === null || this.dataPreviusCodData != null && this.isEditCod === false && this.isRenovation === false) {
|
|
3199
3194
|
this.processData(this.initialData);
|
|
3200
3195
|
this.cdRef.detectChanges();
|
|
3201
3196
|
}
|
|
3202
|
-
else
|
|
3197
|
+
else {
|
|
3198
|
+
this.codFormStepOne.controls['academic_plan'].setValue(null);
|
|
3199
|
+
this.codFormStepOne.controls['course_type'].setValue(null);
|
|
3200
|
+
this.codFormStepOne.controls['agreement_by_category'].setValue(null);
|
|
3201
|
+
this.codFormStepOne.controls['english_level'].setValue(null);
|
|
3202
|
+
this.codFormStepOne.controls['availible_courses'].setValue(null);
|
|
3203
|
+
this.codFormStepOne.controls['course_modality'].setValue(null);
|
|
3204
|
+
}
|
|
3205
|
+
if (changes['dataPreviusCodData'] && this.dataPreviusCodData != null && this.isEditCod && this.isRenovation === false) {
|
|
3203
3206
|
this.processData(this.dataPreviusCodData);
|
|
3204
3207
|
if (this.isEditCod && !this.dataPreviusCodData.edit_course_payment) {
|
|
3205
3208
|
this.isDisabledSel = true;
|
|
@@ -3207,77 +3210,45 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3207
3210
|
else {
|
|
3208
3211
|
this.isDisabledSel = false;
|
|
3209
3212
|
}
|
|
3210
|
-
// if (this.isDisabledSel) {
|
|
3211
|
-
// this.disableFormControls();
|
|
3212
|
-
// }
|
|
3213
|
-
// Forzar detección de cambios
|
|
3214
3213
|
this.cdRef.detectChanges();
|
|
3215
3214
|
}
|
|
3216
3215
|
else if (changes['dataPreviusCodData'] && this.dataPreviusCodData != null && !this.isEditCod && this.courseSelectRenovation && this.isRenovation === true) {
|
|
3217
3216
|
this.setDataCodRenovationSelect();
|
|
3218
3217
|
this.isDisabledSel = true;
|
|
3219
|
-
// this.disableFormControls();
|
|
3220
3218
|
this.cdRef.detectChanges();
|
|
3221
3219
|
}
|
|
3222
|
-
else {
|
|
3223
|
-
console.log("llegue aqui por alguna razon del la condicion 2");
|
|
3224
|
-
this.codFormStepOne.controls['academic_plan'].setValue(null);
|
|
3225
|
-
this.codFormStepOne.controls['course_type'].setValue(null);
|
|
3226
|
-
this.codFormStepOne.controls['agreement_by_category'].setValue(null);
|
|
3227
|
-
this.codFormStepOne.controls['english_level'].setValue(null);
|
|
3228
|
-
this.codFormStepOne.controls['availible_courses'].setValue(null);
|
|
3229
|
-
this.codFormStepOne.controls['course_modality'].setValue(null);
|
|
3230
|
-
// this.cdRef.detectChanges();
|
|
3231
|
-
}
|
|
3232
3220
|
}
|
|
3233
|
-
// private disableFormControls() {
|
|
3234
|
-
// this.codFormStepOne.controls['academic_plan'].disable();
|
|
3235
|
-
// this.codFormStepOne.controls['course_type'].disable();
|
|
3236
|
-
// this.codFormStepOne.controls['agreement_by_category'].disable();
|
|
3237
|
-
// this.codFormStepOne.controls['english_level'].disable();
|
|
3238
|
-
// this.codFormStepOne.controls['availible_courses'].disable();
|
|
3239
|
-
// this.codFormStepOne.controls['course_modality'].disable();
|
|
3240
|
-
// }
|
|
3241
3221
|
processData(data) {
|
|
3242
|
-
console.log("llegue aqui en processData");
|
|
3243
3222
|
const { codFormStepOne } = this;
|
|
3244
|
-
|
|
3245
|
-
|
|
3223
|
+
this.getAgreementByPlan(data.course_type?.academic_plan.code);
|
|
3224
|
+
this.getCourseType(data.course_type?.academic_plan.code);
|
|
3246
3225
|
codFormStepOne.controls['english_level'].setValue(data.english_level?.code);
|
|
3247
3226
|
codFormStepOne.controls['agreement_by_category'].setValue(data.agreement?.code);
|
|
3248
3227
|
codFormStepOne.controls['course_type'].setValue(data.course_type?.code);
|
|
3249
3228
|
codFormStepOne.controls['academic_plan'].setValue(data.course_type?.academic_plan.code);
|
|
3250
|
-
|
|
3229
|
+
this.getAvailibleCourses();
|
|
3251
3230
|
if (this.isEditCod) {
|
|
3252
|
-
console.log("llegue aqui setDataFromEditCodHistory");
|
|
3253
3231
|
this.setDataFromEditCodHistory();
|
|
3254
3232
|
}
|
|
3255
3233
|
else if (!this.isEditCod && this.initialData != null) {
|
|
3256
|
-
console.log("llegue aqui2");
|
|
3257
3234
|
this.setDataFromUserHistory();
|
|
3258
3235
|
}
|
|
3259
3236
|
}
|
|
3260
3237
|
setDataFromUserHistory() {
|
|
3261
|
-
this.getAgreementByPlan(this.initialData.course_type?.academic_plan.code);
|
|
3262
|
-
this.getCourseType(this.initialData.course_type?.academic_plan.code);
|
|
3263
3238
|
this.codFormStepOne.controls['academic_plan'].setValue(this.initialData.course_type.academic_plan.code);
|
|
3264
3239
|
this.codFormStepOne.controls['course_type'].setValue(this.initialData.course_type.code);
|
|
3265
3240
|
this.codFormStepOne.controls['agreement_by_category'].setValue(this.initialData.agreement.code);
|
|
3266
3241
|
this.codFormStepOne.controls['english_level'].setValue(this.initialData.english_level.code);
|
|
3267
3242
|
this.codFormStepOne.controls['availible_courses'].setValue(this.initialData.code);
|
|
3268
3243
|
this.codFormStepOne.controls['course_modality'].setValue(this.initialData.course_modality.code);
|
|
3269
|
-
this.getAvailibleCourses();
|
|
3270
3244
|
}
|
|
3271
3245
|
setDataFromEditCodHistory() {
|
|
3272
|
-
this.getAgreementByPlan(this.dataPreviusCodData.course_type?.academic_plan.code);
|
|
3273
|
-
this.getCourseType(this.dataPreviusCodData.course_type?.academic_plan.code);
|
|
3274
3246
|
this.codFormStepOne.controls['academic_plan'].setValue(this.dataPreviusCodData.course_type.academic_plan.code ? this.dataPreviusCodData.course_type.academic_plan.code : null);
|
|
3275
3247
|
this.codFormStepOne.controls['course_type'].setValue(this.dataPreviusCodData.course_type.code ? this.dataPreviusCodData.course_type.code : null);
|
|
3276
3248
|
this.codFormStepOne.controls['agreement_by_category'].setValue(this.dataPreviusCodData.agreement.code ? this.dataPreviusCodData.agreement.code : null);
|
|
3277
3249
|
this.codFormStepOne.controls['english_level'].setValue(this.dataPreviusCodData.english_level.code ? this.dataPreviusCodData.english_level.code : null);
|
|
3278
3250
|
this.codFormStepOne.controls['availible_courses'].setValue(this.dataPreviusCodData.course.code ? this.dataPreviusCodData.course.code : null);
|
|
3279
3251
|
this.codFormStepOne.controls['course_modality'].setValue(this.dataPreviusCodData.course.course_modality ? this.dataPreviusCodData.course.course_modality : null);
|
|
3280
|
-
this.getAvailibleCourses();
|
|
3281
3252
|
}
|
|
3282
3253
|
setDataCodRenovationSelect() {
|
|
3283
3254
|
this.getAgreementByPlan(this.courseSelectRenovation.course_type?.academic_plan.code);
|
|
@@ -4793,7 +4764,6 @@ class CodFormComponent {
|
|
|
4793
4764
|
this.userRole = this.baseService.getUserRole();
|
|
4794
4765
|
}
|
|
4795
4766
|
ngOnChanges(changes) {
|
|
4796
|
-
console.log(this.courseSelect);
|
|
4797
4767
|
if (changes['editCod'] && this.dataFromPreviusCodData) {
|
|
4798
4768
|
if (this.editCod) {
|
|
4799
4769
|
if (!this.dataFromPreviusCodData.edit_course_payment) {
|
|
@@ -4970,7 +4940,6 @@ class CodFormComponent {
|
|
|
4970
4940
|
this.okCreatedCOD.emit(true);
|
|
4971
4941
|
}
|
|
4972
4942
|
else if (response.message.code === 3) {
|
|
4973
|
-
console.log(response.data);
|
|
4974
4943
|
let alertHtml = `
|
|
4975
4944
|
<div class="my-custom-alert">
|
|
4976
4945
|
<h2>Warning!</h2>
|