iptdevs-design-system 3.1.426 → 3.1.427

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.
@@ -6320,17 +6320,18 @@ class CodSelfFormStepOneComponent extends CodSelfManagedSteps {
6320
6320
  this.errorMessage = 'Faltan campos por llenar.';
6321
6321
  this.controls = new CodSelfManagedControls().controls[0];
6322
6322
  }
6323
- // ngOnInit(): void {
6324
- // this.setDataUsers();
6325
- // }
6326
6323
  ngOnChanges(changes) {
6327
6324
  this.initForm();
6328
6325
  this.getParameters();
6329
6326
  this.startLocalStorageWork();
6330
6327
  // this.setDataUsers();
6331
- if (changes['user'] && this.user != null) {
6332
- this.setDataUsers();
6333
- this.cdRef.detectChanges();
6328
+ if (changes['user']) {
6329
+ if (this.user != null) {
6330
+ this.setDataUsers();
6331
+ this.cdRef.detectChanges();
6332
+ }
6333
+ else {
6334
+ }
6334
6335
  }
6335
6336
  }
6336
6337
  initForm() {
@@ -6435,7 +6436,7 @@ class CodSelfFormStepOneComponent extends CodSelfManagedSteps {
6435
6436
  }
6436
6437
  selectState(state) {
6437
6438
  if (state !== 'Departamento o estado') {
6438
- // this.getState(state);
6439
+ this.getState(state);
6439
6440
  this.codSelfFormStepOne.controls['state'].setValue(state);
6440
6441
  }
6441
6442
  else {
@@ -6488,8 +6489,8 @@ class CodSelfFormStepOneComponent extends CodSelfManagedSteps {
6488
6489
  }
6489
6490
  getCity(state) {
6490
6491
  this.parameterService.getCitiesByState(state).subscribe((response) => {
6491
- this.selectCity(this.localStorageCOD.getCodFormData(1, 'city'));
6492
6492
  this.cities = response.data;
6493
+ this.selectCity(this.localStorageCOD.getCodFormData(1, 'city'));
6493
6494
  });
6494
6495
  }
6495
6496
  startLocalStorageWork() {
@@ -6518,27 +6519,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
6518
6519
  }] } });
6519
6520
 
