iptdevs-design-system 3.1.153 → 3.1.154
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-five/cod-form-step-five.component.mjs +15 -2
- package/esm2020/lib/cod/steps/cod-form-step-three/cod-form-step-three.component.mjs +17 -2
- package/esm2020/lib/cod/steps/cod-form-step-two/cod-form-step-two.component.mjs +22 -2
- package/fesm2015/iptdevs-design-system.mjs +51 -3
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +51 -3
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/lib/cod/steps/cod-form-step-five/cod-form-step-five.component.d.ts +1 -0
- package/lib/cod/steps/cod-form-step-three/cod-form-step-three.component.d.ts +1 -0
- package/lib/cod/steps/cod-form-step-two/cod-form-step-two.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3301,10 +3301,30 @@ class CodFormStepTwoComponent extends CodFormSteps {
|
|
|
3301
3301
|
this.getParameters();
|
|
3302
3302
|
if (changes['initialData']) {
|
|
3303
3303
|
if (this.initialData != null) {
|
|
3304
|
-
this.
|
|
3304
|
+
if (this.initialData.userStudent[0] != null) {
|
|
3305
|
+
this.setDataFromUserHistory();
|
|
3306
|
+
}
|
|
3307
|
+
else {
|
|
3308
|
+
this.setDataFromPreviusCod();
|
|
3309
|
+
}
|
|
3305
3310
|
}
|
|
3306
3311
|
}
|
|
3307
3312
|
}
|
|
3313
|
+
setDataFromUserHistory() {
|
|
3314
|
+
this.codFormStepTwo.controls['student_name'].setValue(this.initialData.student.name);
|
|
3315
|
+
this.codFormStepTwo.controls['student_last_name'].setValue(this.initialData.student.last_name);
|
|
3316
|
+
this.codFormStepTwo.controls['student_id_card_type'].setValue(this.initialData.student.id_card_type);
|
|
3317
|
+
this.codFormStepTwo.controls['student_id_card'].setValue(this.initialData.student.id_card);
|
|
3318
|
+
this.codFormStepTwo.controls['country'].setValue(this.initialData.student.city[0].country);
|
|
3319
|
+
this.codFormStepTwo.controls['state'].setValue(this.initialData.student.city[0].state);
|
|
3320
|
+
this.codFormStepTwo.controls['city'].setValue(this.initialData.student.city[0].code);
|
|
3321
|
+
this.codFormStepTwo.controls['gender'].setValue(this.initialData.student.gender);
|
|
3322
|
+
this.codFormStepTwo.controls['nickname'].setValue(this.initialData.student.nick_name);
|
|
3323
|
+
this.codFormStepTwo.controls['student_phone_indicative'].setValue(this.initialData.student.phone_indicative);
|
|
3324
|
+
this.codFormStepTwo.controls['student_phone_number'].setValue(this.initialData.student.phone_number);
|
|
3325
|
+
this.codFormStepTwo.controls['birthdate'].setValue(this.initialData.student.birthdate);
|
|
3326
|
+
this.codFormStepTwo.controls['student_email'].setValue(this.initialData.student.email);
|
|
3327
|
+
}
|
|
3308
3328
|
setDataFromPreviusCod() {
|
|
3309
3329
|
this.codFormStepTwo.controls['student_name'].setValue(this.initialData.student.name);
|
|
3310
3330
|
this.codFormStepTwo.controls['student_last_name'].setValue(this.initialData.student.last_name);
|
|
@@ -3582,7 +3602,12 @@ class CodFormStepThreeComponent extends CodFormSteps {
|
|
|
3582
3602
|
if (this.initialData != null) {
|
|
3583
3603
|
if (this.initialData.parent != null) {
|
|
3584
3604
|
this.selectNeedAtendant(1);
|
|
3585
|
-
this.
|
|
3605
|
+
if (this.initialData.userStudent[0] != null) {
|
|
3606
|
+
this.setDataFromUserHistory();
|
|
3607
|
+
}
|
|
3608
|
+
else {
|
|
3609
|
+
this.setValueStepThree();
|
|
3610
|
+
}
|
|
3586
3611
|
}
|
|
3587
3612
|
else {
|
|
3588
3613
|
//this.cleanComponent();
|
|
@@ -3686,6 +3711,16 @@ class CodFormStepThreeComponent extends CodFormSteps {
|
|
|
3686
3711
|
this.codFormStepThree.controls['parent_phone_number'].setValue(this.initialData.parent.phone_number);
|
|
3687
3712
|
this.codFormStepThree.controls['parent_address'].setValue(this.initialData.parent.office_adrress);
|
|
3688
3713
|
}
|
|
3714
|
+
setDataFromUserHistory() {
|
|
3715
|
+
this.codFormStepThree.controls['parent_id_card_type'].setValue(null);
|
|
3716
|
+
this.codFormStepThree.controls['parent_id_card'].setValue(null);
|
|
3717
|
+
this.codFormStepThree.controls['parent_last_name'].setValue(null);
|
|
3718
|
+
this.codFormStepThree.controls['parent_name'].setValue(null);
|
|
3719
|
+
this.codFormStepThree.controls['parent_phone_indicative'].setValue(null);
|
|
3720
|
+
this.codFormStepThree.controls['parent_occupation'].setValue(null);
|
|
3721
|
+
this.codFormStepThree.controls['parent_phone_number'].setValue(null);
|
|
3722
|
+
this.codFormStepThree.controls['parent_address'].setValue(null);
|
|
3723
|
+
}
|
|
3689
3724
|
updateValueAndValidity() {
|
|
3690
3725
|
this.codFormStepThree.controls['parent_id_card_type'].updateValueAndValidity();
|
|
3691
3726
|
this.codFormStepThree.controls['parent_id_card'].updateValueAndValidity();
|
|
@@ -4281,7 +4316,12 @@ class CodFormStepFiveComponent extends CodFormSteps {
|
|
|
4281
4316
|
this.sendFormMsg = 'Crear COD'; // Roles comerciales
|
|
4282
4317
|
if (changes['initialData']) {
|
|
4283
4318
|
if (this.initialData != null) {
|
|
4284
|
-
this.
|
|
4319
|
+
if (this.initialData.userStudent[0] != null) {
|
|
4320
|
+
this.setDataFromUserHistory();
|
|
4321
|
+
}
|
|
4322
|
+
else {
|
|
4323
|
+
this.setDataFromPreviusCod();
|
|
4324
|
+
}
|
|
4285
4325
|
}
|
|
4286
4326
|
}
|
|
4287
4327
|
}
|
|
@@ -4394,6 +4434,14 @@ class CodFormStepFiveComponent extends CodFormSteps {
|
|
|
4394
4434
|
this.codFormStepFive.controls['observation'].setValue(this.initialData.aditional_information.observation);
|
|
4395
4435
|
this.codFormStepFive.controls['code_refers'].setValue(this.initialData.aditional_information.code_refers);
|
|
4396
4436
|
}
|
|
4437
|
+
setDataFromUserHistory() {
|
|
4438
|
+
this.codFormStepFive.controls['marketing_reasons'].setValue(null);
|
|
4439
|
+
this.codFormStepFive.controls['study_reasons'].setValue(null);
|
|
4440
|
+
this.codFormStepFive.controls['disability'].setValue(null);
|
|
4441
|
+
this.codFormStepFive.controls['health_regimen'].setValue(null);
|
|
4442
|
+
this.codFormStepFive.controls['observation'].setValue(null);
|
|
4443
|
+
this.codFormStepFive.controls['code_refers'].setValue(null);
|
|
4444
|
+
}
|
|
4397
4445
|
cleanComponent() {
|
|
4398
4446
|
this.resetLocalStorage(this.controls);
|
|
4399
4447
|
this.codFormStepFive.reset();
|