sigesp 0.8.91-20220526 → 0.8.94-20220529

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.
@@ -738,28 +738,36 @@
738
738
  return MHorario;
739
739
  }(MBasicModel));
740
740
 
741
- var MUsuario = /** @class */ (function () {
741
+ var MUsuario = /** @class */ (function (_super) {
742
+ __extends(MUsuario, _super);
742
743
  function MUsuario(user) {
743
- this.interface = null;
744
- this.apellido = user.apellido;
745
- this.nombre = user.nombre;
746
- this.conexionDB = user.conexionDB;
747
- this.empresa = user.empresa;
748
- this.token = user.token;
749
- this.procede = user.procede;
750
- this.codsis = user.codsis;
751
- this.foto = user.foto;
752
- this.id = parseInt(user.id_usuario);
753
- this.interface = user;
754
- this.nomina = parseInt(user.nomina);
755
- this.periodo = parseInt(user.periodo);
756
- this.carpeta = user.carpeta;
744
+ var _this = _super.call(this) || this;
745
+ _this.interface = null;
746
+ if (user) {
747
+ _this.apellido = user.apellido;
748
+ _this.nombre = user.nombre;
749
+ _this.conexionDB = user.conexionDB;
750
+ _this.empresa = user.empresa;
751
+ _this.token = user.token;
752
+ _this.procede = user.procede;
753
+ _this.codsis = user.codsis;
754
+ _this.foto = user.foto;
755
+ _this.id = parseInt(user.id_usuario);
756
+ _this.interface = user;
757
+ _this.nomina = parseInt(user.nomina);
758
+ _this.periodo = parseInt(user.periodo);
759
+ _this.carpeta = user.carpeta;
760
+ }
761
+ else {
762
+ _this.isNew = true;
763
+ }
764
+ return _this;
757
765
  }
758
766
  MUsuario.prototype.getInterface = function () {
759
767
  return this.interface;
760
768
  };
761
769
  return MUsuario;
762
- }());
770
+ }(MBasicModel));
763
771
 