6520
6521
  class CodSelfFormStepTwoComponent extends CodSelfManagedSteps {
6521
- constructor() {
6522
+ constructor(fb, cdRef) {
6522
6523
  super();
6524
+ this.fb = fb;
6525
+ this.cdRef = cdRef;
6523
6526
  this.completed = new EventEmitter();
6527
+ this.controls = new CodSelfManagedControls().controls[1];
6528
+ }
6529
+ ngOnChanges() {
6530
+ this.startLocalStorageWork();
6531
+ }
6532
+ initForm() {
6533
+ this.codSelfFormStepTwo = this.fb.group({
6534
+ academic_plan: ['', [Validators.required]],
6535
+ course_type: ['', [Validators.required]],
6536
+ agreement_by_category: ['', [Validators.required],],
6537
+ english_level: [{ value: '', disabled: true }, [Validators.required, Validators.minLength(5), Validators.maxLength(20)]],
6538
+ availible_courses: ['', [Validators.required]],
6539
+ course_modality: ['', [Validators.required],],
6540
+ });
6524
6541
  }
6525
6542
  back() {
6526
6543
  // Movernos al paso anterior
6527
6544
  this.completed.emit(0);
6528
6545
  }
6529
6546
  sendForm() {
6530
- // this.codSelfFormStepOne.markAllAsTouched();
6531
- // if (this.codSelfFormStepOne.invalid) return;
6547
+ // this.codSelfFormStepTwo.markAllAsTouched();
6548
+ // if (this.codSelfFormStepTwo.invalid) return;
6532
6549
  // Movernos al paso 3
6533
6550
  this.completed.emit(2);
6534
6551
  }
6552
+ startLocalStorageWork() {
6553
+ this.controls.forEach(control => {
6554
+ let localStorageValue = this.readAndWriteLS(2, control.name);
6555
+ this.codSelfFormStepTwo.controls[control.name].setValue(localStorageValue.value);
6556
+ this.listenFormChanges(2, control.name, this.codSelfFormStepTwo.controls[control.name].valueChanges);
6557
+ });
6558
+ }
6535
6559
  }
6536
- CodSelfFormStepTwoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodSelfFormStepTwoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6537
- CodSelfFormStepTwoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CodSelfFormStepTwoComponent, selector: "app-cod-self-form-step-two", outputs: { completed: "completed" }, usesInheritance: true, ngImport: i0, template: "<span>step 2</span>\n\n\n<div class=\"flex mt-3 align-items-center gap-3\">\n <!-- <span *ngIf=\"codSelfFormStepOne.invalid && codSelfFormStepOne.touched\" class=\"text-red-500 font-bold text-center mt-1 py-2 bg-red-100 w-full border-round-xl\">{{ errorMessage }}</span> -->\n <button\n pButton\n icon=\"pi pi-arrow-left\"\n type=\"submit\"\n (click)=\"back()\"\n ></button>\n\n <button\n pButton\n icon=\"pi pi-arrow-right\"\n type=\"submit\"\n (click)=\"sendForm()\"\n ></button>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i7$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }] });
6560
+ CodSelfFormStepTwoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodSelfFormStepTwoComponent, deps: [{ token: i1$1.FormBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
6561
+ CodSelfFormStepTwoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CodSelfFormStepTwoComponent, selector: "app-cod-self-form-step-two", outputs: { completed: "completed" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"container-main\">\n <span>step 2</span>\n\n <form [formGroup]=\"codSelfFormStepTwo\">\n </form>\n <div class=\"flex mt-3 align-items-center gap-3\">\n <!-- <span *ngIf=\"codSelfFormStepOne.invalid && codSelfFormStepOne.touched\" class=\"text-red-500 font-bold text-center mt-1 py-2 bg-red-100 w-full border-round-xl\">{{ errorMessage }}</span> -->\n <button\n pButton\n icon=\"pi pi-arrow-left\"\n type=\"submit\"\n (click)=\"back()\"\n ></button>\n\n <button\n pButton\n icon=\"pi pi-arrow-right\"\n type=\"submit\"\n (click)=\"sendForm()\"\n ></button>\n </div>\n\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i7$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }] });
6538
6562
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodSelfFormStepTwoComponent, decorators: [{
6539
6563
  type: Component,
6540
- args: [{ selector: 'app-cod-self-form-step-two', template: "<span>step 2</span>\n\n\n<div class=\"flex mt-3 align-items-center gap-3\">\n <!-- <span *ngIf=\"codSelfFormStepOne.invalid && codSelfFormStepOne.touched\" class=\"text-red-500 font-bold text-center mt-1 py-2 bg-red-100 w-full border-round-xl\">{{ errorMessage }}</span> -->\n <button\n pButton\n icon=\"pi pi-arrow-left\"\n type=\"submit\"\n (click)=\"back()\"\n ></button>\n\n <button\n pButton\n icon=\"pi pi-arrow-right\"\n type=\"submit\"\n (click)=\"sendForm()\"\n ></button>\n</div>\n" }]
6541
- }], ctorParameters: function () { return []; }, propDecorators: { completed: [{
6564
+ args: [{ selector: 'app-cod-self-form-step-two', template: "<div class=\"container-main\">\n <span>step 2</span>\n\n <form [formGroup]=\"codSelfFormStepTwo\">\n </form>\n <div class=\"flex mt-3 align-items-center gap-3\">\n <!-- <span *ngIf=\"codSelfFormStepOne.invalid && codSelfFormStepOne.touched\" class=\"text-red-500 font-bold text-center mt-1 py-2 bg-red-100 w-full border-round-xl\">{{ errorMessage }}</span> -->\n <button\n pButton\n icon=\"pi pi-arrow-left\"\n type=\"submit\"\n (click)=\"back()\"\n ></button>\n\n <button\n pButton\n icon=\"pi pi-arrow-right\"\n type=\"submit\"\n (click)=\"sendForm()\"\n ></button>\n </div>\n\n</div>\n" }]
6565
+ }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { completed: [{
6542
6566
  type: Output
6543
6567
  }] } });
6544
6568