iptdevs-design-system 3.1.910 → 3.1.912

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.
@@ -4616,8 +4616,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
4616
4616
  type: Output
4617
4617
  }] } });
4618
4618
 
4619
- class CalculateQuotesService {
4619
+ class CalculateQuotesService$1 {
4620
4620
  constructor() {
4621
+ this.specialCourseTypes = [3, 4, 5, 6, 7, 8, 15, 21, 24, 25, 26, 30, 33]; //tecnicas
4621
4622
  this.monthsDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
4622
4623
  }
4623
4624
  calculateQuotes(params) {
@@ -4625,51 +4626,80 @@ class CalculateQuotesService {
4625
4626
  let index = 1; // Indicador de cant. de cuotas
4626
4627
  let dateJs = new Date(params.date);
4627
4628
  let isEndMonth = false;
4628
- dateJs.setMilliseconds(dateJs.getMilliseconds() + (1000 * 3600 * 24));
4629
- isEndMonth = this.monthsDays[dateJs.getMonth()] === dateJs.getDate();
4630
- if (dateJs.getDay() === 0) {
4631
- Swal.fire({
4632
- title: 'Fecha inválida',
4633
- text: 'Debe seleccionar un día de la semana diferente al domingo',
4634
- icon: 'error'
4635
- });
4629
+ const isSpecialCourseType = this.specialCourseTypes.includes(Number(params.courseType));
4630
+ if (!isSpecialCourseType) {
4631
+ // Non-special case: add one day and check for Sunday
4632
+ dateJs.setMilliseconds(dateJs.getMilliseconds() + (1000 * 3600 * 24));
4633
+ isEndMonth = this.monthsDays[dateJs.getMonth()] === dateJs.getDate();
4634
+ if (dateJs.getDay() === 0) {
4635
+ Swal.fire({
4636
+ title: 'Fecha inválida',
4637
+ text: 'Debe seleccionar un día de la semana diferente al domingo',
4638
+ icon: 'error'
4639
+ });
4640
+ return [];
4641
+ }
4636
4642
  }
4637
- else {
4638
- let enrollment = [
4639
- index,
4640
- Intl.NumberFormat('en-US', {
4641
- style: 'currency',
4642
- currency: 'USD',
4643
- minimumFractionDigits: 0
4644
- }).format(Math.round(parseFloat(params.totalPrice.toString()))),
4645
- this.getStringDate(dateJs)
4646
- ];
4647
- let quota = [
4643
+ // Enrollment
4644
+ let enrollment = [
4645
+ index,
4646
+ Intl.NumberFormat('en-US', {
4647
+ style: 'currency',
4648
+ currency: 'USD',
4649
+ minimumFractionDigits: 0
4650
+ }).format(Math.round(parseFloat(params.totalPrice.toString()))),
4651
+ this.getStringDate(dateJs)
4652
+ ];
4653
+ // First quota
4654
+ let firstQuotaDate = isSpecialCourseType ? new Date(params.date) : dateJs;
4655
+ if (isSpecialCourseType) {
4656
+ firstQuotaDate.setMonth(firstQuotaDate.getMonth() + 1);
4657
+ // Adjust if day exceeds max days in month
4658
+ const maxDays = this.monthsDays[firstQuotaDate.getMonth()];
4659
+ if (firstQuotaDate.getDate() > maxDays) {
4660
+ firstQuotaDate.setDate(maxDays);
4661
+ }
4662
+ }
4663
+ let quota = [
4664
+ index,
4665
+ Intl.NumberFormat('en-US', {
4666
+ style: 'currency',
4667
+ currency: 'USD',
4668
+ minimumFractionDigits: 0
4669
+ }).format(Math.round(parseFloat(params.quotaValues.toString()))),
4670
+ this.getStringDate(firstQuotaDate)
4671
+ ];
4672
+ dataFinancing.push(enrollment);
4673
+ dataFinancing.push(quota);
4674
+ while (index < params.quotaTimes) {
4675
+ index = index + 1;
4676
+ let newJsDate;
4677
+ if (isSpecialCourseType) {
4678
+ // Special case: add (index) months from params.date
4679
+ newJsDate = new Date(params.date);
4680
+ newJsDate.setMonth(newJsDate.getMonth() + index);
4681
+ // Adjust if day exceeds max days in month
4682
+ const maxDays = this.monthsDays[newJsDate.getMonth()];
4683
+ if (newJsDate.getDate() > maxDays) {
4684
+ newJsDate.setDate(maxDays);
4685
+ }
4686
+ }
4687
+ else {
4688
+ // Non-special case: use existing logic
4689
+ const nextDates = this.setPlusOneMonth(dateJs, isEndMonth);
4690
+ newJsDate = nextDates[nextDates.length - 1];
4691
+ dateJs = nextDates[0];
4692
+ }
4693
+ let row = [
4648
4694
  index,
4649
4695
  Intl.NumberFormat('en-US', {
4650
4696
  style: 'currency',
4651
4697
  currency: 'USD',
4652
4698
  minimumFractionDigits: 0
4653
4699
  }).format(Math.round(parseFloat(params.quotaValues.toString()))),
4654
- this.getStringDate(dateJs)
4700
+ this.getStringDate(newJsDate)
4655
4701
  ];
4656
- dataFinancing.push(enrollment);
4657
- dataFinancing.push(quota);
4658
- while (index < params.quotaTimes) {
4659
- index = index + 1;
4660
- let newJsDate = this.setPlusOneMonth(dateJs, isEndMonth);
4661
- let row = [
4662
- index,
4663
- Intl.NumberFormat('en-US', {
4664
- style: 'currency',
4665
- currency: 'USD',
4666
- minimumFractionDigits: 0
4667
- }).format(Math.round(parseFloat(params.quotaValues.toString()))),
4668
- this.getStringDate(newJsDate[newJsDate.length - 1])
4669
- ];
4670
- dataFinancing.push(row);
4671
- dateJs = newJsDate[0];
4672
- }
4702
+ dataFinancing.push(row);
4673
4703
  }
4674
4704
  return dataFinancing;
4675
4705
  }
@@ -4680,32 +4710,22 @@ class CalculateQuotesService {
4680
4710
  let plusMonthDate = new Date(originDate.getFullYear(), originDate.getMonth() + 1, day);
4681
4711
  response.push(new Date(originDate.getFullYear(), originDate.getMonth() + 1, day));
4682
4712
  while (plusMonthDate.getDay() === 0) {
4683
- plusMonthDate.setMilliseconds(originDate.getMilliseconds() - oneDayMilis);
4713
+ plusMonthDate.setMilliseconds(plusMonthDate.getMilliseconds() - oneDayMilis);
4684
4714
  }
4685
4715
  response.push(plusMonthDate);
4686
4716
  return response;
4687
4717
  }
4688
- // setPlusOneMonth2(originDate: Date, isEndMonth: boolean): Date[] {
4689
- // let response: Date[] = [];
4690
- // let oneDayMilis = 1000 * 3600 * 24;
4691
- // let day = isEndMonth ? this.monthsDays[(originDate.getMonth() + 1) % 12] : originDate.getDate();
4692
- // let plusMonthDate: Date = new Date(originDate.getFullYear(), originDate.getMonth() + 1, day);
4693
- // while (plusMonthDate.getDay() === 0) {
4694
- // plusMonthDate.setMilliseconds(plusMonthDate.getMilliseconds() - oneDayMilis);
4695
- // }
4696
- // response.push(plusMonthDate);
4697
- // response.push(new Date(originDate.getFullYear(), originDate.getMonth() + 1, day + 1));
4698
- // return response;
4699
- // }
4700
4718
  getStringDate(originDate) {
4701
4719
  let month = originDate.getMonth() + 1;
4702
- let stringMonth = month < 10 ? '0' + month : month;
4703
- return originDate.getFullYear() + '-' + stringMonth + '-' + originDate.getDate();
4720
+ let stringMonth = month < 10 ? '0' + month : month.toString();
4721
+ let day = originDate.getDate();
4722
+ let stringDay = day < 10 ? '0' + day : day.toString();
4723
+ return originDate.getFullYear() + '-' + stringMonth + '-' + stringDay;
4704
4724
  }
4705
4725
  }
4706
- CalculateQuotesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CalculateQuotesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4707
- CalculateQuotesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CalculateQuotesService, providedIn: 'root' });
4708
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CalculateQuotesService, decorators: [{
4726
+ CalculateQuotesService$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CalculateQuotesService$1, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4727
+ CalculateQuotesService$1.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CalculateQuotesService$1, providedIn: 'root' });
4728
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CalculateQuotesService$1, decorators: [{
4709
4729
  type: Injectable,
4710
4730
  args: [{
4711
4731
  providedIn: 'root'
@@ -4967,8 +4987,12 @@ class CodFormStepFourComponent extends CodFormSteps {
4967
4987
  quotaValues: Number(this.codFormStepFour.controls['quota_price'].value),
4968
4988
  quotaTimes: Number(this.codFormStepFour.controls['fee_number'].value),
4969
4989
  totalPrice: this.codFormStepFour.controls['total_price'].value,
4990
+ courseType: Number(this.localStorageCOD.getCodFormData(1, 'course_type')),
4991
+ englishLevel: Number(this.localStorageCOD.getCodFormData(1, 'english_level')),
4970
4992
  };
4993
+ console.log("params", params);
4971
4994
  this.dataFinancing = this.calculateQuotesService.calculateQuotes(params);
4995
+ console.log("dataFinancing", this.dataFinancing);
4972
4996
  this.isFinancing = true;
4973
4997
  this.financingData.emit(this.dataFinancing);
4974
4998
  }
@@ -5110,12 +5134,12 @@ class CodFormStepFourComponent extends CodFormSteps {
5110
5134
  // this.codFormStepFour.controls['quota_times'].setValue(this.initialData.cod_payment.lenght == 1 ? 1 : this.initialData.cod_price.fee_number);
5111
5135
  }
5112
5136
  }
5113
- CodFormStepFourComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodFormStepFourComponent, deps: [{ token: i1$1.FormBuilder }, { token: CalculateQuotesService }, { token: CodFormControls }, { token: CommercialService }, { token: BaseService }], target: i0.ɵɵFactoryTarget.Component });
5114
- CodFormStepFourComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CodFormStepFourComponent, selector: "app-cod-form-step-four", inputs: { isEditCod: "isEditCod", initialData: "initialData", isRenovation: "isRenovation" }, outputs: { changeStepEvent: "changeStepEvent", financingData: "financingData" }, usesInheritance: true, usesOnChanges: 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 [disabledSel]=\"isDisabledSel\"\n ></ipt-select>\n <ipt-loader *ngIf=\"feeResponse\"></ipt-loader>\n\n <div class=\"col-12\" *ngIf=\"thereArePlans\">\n <p-table\n [value]=\"dataPrices\"\n [tableStyle]=\"{'min-width': '100%'}\"\n [rowHover]=\"true\"\n >\n <ng-template pTemplate=\"caption\">\n <div class=\"flex align-items-center\">\n Seleccion de niveles a cancelar.\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">Cancelar</th>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">Cuotas</th>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">Admin</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-data>\n <tr>\n <td class=\"text-center\">{{ data.paid_level }} Nivel(es)</td>\n <td class=\"text-center\">{{ data.fee_number }}</td>\n <td class=\"pt-2 pb-2 text-center\">\n <button\n pButton\n pRipple\n icon=\"pi pi-money-bill\"\n class=\"p-button-sm p-button-rounded\"\n (click)=\"selectLevels(data)\"\n\n ></button>\n </td>\n </tr>\n </ng-template>\n </p-table>\n </div>\n\n <!-- [initialValue]=\"codFormStepFour.controls['quota_times'].value\" -->\n <!-- <ipt-select *ngIf=\"isFinanced();\"\n [initialValue]=\"'1'\"\n [control]=\"codFormStepFour.controls['quota_times']\"\n (eventSelect)=\"selectQuotas($event)\"\n [defaultText]=\"'N\u00FAmero de cuotas'\"\n [data]=\"codPrices\"\n ></ipt-select> -->\n </div>\n\n <div class=\"col-12\">\n <ipt-input\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 *ngIf=\"isFinancing && isRenovation === false\" class=\"container_tablet\">\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()\" [disabled]=\"isDisabledSel\" 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 </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]=\"isEditCod ? 'ml-auto yellow-300 p-button-sm' : 'ml-auto p-button-sm'\" (click)=\"sendForm()\" pButton label=\"Siguiente\" icon=\"pi pi-arrow-right\"></button>\n </div>\n</div>\n", styles: [".yellow-300{background-color:var(--yellow-500)!important;color:#fff}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: InputComponent, selector: "ipt-input", inputs: ["inputType", "placeHolder", "validateText", "withPipe", "list", "iconUrl", "control", "prefix", "thousands", "decimal", "disabledSel"], outputs: ["dateSelected"] }, { kind: "component", type: LoaderComponent, selector: "ipt-loader", inputs: ["message", "isDialog"] }, { kind: "component", type: SelectComponent, selector: "ipt-select", inputs: ["isRequired", "data", "defaultText", "selectCode", "disabledSel", "initialValue", "label", "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"] }] });
5137
+ CodFormStepFourComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodFormStepFourComponent, deps: [{ token: i1$1.FormBuilder }, { token: CalculateQuotesService$1 }, { token: CodFormControls }, { token: CommercialService }, { token: BaseService }], target: i0.ɵɵFactoryTarget.Component });
5138
+ CodFormStepFourComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CodFormStepFourComponent, selector: "app-cod-form-step-four", inputs: { isEditCod: "isEditCod", initialData: "initialData", isRenovation: "isRenovation" }, outputs: { changeStepEvent: "changeStepEvent", financingData: "financingData" }, usesInheritance: true, usesOnChanges: 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 [disabledSel]=\"isDisabledSel\"\n ></ipt-select>\n <ipt-loader *ngIf=\"feeResponse\"></ipt-loader>\n\n <div class=\"col-12\" *ngIf=\"thereArePlans\">\n <p-table\n [value]=\"dataPrices\"\n [tableStyle]=\"{'min-width': '100%'}\"\n [rowHover]=\"true\"\n >\n <ng-template pTemplate=\"caption\">\n <div class=\"flex align-items-center\">\n Seleccion de niveles a cancelar.\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">Cancelar</th>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">Cuotas</th>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">Admin</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-data>\n <tr>\n <td class=\"text-center\">{{ data.paid_level }} Nivel(es)</td>\n <td class=\"text-center\">{{ data.fee_number }}</td>\n <td class=\"pt-2 pb-2 text-center\">\n <button\n pButton\n pRipple\n icon=\"pi pi-money-bill\"\n class=\"p-button-sm p-button-rounded\"\n (click)=\"selectLevels(data)\"\n\n ></button>\n </td>\n </tr>\n </ng-template>\n </p-table>\n </div>\n\n <!-- [initialValue]=\"codFormStepFour.controls['quota_times'].value\" -->\n <!-- <ipt-select *ngIf=\"isFinanced();\"\n [initialValue]=\"'1'\"\n [control]=\"codFormStepFour.controls['quota_times']\"\n (eventSelect)=\"selectQuotas($event)\"\n [defaultText]=\"'N\u00FAmero de cuotas'\"\n [data]=\"codPrices\"\n ></ipt-select> -->\n </div>\n\n <div class=\"col-12\">\n <ipt-input\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 *ngIf=\"isFinancing && isRenovation === false\" class=\"container_tablet\">\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()\" [disabled]=\"isDisabledSel\" lab icon=\"pi pi-replay\"></button>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">#</th>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">Valor</th>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">Fecha</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-data>\n <tr>\n <td class=\"p-0 text-center text-sm\">{{ data[0] }}</td>\n <td class=\"p-0 text-center text-sm\">{{ data[1] }}</td>\n <td class=\"p-0 text-center text-sm\">{{ data[2] }}</td>\n </tr>\n </ng-template>\n </p-table>\n </div>\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]=\"isEditCod ? 'ml-auto yellow-300 p-button-sm' : 'ml-auto p-button-sm'\" (click)=\"sendForm()\" pButton label=\"Siguiente\" icon=\"pi pi-arrow-right\"></button>\n </div>\n</div>\n", styles: [".yellow-300{background-color:var(--yellow-500)!important;color:#fff}.container_tablet{width:-webkit-fill-available}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: InputComponent, selector: "ipt-input", inputs: ["inputType", "placeHolder", "validateText", "withPipe", "list", "iconUrl", "control", "prefix", "thousands", "decimal", "disabledSel"], outputs: ["dateSelected"] }, { kind: "component", type: LoaderComponent, selector: "ipt-loader", inputs: ["message", "isDialog"] }, { kind: "component", type: SelectComponent, selector: "ipt-select", inputs: ["isRequired", "data", "defaultText", "selectCode", "disabledSel", "initialValue", "label", "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"] }] });
5115
5139
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodFormStepFourComponent, decorators: [{
5116
5140
  type: Component,
5117
- args: [{ selector: 'app-cod-form-step-four', 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 [disabledSel]=\"isDisabledSel\"\n ></ipt-select>\n <ipt-loader *ngIf=\"feeResponse\"></ipt-loader>\n\n <div class=\"col-12\" *ngIf=\"thereArePlans\">\n <p-table\n [value]=\"dataPrices\"\n [tableStyle]=\"{'min-width': '100%'}\"\n [rowHover]=\"true\"\n >\n <ng-template pTemplate=\"caption\">\n <div class=\"flex align-items-center\">\n Seleccion de niveles a cancelar.\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">Cancelar</th>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">Cuotas</th>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">Admin</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-data>\n <tr>\n <td class=\"text-center\">{{ data.paid_level }} Nivel(es)</td>\n <td class=\"text-center\">{{ data.fee_number }}</td>\n <td class=\"pt-2 pb-2 text-center\">\n <button\n pButton\n pRipple\n icon=\"pi pi-money-bill\"\n class=\"p-button-sm p-button-rounded\"\n (click)=\"selectLevels(data)\"\n\n ></button>\n </td>\n </tr>\n </ng-template>\n </p-table>\n </div>\n\n <!-- [initialValue]=\"codFormStepFour.controls['quota_times'].value\" -->\n <!-- <ipt-select *ngIf=\"isFinanced();\"\n [initialValue]=\"'1'\"\n [control]=\"codFormStepFour.controls['quota_times']\"\n (eventSelect)=\"selectQuotas($event)\"\n [defaultText]=\"'N\u00FAmero de cuotas'\"\n [data]=\"codPrices\"\n ></ipt-select> -->\n </div>\n\n <div class=\"col-12\">\n <ipt-input\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 *ngIf=\"isFinancing && isRenovation === false\" class=\"container_tablet\">\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()\" [disabled]=\"isDisabledSel\" 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 </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]=\"isEditCod ? 'ml-auto yellow-300 p-button-sm' : 'ml-auto p-button-sm'\" (click)=\"sendForm()\" pButton label=\"Siguiente\" icon=\"pi pi-arrow-right\"></button>\n </div>\n</div>\n", styles: [".yellow-300{background-color:var(--yellow-500)!important;color:#fff}\n"] }]
5118
- }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: CalculateQuotesService }, { type: CodFormControls }, { type: CommercialService }, { type: BaseService }]; }, propDecorators: { isEditCod: [{
5141
+ args: [{ selector: 'app-cod-form-step-four', 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 [disabledSel]=\"isDisabledSel\"\n ></ipt-select>\n <ipt-loader *ngIf=\"feeResponse\"></ipt-loader>\n\n <div class=\"col-12\" *ngIf=\"thereArePlans\">\n <p-table\n [value]=\"dataPrices\"\n [tableStyle]=\"{'min-width': '100%'}\"\n [rowHover]=\"true\"\n >\n <ng-template pTemplate=\"caption\">\n <div class=\"flex align-items-center\">\n Seleccion de niveles a cancelar.\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">Cancelar</th>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">Cuotas</th>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">Admin</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-data>\n <tr>\n <td class=\"text-center\">{{ data.paid_level }} Nivel(es)</td>\n <td class=\"text-center\">{{ data.fee_number }}</td>\n <td class=\"pt-2 pb-2 text-center\">\n <button\n pButton\n pRipple\n icon=\"pi pi-money-bill\"\n class=\"p-button-sm p-button-rounded\"\n (click)=\"selectLevels(data)\"\n\n ></button>\n </td>\n </tr>\n </ng-template>\n </p-table>\n </div>\n\n <!-- [initialValue]=\"codFormStepFour.controls['quota_times'].value\" -->\n <!-- <ipt-select *ngIf=\"isFinanced();\"\n [initialValue]=\"'1'\"\n [control]=\"codFormStepFour.controls['quota_times']\"\n (eventSelect)=\"selectQuotas($event)\"\n [defaultText]=\"'N\u00FAmero de cuotas'\"\n [data]=\"codPrices\"\n ></ipt-select> -->\n </div>\n\n <div class=\"col-12\">\n <ipt-input\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 *ngIf=\"isFinancing && isRenovation === false\" class=\"container_tablet\">\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()\" [disabled]=\"isDisabledSel\" lab icon=\"pi pi-replay\"></button>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">#</th>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">Valor</th>\n <th class=\"bg-blue-200 text-center font-medium pt-2 pb-2\">Fecha</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-data>\n <tr>\n <td class=\"p-0 text-center text-sm\">{{ data[0] }}</td>\n <td class=\"p-0 text-center text-sm\">{{ data[1] }}</td>\n <td class=\"p-0 text-center text-sm\">{{ data[2] }}</td>\n </tr>\n </ng-template>\n </p-table>\n </div>\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]=\"isEditCod ? 'ml-auto yellow-300 p-button-sm' : 'ml-auto p-button-sm'\" (click)=\"sendForm()\" pButton label=\"Siguiente\" icon=\"pi pi-arrow-right\"></button>\n </div>\n</div>\n", styles: [".yellow-300{background-color:var(--yellow-500)!important;color:#fff}.container_tablet{width:-webkit-fill-available}\n"] }]
5142
+ }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: CalculateQuotesService$1 }, { type: CodFormControls }, { type: CommercialService }, { type: BaseService }]; }, propDecorators: { isEditCod: [{
5119
5143
  type: Input
5120
5144
  }], initialData: [{
5121
5145
  type: Input
@@ -7787,6 +7811,102 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
7787
7811
  type: Input
7788
7812
  }] } });
