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
|
@@ -3186,11 +3186,6 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3186
3186
|
Nota: la clase CodFormSteps() se encarga de toda la lógica de LS con los pasos del formulario del COD
|
|
3187
3187
|
*/
|
|
3188
3188
|
ngOnChanges(changes) {
|
|
3189
|
-
console.log("initialData", this.initialData);
|
|
3190
|
-
console.log("dataPreviusCodData", this.dataPreviusCodData);
|
|
3191
|
-
console.log("courseSelectRenovation", this.courseSelectRenovation);
|
|
3192
|
-
console.log("isEditCod", this.isEditCod);
|
|
3193
|
-
console.log("isRenovation", this.isRenovation);
|
|
3194
3189
|
this.getParameters();
|
|
3195
3190
|
this.initForm();
|
|
3196
3191
|
this.startLocalStorageWork();
|
|
@@ -3198,11 +3193,19 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3198
3193
|
this.codFormStepOne.controls['course_type'].valueChanges
|
|
3199
3194
|
.subscribe(value => this.communicatorService.setCurrentCourseType(value));
|
|
3200
3195
|
this.communicatorService.setCurrentAgreement(this.localStorageCOD.getCodFormData(1, 'agreement_by_category'));
|
|
3201
|
-
if (changes['initialData'] && this.initialData != null && this.dataPreviusCodData === null && this.isEditCod === false && this.isRenovation === false) {
|
|
3196
|
+
if (changes['initialData'] && this.initialData != null && this.dataPreviusCodData === null || this.dataPreviusCodData != null && this.isEditCod === false && this.isRenovation === false) {
|
|
3202
3197
|
this.processData(this.initialData);
|
|
3203
3198
|
this.cdRef.detectChanges();
|
|
3204
3199
|
}
|
|
3205
|
-
else
|
|
3200
|
+
else {
|
|
3201
|
+
this.codFormStepOne.controls['academic_plan'].setValue(null);
|
|
3202
|
+
this.codFormStepOne.controls['course_type'].setValue(null);
|
|
3203
|
+
this.codFormStepOne.controls['agreement_by_category'].setValue(null);
|
|
3204
|
+
this.codFormStepOne.controls['english_level'].setValue(null);
|
|
3205
|
+
this.codFormStepOne.controls['availible_courses'].setValue(null);
|
|
3206
|
+
this.codFormStepOne.controls['course_modality'].setValue(null);
|
|
3207
|
+
}
|
|
3208
|
+
if (changes['dataPreviusCodData'] && this.dataPreviusCodData != null && this.isEditCod && this.isRenovation === false) {
|
|
3206
3209
|
this.processData(this.dataPreviusCodData);
|
|
3207
3210
|
if (this.isEditCod && !this.dataPreviusCodData.edit_course_payment) {
|
|
3208
3211
|
this.isDisabledSel = true;
|
|
@@ -3210,80 +3213,46 @@ class CodFormStepOneComponent extends CodFormSteps {
|
|
|
3210
3213
|
else {
|
|
3211
3214
|
this.isDisabledSel = false;
|
|
3212
3215
|
}
|
|
3213
|
-
// if (this.isDisabledSel) {
|
|
3214
|
-
// this.disableFormControls();
|
|
3215
|
-
// }
|
|
3216
|
-
// Forzar detección de cambios
|
|
3217
3216
|
this.cdRef.detectChanges();
|
|
3218
3217
|
}
|
|
3219
3218
|
else if (changes['dataPreviusCodData'] && this.dataPreviusCodData != null && !this.isEditCod && this.courseSelectRenovation && this.isRenovation === true) {
|
|
3220
3219
|
this.setDataCodRenovationSelect();
|
|
3221
3220
|
this.isDisabledSel = true;
|
|
3222
|
-
// this.disableFormControls();
|
|
3223
3221
|
this.cdRef.detectChanges();
|
|
3224
3222
|
}
|
|
3225
|
-
else {
|
|
3226
|
-
console.log("llegue aqui por alguna razon del la condicion 2");
|
|
3227
|
-
this.codFormStepOne.controls['academic_plan'].setValue(null);
|
|
3228
|
-
this.codFormStepOne.controls['course_type'].setValue(null);
|
|
3229
|
-
this.codFormStepOne.controls['agreement_by_category'].setValue(null);
|
|
3230
|
-
this.codFormStepOne.controls['english_level'].setValue(null);
|
|
3231
|
-
this.codFormStepOne.controls['availible_courses'].setValue(null);
|
|
3232
|
-
this.codFormStepOne.controls['course_modality'].setValue(null);
|
|
3233
|
-
// this.cdRef.detectChanges();
|
|
3234
|
-
}
|
|
3235
3223
|
}
|
|
3236
|
-
// private disableFormControls() {
|
|
3237
|
-
// this.codFormStepOne.controls['academic_plan'].disable();
|
|
3238
|
-
// this.codFormStepOne.controls['course_type'].disable();
|
|
3239
|
-
// this.codFormStepOne.controls['agreement_by_category'].disable();
|
|
3240
|
-
// this.codFormStepOne.controls['english_level'].disable();
|
|
3241
|
-
// this.codFormStepOne.controls['availible_courses'].disable();
|
|
3242
|
-
// this.codFormStepOne.controls['course_modality'].disable();
|
|
3243
|
-
// }
|
|
3244
3224
|
processData(data) {
|
|
3245
|
-
var _a, _b, _c, _d;
|
|
3246
|
-
console.log("llegue aqui en processData");
|
|
3225
|
+
var _a, _b, _c, _d, _e, _f;
|
|
3247
3226
|
const { codFormStepOne } = this;
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
codFormStepOne.controls['english_level'].setValue((
|
|
3251
|
-
codFormStepOne.controls['agreement_by_category'].setValue((
|
|
3252
|
-
codFormStepOne.controls['course_type'].setValue((
|
|
3253
|
-
codFormStepOne.controls['academic_plan'].setValue((
|
|
3254
|
-
|
|
3227
|
+
this.getAgreementByPlan((_a = data.course_type) === null || _a === void 0 ? void 0 : _a.academic_plan.code);
|
|
3228
|
+
this.getCourseType((_b = data.course_type) === null || _b === void 0 ? void 0 : _b.academic_plan.code);
|
|
3229
|
+
codFormStepOne.controls['english_level'].setValue((_c = data.english_level) === null || _c === void 0 ? void 0 : _c.code);
|
|
3230
|
+
codFormStepOne.controls['agreement_by_category'].setValue((_d = data.agreement) === null || _d === void 0 ? void 0 : _d.code);
|
|
3231
|
+
codFormStepOne.controls['course_type'].setValue((_e = data.course_type) === null || _e === void 0 ? void 0 : _e.code);
|
|
3232
|
+
codFormStepOne.controls['academic_plan'].setValue((_f = data.course_type) === null || _f === void 0 ? void 0 : _f.academic_plan.code);
|
|
3233
|
+
this.getAvailibleCourses();
|
|
3255
3234
|
if (this.isEditCod) {
|
|
3256
|
-
console.log("llegue aqui setDataFromEditCodHistory");
|
|
3257
3235
|
this.setDataFromEditCodHistory();
|
|
3258
3236
|
}
|
|
3259
3237
|
else if (!this.isEditCod && this.initialData != null) {
|
|
3260
|
-
console.log("llegue aqui2");
|
|
3261
3238
|
this.setDataFromUserHistory();
|
|
3262
3239
|
}
|
|
3263
3240
|
}
|
|
3264
3241
|
setDataFromUserHistory() {
|
|
3265
|
-
var _a, _b;
|
|
3266
|
-
this.getAgreementByPlan((_a = this.initialData.course_type) === null || _a === void 0 ? void 0 : _a.academic_plan.code);
|
|
3267
|
-
this.getCourseType((_b = this.initialData.course_type) === null || _b === void 0 ? void 0 : _b.academic_plan.code);
|
|
3268
3242
|
this.codFormStepOne.controls['academic_plan'].setValue(this.initialData.course_type.academic_plan.code);
|
|
3269
3243
|
this.codFormStepOne.controls['course_type'].setValue(this.initialData.course_type.code);
|
|
3270
3244
|
this.codFormStepOne.controls['agreement_by_category'].setValue(this.initialData.agreement.code);
|
|
3271
3245
|
this.codFormStepOne.controls['english_level'].setValue(this.initialData.english_level.code);
|
|
3272
3246
|
this.codFormStepOne.controls['availible_courses'].setValue(this.initialData.code);
|
|
3273
3247
|
this.codFormStepOne.controls['course_modality'].setValue(this.initialData.course_modality.code);
|
|
3274
|
-
this.getAvailibleCourses();
|
|
3275
3248
|
}
|
|
3276
3249
|
setDataFromEditCodHistory() {
|
|
3277
|
-
var _a, _b;
|
|
3278
|
-
this.getAgreementByPlan((_a = this.dataPreviusCodData.course_type) === null || _a === void 0 ? void 0 : _a.academic_plan.code);
|
|
3279
|
-
this.getCourseType((_b = this.dataPreviusCodData.course_type) === null || _b === void 0 ? void 0 : _b.academic_plan.code);
|
|
3280
3250
|
this.codFormStepOne.controls['academic_plan'].setValue(this.dataPreviusCodData.course_type.academic_plan.code ? this.dataPreviusCodData.course_type.academic_plan.code : null);
|
|
3281
3251
|
this.codFormStepOne.controls['course_type'].setValue(this.dataPreviusCodData.course_type.code ? this.dataPreviusCodData.course_type.code : null);
|
|
3282
3252
|
this.codFormStepOne.controls['agreement_by_category'].setValue(this.dataPreviusCodData.agreement.code ? this.dataPreviusCodData.agreement.code : null);
|
|
3283
3253
|
this.codFormStepOne.controls['english_level'].setValue(this.dataPreviusCodData.english_level.code ? this.dataPreviusCodData.english_level.code : null);
|
|
3284
3254
|
this.codFormStepOne.controls['availible_courses'].setValue(this.dataPreviusCodData.course.code ? this.dataPreviusCodData.course.code : null);
|
|
3285
3255
|
this.codFormStepOne.controls['course_modality'].setValue(this.dataPreviusCodData.course.course_modality ? this.dataPreviusCodData.course.course_modality : null);
|
|
3286
|
-
this.getAvailibleCourses();
|
|
3287
3256
|
}
|
|
3288
3257
|
setDataCodRenovationSelect() {
|
|
3289
3258
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
@@ -4805,7 +4774,6 @@ class CodFormComponent {
|
|
|
4805
4774
|
}
|
|
4806
4775
|
ngOnChanges(changes) {
|
|
4807
4776
|
var _a;
|
|
4808
|
-
console.log(this.courseSelect);
|
|
4809
4777
|
if (changes['editCod'] && this.dataFromPreviusCodData) {
|
|
4810
4778
|
if (this.editCod) {
|
|
4811
4779
|
if (!this.dataFromPreviusCodData.edit_course_payment) {
|
|
@@ -4982,7 +4950,6 @@ class CodFormComponent {
|
|
|
4982
4950
|
this.okCreatedCOD.emit(true);
|
|
4983
4951
|
}
|
|
4984
4952
|
else if (response.message.code === 3) {
|
|
4985
|
-
console.log(response.data);
|
|
4986
4953
|
let alertHtml = `
|
|
4987
4954
|
<div class="my-custom-alert">
|
|
4988
4955
|
<h2>Warning!</h2>
|