764
772
  var MProveedor = /** @class */ (function () {
765
773
  function MProveedor(proveedor) {
@@ -771,17 +779,22 @@
771
779
  return MProveedor;
772
780
  }());
773
781
 
774
- var MUsuarioPrefijo = /** @class */ (function () {
782
+ var MUsuarioPrefijo = /** @class */ (function (_super) {
783
+ __extends(MUsuarioPrefijo, _super);
775
784
  function MUsuarioPrefijo(prefijo) {
776
- this.codsis = prefijo.codsis;
777
- this.codusu = prefijo.codusu;
778
- this.id = prefijo.id;
779
- this.id_empresa = prefijo.id_empresa;
780
- this.prefijo = prefijo.prefijo;
781
- this.procede = prefijo.procede;
785
+ var _this = _super.call(this) || this;
786
+ if (prefijo) {
787
+ _this.codsis = prefijo.codsis;
788
+ _this.codusu = prefijo.codusu;
789
+ _this.id = prefijo.id;
790
+ _this.id_empresa = prefijo.id_empresa;
791
+ _this.prefijo = prefijo.prefijo;
792
+ _this.procede = prefijo.procede;
793
+ }
794
+ return _this;
782
795
  }
783
796
  return MUsuarioPrefijo;
784
- }());
797
+ }(MBasicModel));
785
798
 
786
799
  var CatalogoComponent = /** @class */ (function () {
787
800
  function CatalogoComponent(dialogRef, dialogData) {
@@ -1728,17 +1741,20 @@
1728
1741
  return MRights;
1729
1742
  }(MBasicModel));
1730
1743
 
1744
+ var moment = require("moment");
1731
1745
  var MUserDetail = /** @class */ (function (_super) {
1732
1746
  __extends(MUserDetail, _super);
1733
1747
  function MUserDetail(user) {
1734
1748
  var _this = _super.call(this) || this;
1735
- _this.id = null;
1749
+ _this.id = 0;
1750
+ _this.idCompany = 0;
1736
1751
  _this.lastName = '';
1737
1752
  _this.identification = '';
1738
- _this.blockDate = new Date();
1739
- _this.passDate = new Date();
1740
- _this.birthday = new Date();
1741
- _this.registrationDate = new Date();
1753
+ _this.email = '';
1754
+ _this.blockDate = '1900-01-01';
1755
+ _this.passDate = '1900-01-01';
1756
+ _this.birthday = '1900-01-01';
1757
+ _this.registrationDate = moment().format('YYYY-MM-DD');
1742
1758
  _this.photo = 'default.png';
1743
1759
  _this.name = '';
1744
1760
  _this.notes = '';
@@ -1747,17 +1763,18 @@
1747
1763
  _this.admin = false;
1748
1764
  _this.rights = [];
1749
1765
  if (user) {
1766
+ _this.idCompany = parseInt(user.id_empresa);
1750
1767
  _this.id = parseInt(user.id_usuario);
1751
1768
  _this.lastName = user.apeusu;
1752
1769
  _this.identification = user.cedusu;
1753
1770
  _this.username = user.codusu;
1754
1771
  _this.email = user.emausu;
1755
1772
  _this.status = parseInt(user.estusu);
1756
- _this.blockDate = new Date(user.fecblousu + " 0:00:00");
1757
- _this.passDate = new Date(user.feccampwd + " 0:00:00");
1758
- _this.birthday = new Date(user.fecregusu + " 0:00:00");
1759
- _this.registrationDate = new Date(user.fecregusu + " 0:00:00");
1760
- _this.photo = user.fotusu;
1773
+ _this.blockDate = user.fecblousu;
1774
+ _this.passDate = user.feccampwd;
1775
+ _this.birthday = user.fecnac;
1776
+ _this.registrationDate = user.fecregusu,
1777
+ _this.photo = user.fotusu;
1761
1778
  _this.name = user.nomusu;
1762
1779
  _this.notes = user.obsusu;
1763
1780
  _this.password = user.pwdusu;
@@ -1777,12 +1794,12 @@
1777
1794
  codusu: this.username,
1778
1795
  emausu: this.email,
1779
1796
  estusu: this.status.toString(),
1780
- fecblousu: '',
1781
- feccampwd: '',
1782
- fecnac: '',
1783
- fecregusu: '',
1797
+ fecblousu: this.blockDate,
1798
+ feccampwd: this.passDate,
1799
+ fecnac: this.birthday,
1800
+ fecregusu: this.registrationDate,
1784
1801
  fotusu: this.photo,
1785
- id_empresa: '',
1802
+ id_empresa: this.idCompany.toString(),
1786
1803
  id_usuario: this.id.toString(),
1787
1804
  nomusu: this.name,
1788
1805
  obsusu: this.notes,
@@ -3619,7 +3636,7 @@
3619
3636
  return MPeriodoNomina;
3620
3637
  }(MBasicModel));
3621
3638
 
3622
- var moment = require("moment");
3639
+ var moment$1 = require("moment");
3623
3640
  var MDefinicionNomina = /** @class */ (function (_super) {
3624
3641
  __extends(MDefinicionNomina, _super);
3625
3642
  function MDefinicionNomina(e) {
@@ -3893,7 +3910,7 @@
3893
3910
  MDefinicionNomina.prototype.fechaFinalNomina = function () {
3894
3911
  var i = this.periodosNomina.length - 1;
3895
3912
  var fechaFin = this.periodosNomina[i].fechaHastaperiodo;
3896
- return moment(fechaFin).format('DD/MM/YYYY');
3913
+ return moment$1(fechaFin).format('DD/MM/YYYY');
3897
3914
  };
3898
3915
  /**
3899
3916
  * @returns fecha de inicio a fin de la nomina
@@ -3901,7 +3918,7 @@
3901
3918
  MDefinicionNomina.prototype.fechaNomina = function () {
3902
3919
  var i = this.periodosNomina.length - 1;
3903
3920
  var fechaFin = this.periodosNomina[i].fechaHastaperiodo;
3904
- return moment(this.fechaInicioNomina).format('DD/MM/YYYY') + ' al ' + moment(fechaFin).format('DD/MM/YYYY');
3921
+ return moment$1(this.fechaInicioNomina).format('DD/MM/YYYY') + ' al ' + moment$1(fechaFin).format('DD/MM/YYYY');
3905
3922
  };
3906
3923
  /**
3907
3924
  *
@@ -4386,9 +4403,10 @@
4386
4403
  { value: "V", denominacion: 'Viudo(a)' },
4387
4404
  ];
4388
4405
  var NivelAcademicoFamiliar = [
4389
- { value: "T", denominacion: 'Ninguno' },
4406
+ { value: "N", denominacion: 'Ninguno' },
4390
4407
  { value: "P", denominacion: 'Primaria' },
4391
4408
  { value: "D", denominacion: 'Diversificada' },
4409
+ { value: "T", denominacion: 'Técnico' },
4392
4410
  { value: "U", denominacion: 'Universitario' },
4393
4411
  ];
4394
4412
  var TipoBeneficiario = [
@@ -10238,7 +10256,7 @@
10238
10256
  _this.telefonoFamiliar = '';
10239
10257
  _this.hijoDiscapacidad = false;
10240
10258
  _this.Nexo = Nexofamiliar;
10241
- _this.Academico = NivelAcademico;
10259
+ _this.Academico = NivelAcademicoFamiliar;
10242
10260
  if (e) {
10243
10261
  _this.idEmpresa = parseInt(e.id_empresa);
10244
10262
  _this.idPersonal = parseInt(e.id_personal);
@@ -12051,15 +12069,17 @@
12051
12069
  _this.fechaInicioPermiso = '';
12052
12070
  _this.fechaFinPermiso = '';
12053
12071
  _this.numeroDiasPermiso = 0;
12054
- _this.afectaVacaionesPermiso = '0';
12072
+ _this.afectaVacaionesPermiso = false;
12055
12073
  _this.tipoPermiso = '2';
12074
+ _this.denominacionTipoPermiso = '2';
12056
12075
  _this.observacionPermiso = '';
12057
- _this.remuneradoPermiso = '1';
12076
+ _this.remuneradoPermiso = false;
12058
12077
  _this.totalHorasPermiso = 0;
12059
12078
  _this.descontarVacaciones = 0;
12060
12079
  _this.codigoPermiso = '';
12061
12080
  _this.idTipoEnfermedad = 0;
12062
12081
  _this.denominacionEnfermedad = '';
12082
+ _this.TipoPermiso = TipoPermiso;
12063
12083
  if (e) {
12064
12084
  _this.idEmpresa = +e.id_empresa;
12065
12085
  _this.idPersonal = +e.id_personal;
@@ -12067,15 +12087,16 @@
12067
12087
  _this.fechaInicioPermiso = e.fecfinper;
12068
12088
  _this.fechaFinPermiso = e.fecfinper;
12069
12089
  _this.numeroDiasPermiso = +e.numdiapero;
12070
- _this.afectaVacaionesPermiso = e.afevacper.toString();
12090
+ _this.afectaVacaionesPermiso = e.afevacper == 1 ? true : false;
12071
12091
  _this.tipoPermiso = e.tipper.toString();
12072
12092
  _this.observacionPermiso = e.obsper;
12073
- _this.remuneradoPermiso = e.remper.toString();
12093
+ _this.remuneradoPermiso = e.remper == 1 ? true : false;
12074
12094
  _this.totalHorasPermiso = +e.tothorper;
12075
12095
  _this.descontarVacaciones = +e.desvacper;
12076
12096
  _this.codigoPermiso = e.codpermiso;
12077
12097
  _this.idTipoEnfermedad = parseInt(e.id_enfermedad);
12078
12098
  _this.denominacionEnfermedad = e.denenf;
12099
+ _this.denominacionTipoPermiso = _this.TipoPermiso.find(function (e) { return e.value == _this.tipoPermiso; }).denominacion;
12079
12100
  }
12080
12101
  else {
12081
12102
  _this.isNew = true;
@@ -13097,13 +13118,14 @@
13097
13118
  { value: "horper", denominacion: "horaPerersonal" },
13098
13119
  { value: "horper1", denominacion: "horaAdicional1" },
13099
13120
  { value: "horper2", denominacion: "horaAdicional2" },
13121
+ { value: "id_organigrama", denominacion: "idOrganigrama" },
13100
13122
  ];
13101
13123
  var Eventos = [
13102
13124
  { value: "UPDATE" },
13103
13125
  { value: "DELETE" }
13104
13126
  ];
13105
13127
 
13106
- var moment$1 = require("moment");
13128
+ var moment$2 = require("moment");
13107
13129
  var MSnoLog = /** @class */ (function (_super) {
13108
13130
  __extends(MSnoLog, _super);
13109
13131
  function MSnoLog(e) {
@@ -13112,6 +13134,7 @@
13112
13134
  _this.idPersonal = 0;
13113
13135
  _this.idAuditoriaPersonal = 0;
13114
13136
  _this.idRegistro = 0;
13137
+ _this.idNomina = 0;
13115
13138
  _this.fecha = "1900-01-01";
13116
13139
  _this.hora = "";
13117
13140
  _this.campo = "";
@@ -13126,6 +13149,7 @@
13126
13149
  _this.idPersonal = +e.id_personal;
13127
13150
  _this.idAuditoriaPersonal = +e.id_auditoria_personal;
13128
13151
  _this.idRegistro = +e.id_registro;
13152
+ _this.idNomina = +e.id_nomina;
13129
13153
  _this.fecha = e.fecha;
13130
13154
  _this.hora = e.hora;
13131
13155
  _this.campo = e.campo;
@@ -13147,15 +13171,15 @@
13147
13171
  id_personal: this.idPersonal.toString(),
13148
13172
  id_auditoria_personal: this.idAuditoriaPersonal.toString(),
13149
13173
  id_registro: this.idRegistro.toString(),
13150
- fecha: moment$1().format('YYYY-MM-DD'),
13151
- hora: moment$1().format('h:mm:ss a'),
13174
+ id_nomina: this.idNomina.toString(),
13175
+ fecha: moment$2().format('YYYY-MM-DD'),
13176
+ hora: moment$2().format('h:mm:ss a'),
13152
13177
  campo: this.campoPermitido.find(function (e) { return e.denominacion == _this.campo; }).value,
13153
13178
  valor_anterior: this.valorAnterior,
13154
13179
  valor_nuevo: this.evento == 'DELETE' ? '-' : this.valorNuevo,
13155
13180
  codusu: this.codigoUsuario,
13156
13181
  evento: this.evento.toUpperCase(),
13157
- observacion: this.evento == 'DELETE' ? "Eliminado el registro relacionado al campo: " + this.campo :
13158
- "Actualizado el registro relacionado al campo: " + this.campo,
13182
+ observacion: this.observacion
13159
13183
  };
13160
13184
  };
13161
13185
  return MSnoLog;