sigesp 0.8.98-20220615 → 0.8.99-20220616

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.
@@ -4148,8 +4148,8 @@
4148
4148
  _this.denominacionNomina = e.dennom;
4149
4149
  _this.idDtNomina = parseInt(e.id_dt_carnom);
4150
4150
  _this.periodoActualNomina = e.peractnom;
4151
- _this.calculada = e.calculado == '1' ? true : false;
4152
- _this.prenomina = e.prenomina == '1' ? true : false;
4151
+ (e.calculado) ? _this.calculada = parseInt(e.calculado) > 0 ? true : false : _this.calculada = false;
4152
+ (e.prenomina) ? _this.prenomina = parseInt(e.prenomina) > 0 ? true : false : _this.prenomina = false;
4153
4153
  _this.estatus = _this.calculada ? 'Calculada' :
4154
4154
  !_this.calculada && _this.prenomina ? 'Pre-Calculada' : 'Sin Calcular';
4155
4155
  _this.editables = (_this.calculada || _this.prenomina) ? false : true;
@@ -4212,8 +4212,8 @@
4212
4212
  _this.idPeriodoActual = +e.id_periodoactual;
4213
4213
  _this.totalPeriodo = parseFloat(e.totper),
4214
4214
  _this.estatusPeriodo = parseInt(e.cerper);
4215
- _this.calculada = e.calculado == '1' ? true : false;
4216
- _this.prenomina = e.prenomina == '1' ? true : false;
4215
+ (e.calculado) ? _this.calculada = parseInt(e.calculado) > 0 ? true : false : _this.calculada = false;
4216
+ (e.prenomina) ? _this.prenomina = parseInt(e.prenomina) > 0 ? true : false : _this.prenomina = false;
4217
4217
  _this.estatus = _this.calculada ? 'Calculada' :
4218
4218
  !_this.calculada && _this.prenomina ? 'Pre-Calculada' : 'Sin Calcular';
4219
4219
  _this.editable = (_this.calculada || _this.prenomina) ? false : true;
@@ -6105,37 +6105,17 @@
6105
6105
  return formGroup.get(name);
6106
6106
  };
6107
6107
  /**
6108
- * @description Función para escribir solo decimales (Usar en evento keypress)
6108
+ * @description Previene que se escriban letras en el input (Usar en keypress)
6109
6109
  * @param event Evento del teclado
6110
6110
  * @return boolean
6111
6111
  * @author Miguel Ramírez
6112
+ * @modificado como onlyNumero para corregir codigo, usar currency-input si quiere usar decimales
6112
6113
  */
6113
6114
  SigespService.prototype.onlyDecimal = function (event) {
6114
- // console.log(event);
6115
- var contPoint = 0;
6116
- var number = event.target.value + event.key;
6117
- // console.log(number);
6118
- if (this.onlyNumbers(event) || event.key === ',') {
6119
- for (var i = 0; i < number.length; i++) {
6120
- if (number.charAt(i) === ',') {
6121
- contPoint++;
6122
- }
6123
- }
6124
- if (contPoint > 1) {
6125
- return false;
6126
- }
6127
- else {
6128
- if (number.indexOf(',') !== -1) {
6129
- if (number.substring(number.indexOf(',') + 1, number.length).length > 2) {
6130
- return false;
6131
- }
6132
- }
6133
- return true;
6134
- }
6135
- }
6136
- else {
6137
- return false;
6115
+ if (!isNaN(+event.key) && event.keyCode != 32) {
6116
+ return true;
6138
6117
  }
6118
+ return false;
6139
6119
  };
6140
6120
  /**
6141
6121
  * @description Previene que se escriban letras en el input (Usar en keypress)