sigesp 0.8.98-20220615 → 0.8.101-20220727
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.
- package/bundles/sigesp.umd.js +18 -54
- package/bundles/sigesp.umd.js.map +1 -1
- package/bundles/sigesp.umd.min.js +2 -2
- package/bundles/sigesp.umd.min.js.map +1 -1
- package/esm2015/lib/core/models/SNO/MAsignacionCargo.model.js +3 -3
- package/esm2015/lib/core/models/SNO/MNominaSimple.model.js +3 -3
- package/esm2015/lib/shared/components/table-select/table-select.component.js +10 -24
- package/esm2015/lib/sigesp.service.js +6 -28
- package/fesm2015/sigesp.js +18 -54
- package/fesm2015/sigesp.js.map +1 -1
- package/lib/shared/components/table-select/table-select.component.d.ts +0 -2
- package/lib/sigesp.service.d.ts +3 -3
- package/package.json +1 -1
- package/sigesp.metadata.json +1 -1
package/fesm2015/sigesp.js
CHANGED
|
@@ -870,6 +870,7 @@ class MPlanUnicoCuenta {
|
|
|
870
870
|
}
|
|
871
871
|
|
|
872
872
|
class TableSelectComponent {
|
|
873
|
+
//disableMasterToggle: boolean = false;
|
|
873
874
|
constructor(dialogRef, dialogData) {
|
|
874
875
|
this.dialogRef = dialogRef;
|
|
875
876
|
this.dialogData = dialogData;
|
|
@@ -878,7 +879,6 @@ class TableSelectComponent {
|
|
|
878
879
|
this.selections = [];
|
|
879
880
|
this.names = [];
|
|
880
881
|
this.loaded = false;
|
|
881
|
-
this.disableMasterToggle = false;
|
|
882
882
|
this.columns.push(...dialogData.columns);
|
|
883
883
|
this.columnsAux = dialogData.columns;
|
|
884
884
|
this.data = dialogData.dataSource;
|
|
@@ -886,7 +886,7 @@ class TableSelectComponent {
|
|
|
886
886
|
if (this.dialogData.columnNames) {
|
|
887
887
|
this.names = this.dialogData.columnNames;
|
|
888
888
|
}
|
|
889
|
-
this.disableMasterToggle = this.dialogData.disableMasterToggle
|
|
889
|
+
// this.disableMasterToggle = this.dialogData.disableMasterToggle
|
|
890
890
|
}
|
|
891
891
|
ngAfterViewInit() {
|
|
892
892
|
this.dataSource.paginator = this.paginator;
|
|
@@ -894,28 +894,14 @@ class TableSelectComponent {
|
|
|
894
894
|
this.sort.sortChange.subscribe(() => this.paginator.pageIndex = 0);
|
|
895
895
|
}
|
|
896
896
|
isAllSelected() {
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
return numSelected === numRows;
|
|
901
|
-
}
|
|
902
|
-
else {
|
|
903
|
-
const numSelected = this.selection.selected.length;
|
|
904
|
-
const numRows = this.dataSource.filteredData.length;
|
|
905
|
-
return numSelected === numRows;
|
|
906
|
-
}
|
|
897
|
+
const numSelected = this.selection.selected.length;
|
|
898
|
+
const numRows = this.dataSource.data.length;
|
|
899
|
+
return numSelected === numRows;
|
|
907
900
|
}
|
|
908
901
|
masterToggle() {
|
|
909
|
-
|
|
910
|
-
this.
|
|
911
|
-
|
|
912
|
-
this.dataSource.data.forEach(row => this.selection.select(row));
|
|
913
|
-
}
|
|
914
|
-
else {
|
|
915
|
-
this.isAllSelected() ?
|
|
916
|
-
this.selection.clear() :
|
|
917
|
-
this.dataSource.filteredData.forEach(row => this.selection.select(row));
|
|
918
|
-
}
|
|
902
|
+
this.isAllSelected() ?
|
|
903
|
+
this.selection.clear() :
|
|
904
|
+
this.dataSource.data.forEach(row => this.selection.select(row));
|
|
919
905
|
}
|
|
920
906
|
checkboxLabel(row) {
|
|
921
907
|
if (!row) {
|
|
@@ -948,7 +934,7 @@ class TableSelectComponent {
|
|
|
948
934
|
TableSelectComponent.decorators = [
|
|
949
935
|
{ type: Component, args: [{
|
|
950
936
|
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
|
|
937
|
+
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]=\"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
938
|
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
939
|
},] }
|
|
954
940
|
];
|
|
@@ -3717,8 +3703,8 @@ class MCargosNominas extends MBasicModel {
|
|
|
3717
3703
|
this.denominacionNomina = e.dennom;
|
|
3718
3704
|
this.idDtNomina = parseInt(e.id_dt_carnom);
|
|
3719
3705
|
this.periodoActualNomina = e.peractnom;
|
|
3720
|
-
this.calculada = e.calculado
|
|
3721
|
-
this.prenomina = e.prenomina
|
|
3706
|
+
(e.calculado) ? this.calculada = parseInt(e.calculado) > 0 ? true : false : this.calculada = false;
|
|
3707
|
+
(e.prenomina) ? this.prenomina = parseInt(e.prenomina) > 0 ? true : false : this.prenomina = false;
|
|
3722
3708
|
this.estatus = this.calculada ? 'Calculada' :
|
|
3723
3709
|
!this.calculada && this.prenomina ? 'Pre-Calculada' : 'Sin Calcular';
|
|
3724
3710
|
this.editables = (this.calculada || this.prenomina) ? false : true;
|
|
@@ -3777,8 +3763,8 @@ class MNominaSimple extends MBasicModel {
|
|
|
3777
3763
|
this.idPeriodoActual = +e.id_periodoactual;
|
|
3778
3764
|
this.totalPeriodo = parseFloat(e.totper),
|
|
3779
3765
|
this.estatusPeriodo = parseInt(e.cerper);
|
|
3780
|
-
this.calculada = e.calculado
|
|
3781
|
-
this.prenomina = e.prenomina
|
|
3766
|
+
(e.calculado) ? this.calculada = parseInt(e.calculado) > 0 ? true : false : this.calculada = false;
|
|
3767
|
+
(e.prenomina) ? this.prenomina = parseInt(e.prenomina) > 0 ? true : false : this.prenomina = false;
|
|
3782
3768
|
this.estatus = this.calculada ? 'Calculada' :
|
|
3783
3769
|
!this.calculada && this.prenomina ? 'Pre-Calculada' : 'Sin Calcular';
|
|
3784
3770
|
this.editable = (this.calculada || this.prenomina) ? false : true;
|
|
@@ -5514,7 +5500,6 @@ class SigespService {
|
|
|
5514
5500
|
columns, title, dataSource, columnNames = null, width = '450px', options = {
|
|
5515
5501
|
disableClose: false,
|
|
5516
5502
|
hasBackdrop: false,
|
|
5517
|
-
disableMasterToggle: false
|
|
5518
5503
|
}) {
|
|
5519
5504
|
let dialogRef = this.dialog.open(TableSelectComponent, {
|
|
5520
5505
|
data: {
|
|
@@ -5522,7 +5507,6 @@ class SigespService {
|
|
|
5522
5507
|
columns: columns,
|
|
5523
5508
|
dataSource: dataSource,
|
|
5524
5509
|
columnNames,
|
|
5525
|
-
disableMasterToggle: options.disableMasterToggle
|
|
5526
5510
|
},
|
|
5527
5511
|
width: width,
|
|
5528
5512
|
maxHeight: '90vh',
|
|
@@ -5608,37 +5592,17 @@ class SigespService {
|
|
|
5608
5592
|
return formGroup.get(name);
|
|
5609
5593
|
}
|
|
5610
5594
|
/**
|
|
5611
|
-
* @description
|
|
5595
|
+
* @description Previene que se escriban letras en el input (Usar en keypress)
|
|
5612
5596
|
* @param event Evento del teclado
|
|
5613
5597
|
* @return boolean
|
|
5614
5598
|
* @author Miguel Ramírez
|
|
5599
|
+
* @modificado como onlyNumero para corregir codigo, usar currency-input si quiere usar decimales
|
|
5615
5600
|
*/
|
|
5616
5601
|
onlyDecimal(event) {
|
|
5617
|
-
|
|
5618
|
-
|
|
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;
|
|
5602
|
+
if (!isNaN(+event.key) && event.keyCode != 32) {
|
|
5603
|
+
return true;
|
|
5641
5604
|
}
|
|
5605
|
+
return false;
|
|
5642
5606
|
}
|
|
5643
5607
|
/**
|
|
5644
5608
|
* @description Previene que se escriban letras en el input (Usar en keypress)
|