iptdevs-design-system 3.1.152 → 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.
@@ -874,6 +874,11 @@ class UserService extends IPTGeneralService {
874
874
  this.generateRequestParams(params);
875
875
  return this.http.post(serviceUrl, this.httpOptions);
876
876
  }
877
+ obtainStudentOrUserEktByConcept(params) {
878
+ let serviceUrl = this.SERVICE_URL + 'post/obtain/students/by/type/concept/in/payments';
879
+ this.generateRequestParams(params);
880
+ return this.http.post(serviceUrl, this.httpOptions);
881
+ }
877
882
  }
878
883
  UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: UserService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
879
884
  UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: UserService, providedIn: 'root' });
@@ -3293,10 +3298,30 @@ class CodFormStepTwoComponent extends CodFormSteps {
3293
3298
  this.getParameters();
3294
3299
  if (changes['initialData']) {
3295
3300
  if (this.initialData != null) {
3296
- this.setDataFromPreviusCod();
3301
+ if (this.initialData.userStudent[0] != null) {
3302
+ this.setDataFromUserHistory();
3303
+ }
3304
+ else {
3305
+ this.setDataFromPreviusCod();
3306
+ }
3297
3307
  }
3298
3308
  }
3299
3309
  }
3310
+ setDataFromUserHistory() {
3311
+ this.codFormStepTwo.controls['student_name'].setValue(this.initialData.student.name);
3312
+ this.codFormStepTwo.controls['student_last_name'].setValue(this.initialData.student.last_name);
3313
+ this.codFormStepTwo.controls['student_id_card_type'].setValue(this.initialData.student.id_card_type);
3314
+ this.codFormStepTwo.controls['student_id_card'].setValue(this.initialData.student.id_card);
3315
+ this.codFormStepTwo.controls['country'].setValue(this.initialData.student.city[0].country);
3316
+ this.codFormStepTwo.controls['state'].setValue(this.initialData.student.city[0].state);
3317
+ this.codFormStepTwo.controls['city'].setValue(this.initialData.student.city[0].code);
3318
+ this.codFormStepTwo.controls['gender'].setValue(this.initialData.student.gender);
3319
+ this.codFormStepTwo.controls['nickname'].setValue(this.initialData.student.nick_name);
3320
+ this.codFormStepTwo.controls['student_phone_indicative'].setValue(this.initialData.student.phone_indicative);
3321
+ this.codFormStepTwo.controls['student_phone_number'].setValue(this.initialData.student.phone_number);
3322
+ this.codFormStepTwo.controls['birthdate'].setValue(this.initialData.student.birthdate);
3323
+ this.codFormStepTwo.controls['student_email'].setValue(this.initialData.student.email);
3324
+ }
3300
3325
  setDataFromPreviusCod() {
3301
3326
  this.codFormStepTwo.controls['student_name'].setValue(this.initialData.student.name);
3302
3327
  this.codFormStepTwo.controls['student_last_name'].setValue(this.initialData.student.last_name);
@@ -3574,7 +3599,12 @@ class CodFormStepThreeComponent extends CodFormSteps {
3574
3599
  if (this.initialData != null) {
3575
3600
  if (this.initialData.parent != null) {
3576
3601
  this.selectNeedAtendant(1);
3577
- this.setValueStepThree();
3602
+ if (this.initialData.userStudent[0] != null) {
3603
+ this.setDataFromUserHistory();
3604
+ }
3605
+ else {
3606
+ this.setValueStepThree();
3607
+ }
3578
3608
  }
3579
3609
  else {
3580
3610
  //this.cleanComponent();
@@ -3678,6 +3708,16 @@ class CodFormStepThreeComponent extends CodFormSteps {
3678
3708
  this.codFormStepThree.controls['parent_phone_number'].setValue(this.initialData.parent.phone_number);
3679
3709
  this.codFormStepThree.controls['parent_address'].setValue(this.initialData.parent.office_adrress);
3680
3710
  }
3711
+ setDataFromUserHistory() {
3712
+ this.codFormStepThree.controls['parent_id_card_type'].setValue(null);
3713
+ this.codFormStepThree.controls['parent_id_card'].setValue(null);
3714
+ this.codFormStepThree.controls['parent_last_name'].setValue(null);
3715
+ this.codFormStepThree.controls['parent_name'].setValue(null);
3716
+ this.codFormStepThree.controls['parent_phone_indicative'].setValue(null);
3717
+ this.codFormStepThree.controls['parent_occupation'].setValue(null);
3718
+ this.codFormStepThree.controls['parent_phone_number'].setValue(null);
3719
+ this.codFormStepThree.controls['parent_address'].setValue(null);
3720
+ }
3681
3721
  updateValueAndValidity() {
3682
3722
  this.codFormStepThree.controls['parent_id_card_type'].updateValueAndValidity();
3683
3723
  this.codFormStepThree.controls['parent_id_card'].updateValueAndValidity();
@@ -4272,7 +4312,12 @@ class CodFormStepFiveComponent extends CodFormSteps {
4272
4312
  this.sendFormMsg = 'Crear COD'; // Roles comerciales
4273
4313
  if (changes['initialData']) {
4274
4314
  if (this.initialData != null) {
4275
- this.setDataFromPreviusCod();
4315
+ if (this.initialData.userStudent[0] != null) {
4316
+ this.setDataFromUserHistory();
4317
+ }
4318
+ else {
4319
+ this.setDataFromPreviusCod();
4320
+ }
4276
4321
  }
4277
4322
  }
4278
4323
  }
@@ -4385,6 +4430,14 @@ class CodFormStepFiveComponent extends CodFormSteps {
4385
4430
  this.codFormStepFive.controls['observation'].setValue(this.initialData.aditional_information.observation);
4386
4431
  this.codFormStepFive.controls['code_refers'].setValue(this.initialData.aditional_information.code_refers);
4387
4432
  }
4433
+ setDataFromUserHistory() {
4434
+ this.codFormStepFive.controls['marketing_reasons'].setValue(null);
4435
+ this.codFormStepFive.controls['study_reasons'].setValue(null);
4436
+ this.codFormStepFive.controls['disability'].setValue(null);
4437
+ this.codFormStepFive.controls['health_regimen'].setValue(null);
4438
+ this.codFormStepFive.controls['observation'].setValue(null);
4439
+ this.codFormStepFive.controls['code_refers'].setValue(null);
4440
+ }
4388
4441
  cleanComponent() {
4389
4442
  this.resetLocalStorage(this.controls);
4390
4443
  this.codFormStepFive.reset();