iptdevs-design-system 2.7.108 → 2.7.110

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.
@@ -2957,14 +2957,6 @@ class CodFormStepTwoComponent extends CodFormSteps {
2957
2957
  // Controls del formulario
2958
2958
  this.controls = new CodFormControls().controls[1];
2959
2959
  }
2960
- // ngOnInit(): void {
2961
- // this.initForm();
2962
- // this.startLocalStorageWork();
2963
- // this.validateErrors()
2964
- // if (this.initialData) this.setDataFromPreviusCod();
2965
- // this.getParameters();
2966
- // this.selectCountry(this.localStorageCOD.getCodFormData(2, 'country'));
2967
- // }
2968
2960
  ngOnChanges(changes) {
2969
2961
  this.initForm();
2970
2962
  this.startLocalStorageWork();
@@ -2975,6 +2967,7 @@ class CodFormStepTwoComponent extends CodFormSteps {
2975
2967
  this.setDataFromPreviusCod();
2976
2968
  }
2977
2969
  else {
2970
+ this.cleanComponent();
2978
2971
  console.log('No hay data cargada para el Paso 2');
2979
2972
  }
2980
2973
  }
@@ -3000,6 +2993,7 @@ class CodFormStepTwoComponent extends CodFormSteps {
3000
2993
  this.codFormStepTwo.controls['student_email'].setValue(this.initialData.student.email);
3001
2994
  }
3002
2995
  cleanComponent() {
2996
+ this.resetLocalStorage(this.controls);
3003
2997
  this.codFormStepTwo.reset();
3004
2998
  }
3005
2999
  validateErrors() {
@@ -3410,6 +3404,7 @@ class CodFormStepThreeComponent extends CodFormSteps {
3410
3404
  }
3411
3405
  }
3412
3406
  cleanComponent() {
3407
+ this.resetLocalStorage(this.controls);
3413
3408
  this.codFormStepThree.reset();
3414
3409
  }
3415
3410
  }
@@ -3515,6 +3510,7 @@ class CodFormStepFourComponent extends CodFormSteps {
3515
3510
  this.controls = new CodFormControls().controls[3];
3516
3511
  }
3517
3512
  ngOnInit() {
3513
+ // this.cleanComponent();
3518
3514
  this.initForm();
3519
3515
  this.startLocalStorageWork();
3520
3516
  this.validateErrors();
@@ -3654,7 +3650,7 @@ class CodFormStepFourComponent extends CodFormSteps {
3654
3650
  const total_price = this.codFormStepFour.controls['total_price'].value;
3655
3651
  if ((total_price === 'null') || this.codFormStepFour.invalid) {
3656
3652
  Swal.fire({
3657
- title: 'Error',
3653
+ title: 'Error table',
3658
3654
  text: 'Debes ingresar el monto total de la matrícula y la cuota inicial',
3659
3655
  icon: 'error'
3660
3656
  });
@@ -3715,6 +3711,9 @@ class CodFormStepFourComponent extends CodFormSteps {
3715
3711
  this.codFormStepFour.controls['program_price'].setValue(null);
3716
3712
  }
3717
3713
  }
3714
+ cleanComponent() {
3715
+ this.resetLocalStorage(this.controls);
3716
+ }
3718
3717
  }
3719
3718
  CodFormStepFourComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodFormStepFourComponent, deps: [{ token: i1$1.FormBuilder }, { token: CalculateQuotesService }, { token: CommunicatorService }, { token: ParameterService }, { token: CodFormControls }, { token: CommercialService }], target: i0.ɵɵFactoryTarget.Component });
