sigesp 0.8.63-220120 → 0.8.67-220127

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.
@@ -141,10 +141,10 @@ class MPersonalNomina extends MBasicModel {
141
141
  this.horaAdicional2 = 0;
142
142
  this.estatusMPPPE = false;
143
143
  this.montoSaldoGrado = 0;
144
- this.salarioPersonal = 0;
145
144
  this.apellidoPersonal = '';
146
145
  this.denominacionEstatus = '';
147
146
  this.nombreCompleto = '';
147
+ this.nominaRac = 0;
148
148
  if (e) {
149
149
  this.idEmpresa = parseInt(e.id_empresa);
150
150
  this.idPersonalNomina = parseInt(e.id_personalnomina);
@@ -219,13 +219,18 @@ class MPersonalNomina extends MBasicModel {
219
219
  this.horaAdicional2 = parseFloat(e.horadi2);
220
220
  this.estatusMPPPE = e.estmpppe == '1' ? true : false;
221
221
  this.montoSaldoGrado = parseFloat(e.monsalgra);
222
- this.montoSaldoGrado = parseFloat(e.monsalgra);
223
222
  this.denominacionEstatus = e.staper == '1' ? 'ACTIVO' :
224
223
  this.denominacionEstatus = e.staper == '2' ? 'VACACIONES' :
225
224
  this.denominacionEstatus = e.staper == '3' ? 'EGRESADO' : 'SUSPENDIDO';
226
225
  this.apellidoPersonal = e.apeper;
227
226
  this.nombreCompleto = this.nombrePersonal + ' ' + this.apellidoPersonal;
228
- if (this.idTabulador > 0) {
227
+ this.nominaRac = parseInt(e.racnom);
228
+ if (this.nominaRac == 0) {
229
+ this.idTabulador = 0;
230
+ this.codigoPaso = '0';
231
+ this.codigoGrado = '0';
232
+ }
233
+ if (this.idTabulador > 0 && this.nominaRac == 1) {
229
234
  this.sueldoPersonal = this.montoSaldoGrado;
230
235
  }
231
236
  if (this.idAgencia > 0) {
@@ -244,8 +249,13 @@ class MPersonalNomina extends MBasicModel {
244
249
  }
245
250
  }
246
251
  dataInterface() {
247
- if (this.idTabulador > 0) {
248
- this.sueldoPersonal = this.salarioPersonal;
252
+ if (this.idTabulador > 0 && this.nominaRac == 1) {
253
+ this.sueldoPersonal = this.montoSaldoGrado;
254
+ }
255
+ else {
256
+ this.idTabulador = 0;
257
+ this.codigoPaso = '0';
258
+ this.codigoGrado = '0';
249
259
  }
250
260
  return {
251
261
  id_empresa: this.idEmpresa.toString(),
@@ -413,6 +423,7 @@ class MUsuario {
413
423
  this.id = parseInt(user.id_usuario);
414
424
  this.interface = user;
415
425
  this.nomina = parseInt(user.nomina);
426
+ this.periodo = parseInt(user.periodo);
416
427
  }
417
428
  getInterface() {
418
429
  return this.interface;
@@ -3109,7 +3120,7 @@ class MPeriodoNomina extends MBasicModel {
3109
3120
  else if (this.calculado && this.contabiliazadoPeriodo == 0 && this.aporteContabilizadoPeriodo == 1) {
3110
3121
  return 'Aporte Contabilizado';
3111
3122
  }
3112
- else if (!this.calculado && !this.prenomina && this.contabiliazadoPeriodo == 0 && this.aporteContabilizadoPeriodo == 0) {
3123
+ else if (!this.calculado && this.prenomina && this.contabiliazadoPeriodo == 0 && this.aporteContabilizadoPeriodo == 0) {
3113
3124
  return 'Pre-Calculada';
3114
3125
  }
3115
3126
  }
@@ -4232,6 +4243,7 @@ class SigespService {
4232
4243
  this.usuarioActivo = null;
4233
4244
  this.currentComponent = null;
4234
4245
  this.userMenu = null;
4246
+ this.ip_adress = '127.0.0.1';
4235
4247
  }
4236
4248
  /**
4237
4249
  * @description Valida que selo se escriban guiones y 9
@@ -5917,12 +5929,38 @@ class SigespService {
5917
5929
  return false;
5918
5930
  }
5919
5931
  /**
5920
- * @description Obtiene el Ip del cliente
5921
- * @return Json data
5922
- * @author Ing. Wilmer Briceno
5923
- */
5932
+ * @description Obtiene el Ip del cliente
5933
+ * @return Json data
5934
+ * @author Ing. Wilmer Briceno
5935
+ */
5924
5936
  getIPAddress() {
5925
- return this.http.get("http://api.ipify.org/?format=json");
5937
+ return this.http.get("http://api.ipify.org/?format=json")
5938
+ .pipe(catchError((err) => {
5939
+ console.log('error caught in service');
5940
+ console.error(err);
5941
+ sessionStorage.setItem('ip_adress', '127.0.0.1');
5942
+ //Handle the error here
5943
+ return throwError(err); //Rethrow it back to component
5944
+ }));
5945
+ }
5946
+ /**
5947
+ * @description Obtiene el Ip del cliente
5948
+ * @return Json data
5949
+ * @author Ing. Wilmer Briceno
5950
+ */
5951
+ setIpAdress() {
5952
+ this.getIPAddress().subscribe((resp) => {
5953
+ sessionStorage.setItem('ip_adress', resp.ip);
5954
+ this.ip_adress = resp.ip;
5955
+ });
5956
+ }
5957
+ /**
5958
+ * @description Obtiene el Ip del cliente
5959
+ * @return Json data
5960
+ * @author Ing. Wilmer Briceno
5961
+ */
5962
+ getIpAdress() {
5963
+ this.ip_adress = sessionStorage.getItem('ip_adress');
5926
5964
  }
5927
5965
  }
5928
5966
  SigespService.ɵprov = ɵɵdefineInjectable({ factory: function SigespService_Factory() { return new SigespService(ɵɵinject(HttpClient), ɵɵinject(MatDialog), ɵɵinject(ToastrService)); }, token: SigespService, providedIn: "root" });