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.
@@ -430,10 +430,10 @@
430
430
  _this.horaAdicional2 = 0;
431
431
  _this.estatusMPPPE = false;
432
432
  _this.montoSaldoGrado = 0;
433
- _this.salarioPersonal = 0;
434
433
  _this.apellidoPersonal = '';
435
434
  _this.denominacionEstatus = '';
436
435
  _this.nombreCompleto = '';
436
+ _this.nominaRac = 0;
437
437
  if (e) {
438
438
  _this.idEmpresa = parseInt(e.id_empresa);
439
439
  _this.idPersonalNomina = parseInt(e.id_personalnomina);
@@ -508,13 +508,18 @@
508
508
  _this.horaAdicional2 = parseFloat(e.horadi2);
509
509
  _this.estatusMPPPE = e.estmpppe == '1' ? true : false;
510
510
  _this.montoSaldoGrado = parseFloat(e.monsalgra);
511
- _this.montoSaldoGrado = parseFloat(e.monsalgra);
512
511
  _this.denominacionEstatus = e.staper == '1' ? 'ACTIVO' :
513
512
  _this.denominacionEstatus = e.staper == '2' ? 'VACACIONES' :
514
513
  _this.denominacionEstatus = e.staper == '3' ? 'EGRESADO' : 'SUSPENDIDO';
515
514
  _this.apellidoPersonal = e.apeper;
516
515
  _this.nombreCompleto = _this.nombrePersonal + ' ' + _this.apellidoPersonal;
517
- if (_this.idTabulador > 0) {
516
+ _this.nominaRac = parseInt(e.racnom);
517
+ if (_this.nominaRac == 0) {
518
+ _this.idTabulador = 0;
519
+ _this.codigoPaso = '0';
520
+ _this.codigoGrado = '0';
521
+ }
522
+ if (_this.idTabulador > 0 && _this.nominaRac == 1) {
518
523
  _this.sueldoPersonal = _this.montoSaldoGrado;
519
524
  }
520
525
  if (_this.idAgencia > 0) {
@@ -534,8 +539,13 @@
534
539
  return _this;
535
540
  }
536
541
  MPersonalNomina.prototype.dataInterface = function () {
537
- if (this.idTabulador > 0) {
538
- this.sueldoPersonal = this.salarioPersonal;
542
+ if (this.idTabulador > 0 && this.nominaRac == 1) {
543
+ this.sueldoPersonal = this.montoSaldoGrado;
544
+ }
545
+ else {
546
+ this.idTabulador = 0;
547
+ this.codigoPaso = '0';
548
+ this.codigoGrado = '0';
539
549
  }
540
550
  return {
541
551
  id_empresa: this.idEmpresa.toString(),
@@ -708,6 +718,7 @@
708
718
  this.id = parseInt(user.id_usuario);
709
719
  this.interface = user;
710
720
  this.nomina = parseInt(user.nomina);
721
+ this.periodo = parseInt(user.periodo);
711
722
  }
712
723
  MUsuario.prototype.getInterface = function () {
713
724
  return this.interface;
@@ -3539,7 +3550,7 @@
3539
3550
  else if (this.calculado && this.contabiliazadoPeriodo == 0 && this.aporteContabilizadoPeriodo == 1) {
3540
3551
  return 'Aporte Contabilizado';
3541
3552
  }
3542
- else if (!this.calculado && !this.prenomina && this.contabiliazadoPeriodo == 0 && this.aporteContabilizadoPeriodo == 0) {
3553
+ else if (!this.calculado && this.prenomina && this.contabiliazadoPeriodo == 0 && this.aporteContabilizadoPeriodo == 0) {
3543
3554
  return 'Pre-Calculada';
3544
3555
  }
3545
3556
  };
@@ -4690,6 +4701,7 @@
4690
4701
  this.usuarioActivo = null;
4691
4702
  this.currentComponent = null;
4692
4703
  this.userMenu = null;
4704
+ this.ip_adress = '127.0.0.1';
4693
4705
  }
4694
4706
  /**
4695
4707
  * @description Valida que selo se escriban guiones y 9
@@ -6504,12 +6516,39 @@
6504
6516
  return false;
6505
6517
  };
6506
6518
  /**
6507
- * @description Obtiene el Ip del cliente
6508
- * @return Json data
6509
- * @author Ing. Wilmer Briceno
6510
- */
6519
+ * @description Obtiene el Ip del cliente
6520
+ * @return Json data
6521
+ * @author Ing. Wilmer Briceno
6522
+ */
6511
6523
  SigespService.prototype.getIPAddress = function () {
6512
- return this.http.get("http://api.ipify.org/?format=json");
6524
+ return this.http.get("http://api.ipify.org/?format=json")
6525
+ .pipe(operators.catchError(function (err) {
6526
+ console.log('error caught in service');
6527
+ console.error(err);
6528
+ sessionStorage.setItem('ip_adress', '127.0.0.1');
6529
+ //Handle the error here
6530
+ return rxjs.throwError(err); //Rethrow it back to component
6531
+ }));
6532
+ };
6533
+ /**
6534
+ * @description Obtiene el Ip del cliente
6535
+ * @return Json data
6536
+ * @author Ing. Wilmer Briceno
6537
+ */
6538
+ SigespService.prototype.setIpAdress = function () {
6539
+ var _this = this;
6540
+ this.getIPAddress().subscribe(function (resp) {
6541
+ sessionStorage.setItem('ip_adress', resp.ip);
6542
+ _this.ip_adress = resp.ip;
6543
+ });
6544
+ };
6545
+ /**
6546
+ * @description Obtiene el Ip del cliente
6547
+ * @return Json data
6548
+ * @author Ing. Wilmer Briceno
6549
+ */
6550
+ SigespService.prototype.getIpAdress = function () {
6551
+ this.ip_adress = sessionStorage.getItem('ip_adress');
6513
6552
  };
6514
6553
  return SigespService;
6515
6554
  }());