iptdevs-design-system 2.7.107 → 2.7.108

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.
@@ -3388,8 +3388,7 @@ class CodFormStepThreeComponent extends CodFormSteps {
3388
3388
  }
3389
3389
  // Eventos de los select
3390
3390
  selectNeedAtendant(needAtendant) {
3391
- console.log(needAtendant);
3392
- if (needAtendant !== 'Requiere acudiente') {
3391
+ if (needAtendant == 1) {
3393
3392
  this.codFormStepThree.controls['needAtendant'].setValue(needAtendant);
3394
3393
  }
3395
3394
  else {
@@ -3562,6 +3561,7 @@ class CodFormStepFourComponent extends CodFormSteps {
3562
3561
  if (response.data) {
3563
3562
  const codPrices = response.data;
3564
3563
  this.codPrices = codPrices;
3564
+ console.log(this.codPrices);
3565
3565
  if (this.codFormStepFour.controls['payment_method'].value === '2') {
3566
3566
  const aux = this.codPrices.filter(codPrice => codPrice.agreement === Number(agreementSelected))[0];
3567
3567
  this.codFormStepFour.controls['program_price'].setValue(aux.normal_price);
@@ -3705,6 +3705,9 @@ class CodFormStepFourComponent extends CodFormSteps {
3705
3705
  console.log(quotas);
3706
3706
  if (quotas !== 'Número de cuotas') {
3707
3707
  const codPrice = this.codPrices.filter(codPrice => codPrice.code === Number(quotas));
3708
+ console.log(codPrice[0].code);
3709
+ console.log(codPrice[0].enrollment);
3710
+ console.log(codPrice[0].financed_price);
3708
3711
  this.codFormStepFour.controls['quota_times'].setValue(codPrice[0].code);
3709
3712
  this.codFormStepFour.controls['total_price'].setValue(codPrice[0].enrollment);
3710
3713
  this.codFormStepFour.controls['program_price'].setValue(codPrice[0].financed_price);
@@ -3739,46 +3742,45 @@ class CodFormStepFiveComponent extends CodFormSteps {
3739
3742
  // Controls del formulario
3740
3743
  this.controls = new CodFormControls().controls[4];
3741
3744
  }
3742
- ngOnInit() {
3743
- console.log(this.initialData);
3744
- this.initForm();
3745
- this.getParameters();
3746
- this.startLocalStorageWork();
3747
- this.codFormStepFive.controls['terms'].valueChanges.subscribe(changes => {
3748
- this.termsCheckboxStatus = changes;
3749
- if (!this.termsCheckboxStatus)
3750
- this.errorMessage = 'Debe marcar la casilla de términos y condiciones.';
3751
- });
3752
- if (this.userRole === 30 || this.userRole === 31 || this.userRole === 32)
3753
- this.sendFormMsg = 'Editar COD'; // Roles Administrativos
3754
- if (this.userRole === 40 || this.userRole === 41 || this.userRole === 42)
3755
- this.sendFormMsg = 'Crear COD'; // Roles comerciales
3756
- if (this.initialData != null) {
3757
- this.setDataFromPreviusCod();
3758
- }
3759
- else {
3760
- console.log('No hay data cargada para el Paso 5');
3761
- }
3762
- }
3763
- // ngOnChanges(changes: SimpleChanges): void {
3745
+ // ngOnInit(): void {
3764
3746
  // console.log(this.initialData);
3765
3747
  // this.initForm();
3766
- // this.startLocalStorageWork();
3767
3748
  // this.getParameters();
3749
+ // this.startLocalStorageWork();
3768
3750
  // this.codFormStepFive.controls['terms'].valueChanges.subscribe(changes => {
3769
3751
  // this.termsCheckboxStatus = changes;
3770
3752
  // if (!this.termsCheckboxStatus) this.errorMessage = 'Debe marcar la casilla de términos y condiciones.'
3771
3753
  // })
3772
3754
  // if (this.userRole === 30 || this.userRole === 31 || this.userRole === 32) this.sendFormMsg = 'Editar COD'; // Roles Administrativos
3773
3755
  // if (this.userRole === 40 || this.userRole === 41 || this.userRole === 42) this.sendFormMsg = 'Crear COD'; // Roles comerciales
3774
- // if (changes['initialData']) {
3775
3756
  // if (this.initialData != null) {
3776
3757
  // this.setDataFromPreviusCod();
3777
3758
  // } else {
3778
3759
  // console.log('No hay data cargada para el Paso 5');
3779
3760
  // }
3780
- // }
3781
3761
  // }
3762
+ ngOnChanges(changes) {
3763
+ this.initForm();
3764
+ this.startLocalStorageWork();
3765
+ this.getParameters();
3766
+ this.codFormStepFive.controls['terms'].valueChanges.subscribe(changes => {
3767
+ this.termsCheckboxStatus = changes;
3768
+ if (!this.termsCheckboxStatus)
3769
+ this.errorMessage = 'Debe marcar la casilla de términos y condiciones.';
3770
+ });
3771
+ if (this.userRole === 30 || this.userRole === 31 || this.userRole === 32)
3772
+ this.sendFormMsg = 'Editar COD'; // Roles Administrativos
3773
+ if (this.userRole === 40 || this.userRole === 41 || this.userRole === 42)
3774
+ this.sendFormMsg = 'Crear COD'; // Roles comerciales
3775
+ if (changes['initialData']) {
3776
+ if (this.initialData != null) {
3777
+ this.setDataFromPreviusCod();
3778
+ }
3779
+ else {
3780
+ console.log('No hay data cargada para el Paso 5');
3781
+ }
3782
+ }
3783
+ }
3782
3784
  getParameters() {
3783
3785
  this.parameterService.getMarketingReasons().subscribe((response) => {
3784
3786
  this.marketingReasons = response.data;
@@ -3856,6 +3858,7 @@ class CodFormStepFiveComponent extends CodFormSteps {
3856
3858
  }
3857
3859
  cleanStorage() {
3858
3860
  sessionStorage.clear();
3861
+ this.startLocalStorageWork();
3859
3862
  }
3860
3863
  // Eventos del select
3861
3864
  selectMarketingReasons(marketingReasons) {
@@ -3883,7 +3886,7 @@ class CodFormStepFiveComponent extends CodFormSteps {
3883
3886
  }
3884
3887
  }
3885
3888
  CodFormStepFiveComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodFormStepFiveComponent, deps: [{ token: i1$1.FormBuilder }, { token: ParameterService }], target: i0.ɵɵFactoryTarget.Component });
3886
- CodFormStepFiveComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CodFormStepFiveComponent, selector: "app-cod-form-step-five", inputs: { userRole: "userRole", initialData: "initialData" }, outputs: { changeStepEvent: "changeStepEvent", action: "action" }, usesInheritance: true, ngImport: i0, template: "<form autocomplete=\"off\" [formGroup]=\"codFormStepFive\" class=\"grid\">\n <div class=\"col-12 md:col-6\">\n <ipt-select\n [control]=\"codFormStepFive.controls['marketing_reasons']\"\n [initialValue]=\"codFormStepFive.controls['marketing_reasons'].value\"\n (eventSelect)=\"selectMarketingReasons($event)\"\n [data]=\"marketingReasons\"\n [defaultText]=\"'\u00BFC\u00F3mo se enter\u00F3 del programa?'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Discapacidad'\"\n [control]=\"codFormStepFive.controls['disability']\"\n ></ipt-input>\n </div>\n <div class=\"col-12 md:col-6\">\n <ipt-select\n [control]=\"codFormStepFive.controls['study_reasons']\"\n [initialValue]=\"codFormStepFive.controls['study_reasons'].value\"\n (eventSelect)=\"selectStudyReasons($event)\"\n [data]=\"studyReasons\"\n [defaultText]=\"'Motivo'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'R\u00E9gimen de salud'\"\n [control]=\"codFormStepFive.controls['health_regimen']\"\n ></ipt-input>\n </div>\n <div class=\"col-12 mt-4\">\n <span class=\"p-float-label\">\n <textarea\n id=\"float-input\"\n rows=\"4\"\n cols=\"30\"\n pInputTextarea\n formControlName=\"observation\"\n ></textarea>\n <label for=\"float-input\">Observaciones</label>\n </span>\n <div class=\"flex flex-wrap justify-content-between gap-2\">\n <div *ngFor=\"let option of multiculturalities; index as i\" class=\"field-checkbox mt-4 flex align-items-center\">\n <mat-checkbox [formControlName]=\"'multiculturalism' + '_' + (i+1)\" class=\"example-margin\"></mat-checkbox>\n <label [for]=\"option.code\">{{ option.name }}</label>\n </div>\n </div>\n </div>\n\n <div class=\"col-12 p-4 font-bold\">\n <p>\n * El estudiante o titular se comprometen a cancelar las cuotas establecidas en este contrato, los\n primeros 5 (cinco) d\u00EDas del mes. En caso de querer retirarse, deber\u00E1 informar por escrito 30\n (treinta) d\u00EDas antes y cancelar lo correspondiente hasta la fecha definida de retiro, para poder\n obtener su paz y salvo.\n </p>\n <br><br>\n <div class=\"flex gap-2\">\n <mat-checkbox formControlName=\"terms\" class=\"example-margin\"></mat-checkbox>\n <!-- <p-checkbox [formControl]=\"getCheckboxControl()\"></p-checkbox> -->\n <!-- <ipt-checkbox [control]=\"codFormStepFive.controls['terms']\" [checkboxOption]=\"termsCheckboxStatus\"></ipt-checkbox> -->\n <p>\n DECLARO HABER LE\u00CDDO Y ACEPTO LOS T\u00C9RMINOS Y CONDICIONES DE LAS POL\u00CDTICAS ESTABLECIDAS EN LA\n INSTITUCI\u00D3N.\n </p>\n </div>\n </div>\n</form>\n\n<div class=\"flex mt-3 align-items-center gap-3\">\n <span *ngIf=\"(codFormStepFive.invalid && codFormStepFive.touched) || (!termsCheckboxStatus && codFormStepFive.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 type=\"submit\" class=\"ml-auto p-button-success p-button-sm\" (click)=\"sendForm()\" pButton [label]=\"sendFormMsg\" icon=\"pi pi-check\"></button>\n <button class=\"ml-auto p-button-danger p-button-sm\" (click)=\"cleanStorage()\" pButton label=\"Clean Storage\" icon=\"pi pi-check\"></button>\n</div>\n\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: InputComponent, selector: "ipt-input", inputs: ["inputType", "placeHolder", "validateText", "withPipe", "list", "iconUrl", "control", "prefix", "thousands", "decimal"], outputs: ["dateSelected"] }, { kind: "component", type: SelectComponent, selector: "ipt-select", inputs: ["isRequired", "data", "defaultText", "selectCode", "disabledSel", "initialValue", "control"], outputs: ["eventSelect"] }, { kind: "component", type: i6$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { 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: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: i8$1.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }] });
3889
+ CodFormStepFiveComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CodFormStepFiveComponent, selector: "app-cod-form-step-five", inputs: { userRole: "userRole", initialData: "initialData" }, outputs: { changeStepEvent: "changeStepEvent", action: "action" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<form autocomplete=\"off\" [formGroup]=\"codFormStepFive\" class=\"grid\">\n <div class=\"col-12 md:col-6\">\n <ipt-select\n [control]=\"codFormStepFive.controls['marketing_reasons']\"\n [initialValue]=\"codFormStepFive.controls['marketing_reasons'].value\"\n (eventSelect)=\"selectMarketingReasons($event)\"\n [data]=\"marketingReasons\"\n [defaultText]=\"'\u00BFC\u00F3mo se enter\u00F3 del programa?'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Discapacidad'\"\n [control]=\"codFormStepFive.controls['disability']\"\n ></ipt-input>\n </div>\n <div class=\"col-12 md:col-6\">\n <ipt-select\n [control]=\"codFormStepFive.controls['study_reasons']\"\n [initialValue]=\"codFormStepFive.controls['study_reasons'].value\"\n (eventSelect)=\"selectStudyReasons($event)\"\n [data]=\"studyReasons\"\n [defaultText]=\"'Motivo'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'R\u00E9gimen de salud'\"\n [control]=\"codFormStepFive.controls['health_regimen']\"\n ></ipt-input>\n </div>\n <div class=\"col-12 mt-4\">\n <span class=\"p-float-label\">\n <textarea\n id=\"float-input\"\n rows=\"4\"\n cols=\"30\"\n pInputTextarea\n formControlName=\"observation\"\n ></textarea>\n <label for=\"float-input\">Observaciones</label>\n </span>\n <div class=\"flex flex-wrap justify-content-between gap-2\">\n <div *ngFor=\"let option of multiculturalities; index as i\" class=\"field-checkbox mt-4 flex align-items-center\">\n <mat-checkbox [formControlName]=\"'multiculturalism' + '_' + (i+1)\" class=\"example-margin\"></mat-checkbox>\n <label [for]=\"option.code\">{{ option.name }}</label>\n </div>\n </div>\n </div>\n\n <div class=\"col-12 p-4 font-bold\">\n <p>\n * El estudiante o titular se comprometen a cancelar las cuotas establecidas en este contrato, los\n primeros 5 (cinco) d\u00EDas del mes. En caso de querer retirarse, deber\u00E1 informar por escrito 30\n (treinta) d\u00EDas antes y cancelar lo correspondiente hasta la fecha definida de retiro, para poder\n obtener su paz y salvo.\n </p>\n <br><br>\n <div class=\"flex gap-2\">\n <mat-checkbox formControlName=\"terms\" class=\"example-margin\"></mat-checkbox>\n <!-- <p-checkbox [formControl]=\"getCheckboxControl()\"></p-checkbox> -->\n <!-- <ipt-checkbox [control]=\"codFormStepFive.controls['terms']\" [checkboxOption]=\"termsCheckboxStatus\"></ipt-checkbox> -->\n <p>\n DECLARO HABER LE\u00CDDO Y ACEPTO LOS T\u00C9RMINOS Y CONDICIONES DE LAS POL\u00CDTICAS ESTABLECIDAS EN LA\n INSTITUCI\u00D3N.\n </p>\n </div>\n </div>\n</form>\n\n<div class=\"flex mt-3 align-items-center gap-3\">\n <span *ngIf=\"(codFormStepFive.invalid && codFormStepFive.touched) || (!termsCheckboxStatus && codFormStepFive.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 type=\"submit\" class=\"ml-auto p-button-success p-button-sm\" (click)=\"sendForm()\" pButton [label]=\"sendFormMsg\" icon=\"pi pi-check\"></button>\n <button class=\"ml-auto p-button-danger p-button-sm\" (click)=\"cleanStorage()\" pButton label=\"Clean Storage\" icon=\"pi pi-check\"></button>\n</div>\n\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: InputComponent, selector: "ipt-input", inputs: ["inputType", "placeHolder", "validateText", "withPipe", "list", "iconUrl", "control", "prefix", "thousands", "decimal"], outputs: ["dateSelected"] }, { kind: "component", type: SelectComponent, selector: "ipt-select", inputs: ["isRequired", "data", "defaultText", "selectCode", "disabledSel", "initialValue", "control"], outputs: ["eventSelect"] }, { kind: "component", type: i6$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { 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: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: i8$1.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }] });
3887
3890
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodFormStepFiveComponent, decorators: [{
3888
3891
  type: Component,
3889
3892
  args: [{ selector: 'app-cod-form-step-five', template: "<form autocomplete=\"off\" [formGroup]=\"codFormStepFive\" class=\"grid\">\n <div class=\"col-12 md:col-6\">\n <ipt-select\n [control]=\"codFormStepFive.controls['marketing_reasons']\"\n [initialValue]=\"codFormStepFive.controls['marketing_reasons'].value\"\n (eventSelect)=\"selectMarketingReasons($event)\"\n [data]=\"marketingReasons\"\n [defaultText]=\"'\u00BFC\u00F3mo se enter\u00F3 del programa?'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Discapacidad'\"\n [control]=\"codFormStepFive.controls['disability']\"\n ></ipt-input>\n </div>\n <div class=\"col-12 md:col-6\">\n <ipt-select\n [control]=\"codFormStepFive.controls['study_reasons']\"\n [initialValue]=\"codFormStepFive.controls['study_reasons'].value\"\n (eventSelect)=\"selectStudyReasons($event)\"\n [data]=\"studyReasons\"\n [defaultText]=\"'Motivo'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'R\u00E9gimen de salud'\"\n [control]=\"codFormStepFive.controls['health_regimen']\"\n ></ipt-input>\n </div>\n <div class=\"col-12 mt-4\">\n <span class=\"p-float-label\">\n <textarea\n id=\"float-input\"\n rows=\"4\"\n cols=\"30\"\n pInputTextarea\n formControlName=\"observation\"\n ></textarea>\n <label for=\"float-input\">Observaciones</label>\n </span>\n <div class=\"flex flex-wrap justify-content-between gap-2\">\n <div *ngFor=\"let option of multiculturalities; index as i\" class=\"field-checkbox mt-4 flex align-items-center\">\n <mat-checkbox [formControlName]=\"'multiculturalism' + '_' + (i+1)\" class=\"example-margin\"></mat-checkbox>\n <label [for]=\"option.code\">{{ option.name }}</label>\n </div>\n </div>\n </div>\n\n <div class=\"col-12 p-4 font-bold\">\n <p>\n * El estudiante o titular se comprometen a cancelar las cuotas establecidas en este contrato, los\n primeros 5 (cinco) d\u00EDas del mes. En caso de querer retirarse, deber\u00E1 informar por escrito 30\n (treinta) d\u00EDas antes y cancelar lo correspondiente hasta la fecha definida de retiro, para poder\n obtener su paz y salvo.\n </p>\n <br><br>\n <div class=\"flex gap-2\">\n <mat-checkbox formControlName=\"terms\" class=\"example-margin\"></mat-checkbox>\n <!-- <p-checkbox [formControl]=\"getCheckboxControl()\"></p-checkbox> -->\n <!-- <ipt-checkbox [control]=\"codFormStepFive.controls['terms']\" [checkboxOption]=\"termsCheckboxStatus\"></ipt-checkbox> -->\n <p>\n DECLARO HABER LE\u00CDDO Y ACEPTO LOS T\u00C9RMINOS Y CONDICIONES DE LAS POL\u00CDTICAS ESTABLECIDAS EN LA\n INSTITUCI\u00D3N.\n </p>\n </div>\n </div>\n</form>\n\n<div class=\"flex mt-3 align-items-center gap-3\">\n <span *ngIf=\"(codFormStepFive.invalid && codFormStepFive.touched) || (!termsCheckboxStatus && codFormStepFive.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 type=\"submit\" class=\"ml-auto p-button-success p-button-sm\" (click)=\"sendForm()\" pButton [label]=\"sendFormMsg\" icon=\"pi pi-check\"></button>\n <button class=\"ml-auto p-button-danger p-button-sm\" (click)=\"cleanStorage()\" pButton label=\"Clean Storage\" icon=\"pi pi-check\"></button>\n</div>\n\n" }]