sigesp 0.9.21-20221229 → 0.9.23-20221230

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.
@@ -664,6 +664,7 @@ class MUsuario extends MBasicModel {
664
664
  this.apellido = user.apellido;
665
665
  this.nombre = user.nombre;
666
666
  this.conexionDB = user.conexionDB;
667
+ this.enterprise = +user.id_enterprise;
667
668
  this.empresa = user.empresa;
668
669
  this.token = user.token;
669
670
  this.procede = user.procede;
@@ -1366,13 +1367,16 @@ class MUsuarioCentroCosto extends MBasicModel {
1366
1367
  this.idEmpresa = 0;
1367
1368
  this.idEnterprise = 0;
1368
1369
  this.codigoCentroCosto = '';
1370
+ this.codigoUsuario = '';
1369
1371
  this.usuario = '';
1372
+ this.idUsuario = 0;
1370
1373
  this.idDtCentro = 0;
1371
1374
  if (e) {
1372
1375
  this.idEmpresa = +e.id_empresa;
1373
1376
  this.idEnterprise = +e.id_enterprise;
1374
1377
  this.codigoCentroCosto = e.codcencos;
1375
- this.usuario = e.codusu;
1378
+ this.codigoUsuario = e.codusu;
1379
+ this.usuario = e.nomusu + ' ' + e.apeusu;
1376
1380
  this.idDtCentro = +e.id_dt_cencos;
1377
1381
  }
1378
1382
  else {
@@ -1384,7 +1388,8 @@ class MUsuarioCentroCosto extends MBasicModel {
1384
1388
  id_empresa: this.idEmpresa.toString(),
1385
1389
  id_enterprise: this.idEnterprise.toString(),
1386
1390
  codcencos: this.codigoCentroCosto,
1387
- codusu: this.usuario,
1391
+ codusu: this.codigoUsuario,
1392
+ id_usuario: this.idUsuario.toString(),
1388
1393
  id_dt_cencos: this.idDtCentro.toString(),
1389
1394
  };
1390
1395
  }
@@ -1669,6 +1674,7 @@ class MUserDetail extends MBasicModel {
1669
1674
  super();
1670
1675
  this.id = 0;
1671
1676
  this.idCompany = 0;
1677
+ this.idEnterprise = 0;
1672
1678
  this.lastName = '';
1673
1679
  this.identification = '';
1674
1680
  this.email = '';
@@ -1685,6 +1691,7 @@ class MUserDetail extends MBasicModel {
1685
1691
  this.rights = [];
1686
1692
  if (user) {
1687
1693
  this.idCompany = parseInt(user.id_empresa);
1694
+ this.idEnterprise = parseInt(user.id_enterprise);
1688
1695
  this.id = parseInt(user.id_usuario);
1689
1696
  this.lastName = user.apeusu;
1690
1697
  this.identification = user.cedusu;
@@ -1720,6 +1727,7 @@ class MUserDetail extends MBasicModel {
1720
1727
  fecregusu: this.registrationDate,
1721
1728
  fotusu: this.photo,
1722
1729
  id_empresa: this.idCompany.toString(),
1730
+ id_enterprise: this.idEnterprise.toString(),
1723
1731
  id_usuario: this.id.toString(),
1724
1732
  nomusu: this.name,
1725
1733
  obsusu: this.notes,
@@ -6000,15 +6008,7 @@ class SigespService {
6000
6008
  * modificado 28-12-2022
6001
6009
  */
6002
6010
  getCentroCosto(tipo = null, id) {
6003
- return this.http.get(`${this.URL}/dao/scg/centro_costo_dao.php?tipo=${tipo}&id=${id}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((resp) => {
6004
- if (tipo == 'all') {
6005
- resp = resp.data.map(element => new MCentroCosto(element));
6006
- }
6007
- else {
6008
- resp.data.map(element => new MCentroCosto(element));
6009
- }
6010
- return resp;
6011
- }));
6011
+ return this.http.get(`${this.URL}/dao/scg/centro_costo_dao.php?tipo=${tipo}&id=${id}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((resp) => resp.data.map(element => new MCentroCosto(element))));
6012
6012
  }
6013
6013
  /**
6014
6014
  * @description Obtiene los centros de costo