7789
7813
 
7814
+ class CalculateQuotesService {
7815
+ constructor() {
7816
+ this.monthsDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
7817
+ }
7818
+ calculateQuotes(params) {
7819
+ let dataFinancing = [];
7820
+ let index = 1; // Indicador de cant. de cuotas
7821
+ let dateJs = new Date(params.date);
7822
+ let isEndMonth = false;
7823
+ dateJs.setMilliseconds(dateJs.getMilliseconds() + (1000 * 3600 * 24));
7824
+ isEndMonth = this.monthsDays[dateJs.getMonth()] === dateJs.getDate();
7825
+ if (dateJs.getDay() === 0) {
7826
+ Swal.fire({
7827
+ title: 'Fecha inválida',
7828
+ text: 'Debe seleccionar un día de la semana diferente al domingo',
7829
+ icon: 'error'
7830
+ });
7831
+ }
7832
+ else {
7833
+ let enrollment = [
7834
+ index,
7835
+ Intl.NumberFormat('en-US', {
7836
+ style: 'currency',
7837
+ currency: 'USD',
7838
+ minimumFractionDigits: 0
7839
+ }).format(Math.round(parseFloat(params.totalPrice.toString()))),
7840
+ this.getStringDate(dateJs)
7841
+ ];
7842
+ let quota = [
7843
+ index,
7844
+ Intl.NumberFormat('en-US', {
7845
+ style: 'currency',
7846
+ currency: 'USD',
7847
+ minimumFractionDigits: 0
7848
+ }).format(Math.round(parseFloat(params.quotaValues.toString()))),
7849
+ this.getStringDate(dateJs)
7850
+ ];
7851
+ dataFinancing.push(enrollment);
7852
+ dataFinancing.push(quota);
7853
+ while (index < params.quotaTimes) {
7854
+ index = index + 1;
7855
+ let newJsDate = this.setPlusOneMonth(dateJs, isEndMonth);
7856
+ let row = [
7857
+ index,
7858
+ Intl.NumberFormat('en-US', {
7859
+ style: 'currency',
7860
+ currency: 'USD',
7861
+ minimumFractionDigits: 0
7862
+ }).format(Math.round(parseFloat(params.quotaValues.toString()))),
7863
+ this.getStringDate(newJsDate[newJsDate.length - 1])
7864
+ ];
7865
+ dataFinancing.push(row);
7866
+ dateJs = newJsDate[0];
7867
+ }
7868
+ }
7869
+ return dataFinancing;
7870
+ }
7871
+ setPlusOneMonth(originDate, isEndMonth) {
7872
+ let response = [];
7873
+ let oneDayMilis = 1000 * 3600 * 24;
7874
+ let day = isEndMonth ? this.monthsDays[(originDate.getMonth() + 1) % 12] : originDate.getDate();
7875
+ let plusMonthDate = new Date(originDate.getFullYear(), originDate.getMonth() + 1, day);
7876
+ response.push(new Date(originDate.getFullYear(), originDate.getMonth() + 1, day));
7877
+ while (plusMonthDate.getDay() === 0) {
7878
+ plusMonthDate.setMilliseconds(originDate.getMilliseconds() - oneDayMilis);
7879
+ }
7880
+ response.push(plusMonthDate);
7881
+ return response;
7882
+ }
7883
+ // setPlusOneMonth2(originDate: Date, isEndMonth: boolean): Date[] {
7884
+ // let response: Date[] = [];
7885
+ // let oneDayMilis = 1000 * 3600 * 24;
7886
+ // let day = isEndMonth ? this.monthsDays[(originDate.getMonth() + 1) % 12] : originDate.getDate();
7887
+ // let plusMonthDate: Date = new Date(originDate.getFullYear(), originDate.getMonth() + 1, day);
7888
+ // while (plusMonthDate.getDay() === 0) {
7889
+ // plusMonthDate.setMilliseconds(plusMonthDate.getMilliseconds() - oneDayMilis);
7890
+ // }
7891
+ // response.push(plusMonthDate);
7892
+ // response.push(new Date(originDate.getFullYear(), originDate.getMonth() + 1, day + 1));
7893
+ // return response;
7894
+ // }
7895
+ getStringDate(originDate) {
7896
+ let month = originDate.getMonth() + 1;
7897
+ let stringMonth = month < 10 ? '0' + month : month;
7898
+ return originDate.getFullYear() + '-' + stringMonth + '-' + originDate.getDate();
7899
+ }
7900
+ }
7901
+ CalculateQuotesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CalculateQuotesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7902
+ CalculateQuotesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CalculateQuotesService, providedIn: 'root' });
7903
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CalculateQuotesService, decorators: [{
7904
+ type: Injectable,
7905
+ args: [{
7906
+ providedIn: 'root'
7907
+ }]
7908
+ }], ctorParameters: function () { return []; } });
7909
+
7790
7910
  class CodSelfFormStepThreeComponent extends CodSelfManagedSteps {
7791
7911
  constructor(fb, messageService, commercialService, baseService, codFormControls, calculateQuotesService) {
7792
7912
  super();
@@ -8776,5 +8896,5 @@ class AnnouncementUserRs {
8776
8896
  * Generated bundle index. Do not edit.
8777
8897
  */
8778
8898
 
8779
- export { AcademicService, ActivityService, AnnouncementService, AnnouncementUserRs, AsideButtonComponent, AttendanceService, BaseService, BudgetService, ButtonComponent, CalculateQuotesService, CalendarService, CardCourseComponent, CardSelectCourseComponent, CertificateService, CheckboxComponent, ClassroomService, CodDocumentsSectionComponent, CodFormComponent, CodFormControls, CodFormStepFiveComponent, CodFormStepFourComponent, CodFormStepOneComponent, CodFormStepThreeComponent, CodFormStepTwoComponent, CodFormSteps, CodModule, CodSelfFormStepFourComponent, CodSelfFormStepOneComponent, CodSelfFormStepThreeComponent, CodSelfFormStepTwoComponent, CodSelfManagedComponent, CodSelfManagedControls, CodSelfManagedSteps, CommercialService, CommunicatorService, ComponentsModule, CopiesService, CoreModule, CourseService, CreateUserFormComponent, DatalistComponent, DesignSystemModule, EpaycoService, IUnitNameClubRs, IUserEktRs, IUserFullDataRs, InputComponent, LevelButtonComponent, LevelTextComponent, LoaderComponent, LocalStorageCODService, LocalStorageCodSelfMaganedService, LoginFormComponent, MarketingService, NotesService, ParameterService, PlacementService, QuestionTypeComponent, RadioComponent, RedirectGuard, ScheduleFormatPipe, ScheduleTimeFormatPipe, SelectComponent, Session, SidenavComponent, StorageService, StudentService, SwitchService, TestService, TextLinkComponent, TypeLevelPipe, UserEktService, UserLoginRs, UserRs, UserService, codSelfManagedModule, validateCoupunts };
8899
+ export { AcademicService, ActivityService, AnnouncementService, AnnouncementUserRs, AsideButtonComponent, AttendanceService, BaseService, BudgetService, ButtonComponent, CalculateQuotesService$1 as CalculateQuotesService, CalendarService, CardCourseComponent, CardSelectCourseComponent, CertificateService, CheckboxComponent, ClassroomService, CodDocumentsSectionComponent, CodFormComponent, CodFormControls, CodFormStepFiveComponent, CodFormStepFourComponent, CodFormStepOneComponent, CodFormStepThreeComponent, CodFormStepTwoComponent, CodFormSteps, CodModule, CodSelfFormStepFourComponent, CodSelfFormStepOneComponent, CodSelfFormStepThreeComponent, CodSelfFormStepTwoComponent, CodSelfManagedComponent, CodSelfManagedControls, CodSelfManagedSteps, CommercialService, CommunicatorService, ComponentsModule, CopiesService, CoreModule, CourseService, CreateUserFormComponent, DatalistComponent, DesignSystemModule, EpaycoService, IUnitNameClubRs, IUserEktRs, IUserFullDataRs, InputComponent, LevelButtonComponent, LevelTextComponent, LoaderComponent, LocalStorageCODService, LocalStorageCodSelfMaganedService, LoginFormComponent, MarketingService, NotesService, ParameterService, PlacementService, QuestionTypeComponent, RadioComponent, RedirectGuard, ScheduleFormatPipe, ScheduleTimeFormatPipe, SelectComponent, Session, SidenavComponent, StorageService, StudentService, SwitchService, TestService, TextLinkComponent, TypeLevelPipe, UserEktService, UserLoginRs, UserRs, UserService, codSelfManagedModule, validateCoupunts };
8780
8900
  //# sourceMappingURL=iptdevs-design-system.mjs.map