3720
3719
  CodFormStepFourComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CodFormStepFourComponent, selector: "app-cod-form-step-four", outputs: { changeStepEvent: "changeStepEvent", financingData: "financingData" }, usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"isSemestral\" class=\"m-1 p-2 border-round-lg bg-blue-500 text-white\">\n <strong>Nota: </strong>\n El tipo de curso seleccionado fue semestral, por lo tanto el estudiante debe pagar matr\u00EDcula y primera cuota (M&M)\n</div>\n\n<form autocomplete=\"off\" [formGroup]=\"codFormStepFour\" class=\"grid mt-2\">\n\n <div class=\"col-12\">\n <ipt-select\n [initialValue]=\"codFormStepFour.controls['payment_method'].value\"\n [control]=\"codFormStepFour.controls['payment_method']\"\n (eventSelect)=\"selectPaymentMethod($event)\"\n [data]=\"paymentMethods\"\n [defaultText]=\"'M\u00E9todo de pago'\"\n ></ipt-select>\n <ipt-select *ngIf=\"isFinanced();\"\n [initialValue]=\"codFormStepFour.controls['quota_times'].value\"\n [control]=\"codFormStepFour.controls['quota_times']\"\n (eventSelect)=\"selectQuotas($event)\"\n [defaultText]=\"'N\u00FAmero de cuotas'\"\n [data]=\"codPrices\"\n [selectCode]=\"codFormStepFour.controls['quota_times'].value === null? 'N\u00FAmero de cuotas': codFormStepFour.controls['quota_times'].value\"\n ></ipt-select>\n </div>\n\n <div *ngIf=\"isFinanced();\" class=\"col-12\">\n <ipt-input *ngIf=\"isFinanced();\"\n [inputType]=\"'text'\"\n [placeHolder]=\"'Monto total de la matr\u00EDcula'\"\n [control]=\"codFormStepFour.controls['total_price']\"\n [withPipe]=\"true\"\n ></ipt-input>\n </div>\n\n <div class=\"col-12\">\n <ipt-input\n [withPipe]=\"true\"\n [inputType]=\"'text'\"\n [control]=\"codFormStepFour.controls['program_price']\"\n [placeHolder]=\"'Valor total del programa'\"\n ></ipt-input>\n </div>\n\n <div class=\"col-12\">\n <ipt-input\n onfocus=\"(this.type='date')\"\n [inputType]=\"'date'\"\n [control]=\"codFormStepFour.controls['payment_date']\"\n [placeHolder]=\"'Fecha de pago'\"\n ></ipt-input>\n </div>\n\n <!-- Tabla de financiaci\u00F3n -->\n <div class=\"col-12\" *ngIf=\"isFinancing\">\n <p-table\n [value]=\"dataFinancing\"\n [tableStyle]=\"{'min-width': '100%'}\"\n [rowHover]=\"true\"\n >\n <ng-template pTemplate=\"caption\">\n <div class=\"flex align-items-center\">\n C\u00E1lculo de cuotas\n <button pButton class=\"p-button-sm ml-auto\" label=\"Nuevo c\u00E1lculo\" (click)=\"calculateNewQuotes()\" lab icon=\"pi pi-replay\"></button>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th>#</th>\n <th>Valor</th>\n <th>Fecha</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-data>\n <tr>\n <td>{{ data[0] }}</td>\n <td>{{ data[1] }}</td>\n <td>{{ data[2] }}</td>\n </tr>\n </ng-template>\n </p-table>\n </div>\n <!-- ---------------------- -->\n\n</form>\n\n<div class=\"flex mt-3 align-items-center gap-3\">\n <span *ngIf=\"codFormStepFour.invalid && codFormStepFour.touched\" class=\"text-red-500 font-bold text-center mt-1 py-2 bg-red-100 w-full border-round-xl\">{{ errorMessage }}</span>\n <div class=\"flex ml-auto gap-2\">\n <button *ngIf=\"codFormStepFour.controls['payment_method'].value === '1'\" [disabled]=\"isFinancing || codFormStepFour.controls['payment_method'].value !== '1'\"type=\"submit\" class=\"ml-auto p-button-sm p-button-secondary\" (click)=\"showTable()\" pButton label=\"Calcular cuotas\" icon=\"pi pi-sliders-h\"></button>\n <button [disabled]=\"!isFinancing && codFormStepFour.controls['payment_method'].value === '1'\" type=\"submit\" class=\"ml-auto p-button-sm\" (click)=\"sendForm()\" pButton label=\"Siguiente\" icon=\"pi pi-arrow-right\"></button>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i8.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { 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: "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: "component", type: i11.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "virtualRowHeight", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i6$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }] });
@@ -3739,23 +3738,6 @@ class CodFormStepFiveComponent extends CodFormSteps {
3739
3738
  // Controls del formulario
3740
3739
  this.controls = new CodFormControls().controls[4];
3741
3740
  }
3742
- // ngOnInit(): void {
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) this.errorMessage = 'Debe marcar la casilla de términos y condiciones.'
3750
- // })
3751
- // if (this.userRole === 30 || this.userRole === 31 || this.userRole === 32) this.sendFormMsg = 'Editar COD'; // Roles Administrativos
3752
- // if (this.userRole === 40 || this.userRole === 41 || this.userRole === 42) this.sendFormMsg = 'Crear COD'; // Roles comerciales
3753
- // if (this.initialData != null) {
3754
- // this.setDataFromPreviusCod();
3755
- // } else {
3756
- // console.log('No hay data cargada para el Paso 5');
3757
- // }
3758
- // }
3759
3741
  ngOnChanges(changes) {
3760
3742
  this.initForm();
3761
3743
  this.startLocalStorageWork();
@@ -3775,6 +3757,7 @@ class CodFormStepFiveComponent extends CodFormSteps {
3775
3757
  }
3776
3758
  else {
3777
3759
  console.log('No hay data cargada para el Paso 5');
3760
+ this.cleanComponent();
3778
3761
  }
3779
3762
  }
3780
3763
  }
@@ -3881,6 +3864,10 @@ class CodFormStepFiveComponent extends CodFormSteps {
3881
3864
  this.codFormStepFive.controls['health_regimen'].setValue(this.initialData.aditional_information.health_regimen);
3882
3865
  this.codFormStepFive.controls['observation'].setValue(this.initialData.aditional_information.observation);
3883
3866
  }
3867
+ cleanComponent() {
3868
+ this.resetLocalStorage(this.controls);
3869
+ this.codFormStepFive.reset();
3870
+ }
3884
3871
  }
3885
3872
  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
3873
  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"] }] });
@@ -3989,7 +3976,7 @@ class CodFormComponent {
3989
3976
  const element = totalData[i];
3990
3977
  if (!element.value && element.isRequired) {
3991
3978
  Swal.fire({
3992
- title: 'Error',
3979
+ title: 'Error Form Action Validate Error',
3993
3980
  text: `Revisar el campo: "${element.description}"`,
3994
3981
  icon: 'error'
3995
3982
  });
@@ -4031,7 +4018,7 @@ class CodFormComponent {
4031
4018
  this.isLoading = false;
4032
4019
  this.loaderMessage = '';
4033
4020
  Swal.fire({
4034
- title: 'Error',
4021
+ title: 'Error Create COD',
4035
4022
  text: err.error.text,
4036
4023
  icon: 'error'
4037
4024
  });