sigesp 0.8.97-20220614 → 0.8.100-20220705

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.
@@ -948,7 +948,7 @@ class TableSelectComponent {
948
948
  TableSelectComponent.decorators = [
949
949
  { type: Component, args: [{
950
950
  selector: 'app-table-select',
951
- template: "<div class=\"container\">\r\n <!-- HEADER DE EL COMPONENTE -->\r\n <div class=\"header mainColor\">\r\n <!-- T\u00CDTULO -->\r\n <h2>{{dialogData.title}}</h2>\r\n <!-- BTN CERRAR -->\r\n <div class=\"close\">\r\n <div class=\"btn\" (click)=\"cancelDialog()\">\r\n <icon-m [name]=\"'close'\" [color]=\"'black'\"></icon-m>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- BODY -->\r\n <div class=\"body\">\r\n <!-- FILTER -->\r\n <div class=\"filter\">\r\n <mat-form-field class=\"input\">\r\n <input type=\"text\" matInput placeholder=\"Filtrar\"\r\n (keyup)=\"filterTable($event.target.value)\">\r\n </mat-form-field>\r\n </div>\r\n <!-- TABLA -->\r\n <div class=\"table-container\">\r\n <table mat-table [dataSource]=\"dataSource\" matSort>\r\n\r\n <!-- CHECKS -->\r\n <ng-container matColumnDef=\"select\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\r\n [disabled]=\"disableMasterToggle || getFilter()\" color=\"primary\"\r\n [checked]=\"selection.hasValue() && isAllSelected()\" \r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\r\n [aria-label]=\"checkboxLabel()\"\r\n ></mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? selection.toggle(row) : null\"\r\n [checked]=\"selection.isSelected(row)\" color=\"primary\"\r\n [aria-label]=\"checkboxLabel(row)\"></mat-checkbox>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- DATA -->\r\n <ng-container *ngFor=\"let column of columnsAux; let i = index\" [matColumnDef]=\"column\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header> \r\n {{(names[i] ? names[i] : column) | uppercase}} \r\n </th>\r\n <td mat-cell *matCellDef=\"let row\"> \r\n {{row[column]}} \r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"columns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: columns;\"\r\n (click)=\"selection.toggle(row)\">\r\n </tr>\r\n </table>\r\n </div>\r\n <mat-paginator [pageSizeOptions]=\"[5, 10, 25, 100]\" class=\"paginator\"></mat-paginator>\r\n\r\n <div class=\"buttons\">\r\n <button mat-raised-button color=\"primary\" \r\n [disabled]=\"selection.selected.length==0\"\r\n (click)=\"closeDialog()\">Aceptar</button>\r\n </div>\r\n </div>\r\n</div>\r\n",
951
+ template: "<div class=\"container\">\r\n <!-- HEADER DE EL COMPONENTE -->\r\n <div class=\"header mainColor\">\r\n <!-- T\u00CDTULO -->\r\n <h2>{{dialogData.title}}</h2>\r\n <!-- BTN CERRAR -->\r\n <div class=\"close\">\r\n <div class=\"btn\" (click)=\"cancelDialog()\">\r\n <icon-m [name]=\"'close'\" [color]=\"'black'\"></icon-m>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- BODY -->\r\n <div class=\"body\">\r\n <!-- FILTER -->\r\n <div class=\"filter\">\r\n <mat-form-field class=\"input\">\r\n <input type=\"text\" matInput placeholder=\"Filtrar\"\r\n (keyup)=\"filterTable($event.target.value)\">\r\n </mat-form-field>\r\n </div>\r\n <!-- TABLA -->\r\n <div class=\"table-container\">\r\n <table mat-table [dataSource]=\"dataSource\" matSort>\r\n\r\n <!-- CHECKS -->\r\n <ng-container matColumnDef=\"select\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\r\n [disabled]=\"disableMasterToggle || getFilter()\" color=\"primary\"\r\n [checked]=\"selection.hasValue() && isAllSelected()\" \r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\r\n [aria-label]=\"checkboxLabel()\"\r\n ></mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? selection.toggle(row) : null\"\r\n [checked]=\"selection.isSelected(row)\" color=\"primary\"\r\n [aria-label]=\"checkboxLabel(row)\"></mat-checkbox>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- DATA -->\r\n <ng-container *ngFor=\"let column of columnsAux; let i = index\" [matColumnDef]=\"column\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header> \r\n {{(names[i] ? names[i] : column) | uppercase}} \r\n </th>\r\n <td mat-cell *matCellDef=\"let row\"> \r\n {{row[column]}} \r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"columns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: columns;\"\r\n (click)=\"selection.toggle(row)\">\r\n </tr>\r\n </table>\r\n <mat-paginator [pageSizeOptions]=\"[5, 10, 25, 100]\" showFirstLastButtons class=\"paginator\"></mat-paginator>\r\n </div>\r\n\r\n <div class=\"buttons\">\r\n <button mat-raised-button color=\"primary\" \r\n [disabled]=\"selection.selected.length==0\"\r\n (click)=\"closeDialog()\">Aceptar</button>\r\n </div>\r\n </div>\r\n</div>\r\n",
952
952
  styles: [".container .header{border-radius:5px 5px 0 0;display:grid;grid-template-columns:repeat(10,10%);padding:15px;text-align:center}.container .header h2{grid-column:1/10;margin:0;text-align:left}.container .header .close{align-items:center;display:flex;grid-column:10/11;justify-content:center}.container .header .close .btn{align-items:center;background:#fff;border-radius:50%;cursor:pointer;display:flex;height:30px;justify-content:center;width:30px}.container .header .close .btn Icon{display:flex}.container .body{margin-top:10px;padding:15px}.container .body .filter .input,.container .body .table-container table{width:100%}.container .body .table-container table .row:hover{background:#777;cursor:pointer}.container .body .table-container table .mat-cell{padding-bottom:5px!important;padding-right:5px!important;padding-top:5px!important}.container .body .paginator{margin-top:15px}.container .body .buttons{display:flex;justify-content:flex-end;padding:10px}.container .body .buttons button{font-size:17px}"]
953
953
  },] }
954
954
  ];
@@ -3717,8 +3717,8 @@ class MCargosNominas extends MBasicModel {
3717
3717
  this.denominacionNomina = e.dennom;
3718
3718
  this.idDtNomina = parseInt(e.id_dt_carnom);
3719
3719
  this.periodoActualNomina = e.peractnom;
3720
- this.calculada = e.calculado == '1' ? true : false;
3721
- this.prenomina = e.prenomina == '1' ? true : false;
3720
+ (e.calculado) ? this.calculada = parseInt(e.calculado) > 0 ? true : false : this.calculada = false;
3721
+ (e.prenomina) ? this.prenomina = parseInt(e.prenomina) > 0 ? true : false : this.prenomina = false;
3722
3722
  this.estatus = this.calculada ? 'Calculada' :
3723
3723
  !this.calculada && this.prenomina ? 'Pre-Calculada' : 'Sin Calcular';
3724
3724
  this.editables = (this.calculada || this.prenomina) ? false : true;
@@ -3777,8 +3777,8 @@ class MNominaSimple extends MBasicModel {
3777
3777
  this.idPeriodoActual = +e.id_periodoactual;
3778
3778
  this.totalPeriodo = parseFloat(e.totper),
3779
3779
  this.estatusPeriodo = parseInt(e.cerper);
3780
- this.calculada = e.calculado == '1' ? true : false;
3781
- this.prenomina = e.prenomina == '1' ? true : false;
3780
+ (e.calculado) ? this.calculada = parseInt(e.calculado) > 0 ? true : false : this.calculada = false;
3781
+ (e.prenomina) ? this.prenomina = parseInt(e.prenomina) > 0 ? true : false : this.prenomina = false;
3782
3782
  this.estatus = this.calculada ? 'Calculada' :
3783
3783
  !this.calculada && this.prenomina ? 'Pre-Calculada' : 'Sin Calcular';
3784
3784
  this.editable = (this.calculada || this.prenomina) ? false : true;
@@ -5608,37 +5608,17 @@ class SigespService {
5608
5608
  return formGroup.get(name);
5609
5609
  }
5610
5610
  /**
5611
- * @description Función para escribir solo decimales (Usar en evento keypress)
5611
+ * @description Previene que se escriban letras en el input (Usar en keypress)
5612
5612
  * @param event Evento del teclado
5613
5613
  * @return boolean
5614
5614
  * @author Miguel Ramírez
5615
+ * @modificado como onlyNumero para corregir codigo, usar currency-input si quiere usar decimales
5615
5616
  */
5616
5617
  onlyDecimal(event) {
5617
- // console.log(event);
5618
- let contPoint = 0;
5619
- let number = event.target.value + event.key;
5620
- // console.log(number);
5621
- if (this.onlyNumbers(event) || event.key === ',') {
5622
- for (let i = 0; i < number.length; i++) {
5623
- if (number.charAt(i) === ',') {
5624
- contPoint++;
5625
- }
5626
- }
5627
- if (contPoint > 1) {
5628
- return false;
5629
- }
5630
- else {
5631
- if (number.indexOf(',') !== -1) {
5632
- if (number.substring(number.indexOf(',') + 1, number.length).length > 2) {
5633
- return false;
5634
- }
5635
- }
5636
- return true;
5637
- }
5638
- }
5639
- else {
5640
- return false;
5618
+ if (!isNaN(+event.key) && event.keyCode != 32) {
5619
+ return true;
5641
5620
  }
5621
+ return false;
5642
5622
  }
5643
5623
  /**
5644
5624
  * @description Previene que se escriban letras en el input (Usar en keypress)
@@ -5647,6 +5627,7 @@ class SigespService {
5647
5627
  * @author Miguel Ramírez
5648
5628
  */
5649
5629
  onlyNumbers(event) {
5630
+ // console.log(event);
5650
5631
  if (!isNaN(+event.key) && event.keyCode != 32) {
5651
5632
  return true;
5652
5633
  }
@@ -6508,13 +6489,16 @@ class SigespService {
6508
6489
  return this.http.get(`${this.URL}/dao/sss/derechos_usuario_dao.php?idComponent=${this.currentComponent.id}&column=${column}`, { headers: this.getHttpHeaders() });
6509
6490
  }
6510
6491
  /**
6511
- * @description Retorna los headers para hacer las peticiones
6512
- * @return HttpHeaders
6513
- * @author Miguel Ramírez
6514
- */
6515
- getHttpHeaders() {
6492
+ * @description Retorna los headers para hacer las peticiones
6493
+ * @params type: Tipo MIME permitido por defecto se toma application/json
6494
+ * @return HttpHeaders
6495
+ * @author Miguel Ramírez
6496
+ * @date-update: 15-06-2022
6497
+ */
6498
+ getHttpHeaders(type) {
6499
+ !type ? type = 'application/json' : '';
6516
6500
  const headers = new HttpHeaders({
6517
- 'Content-Type': 'application/json',
6501
+ 'Content-Type': type,
6518
6502
  'Authorization': `${this.usuarioActivo.token}`
6519
6503
  });
6520
6504
  return headers;