sigesp 0.9.19-20221221 → 0.9.21-20221229

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.
@@ -331,6 +331,7 @@
331
331
  function MUsuarioPrefijo(e) {
332
332
  var _this = _super.call(this) || this;
333
333
  _this.idEmpresa = 0;
334
+ _this.idEnteprise = 0;
334
335
  _this.id = 0;
335
336
  _this.idUsuario = 0;
336
337
  _this.idDtPrefijo = 0;
@@ -341,6 +342,7 @@
341
342
  _this.estatusActivo = true;
342
343
  if (e) {
343
344
  _this.idEmpresa = +e.id_empresa;
345
+ _this.idEnteprise = +e.id_enterprise;
344
346
  _this.id = +e.id;
345
347
  _this.idUsuario = +e.id_usuario;
346
348
  _this.idDtPrefijo = +e.id_dt_prefijo;
@@ -358,6 +360,7 @@
358
360
  MUsuarioPrefijo.prototype.dataInterface = function () {
359
361
  return {
360
362
  id_empresa: this.idEmpresa.toString(),
363
+ id_enterprise: this.idEnteprise.toString(),
361
364
  id: this.id.toString(),
362
365
  id_usuario: this.idUsuario.toString(),
363
366
  id_dt_prefijo: this.idDtPrefijo.toString(),
@@ -376,6 +379,7 @@
376
379
  function MPrefijo(e) {
377
380
  var _this = _super.call(this) || this;
378
381
  _this.idEmpresa = 0;
382
+ _this.idEnterprise = 0;
379
383
  _this.id = 0;
380
384
  _this.prefijo = '';
381
385
  _this.procede = '';
@@ -391,6 +395,7 @@
391
395
  _this.usuarios = [];
392
396
  if (e) {
393
397
  _this.idEmpresa = +e.id_empresa;
398
+ _this.idEnterprise = +e.id_enterprise;
394
399
  _this.id = +e.id;
395
400
  _this.prefijo = e.prefijo;
396
401
  _this.procede = e.procede;
@@ -415,6 +420,7 @@
415
420
  MPrefijo.prototype.dataInterface = function () {
416
421
  return {
417
422
  id_empresa: this.idEmpresa.toString(),
423
+ id_enterprise: this.idEnterprise.toString(),
418
424
  id: this.id.toString(),
419
425
  prefijo: this.prefijo,
420
426
  procede: this.procede,
@@ -1649,11 +1655,15 @@
1649
1655
  var _this = _super.call(this) || this;
1650
1656
  _this.idEmpresa = 0;
1651
1657
  _this.idEnterprise = 0;
1658
+ _this.usuarios = [];
1652
1659
  if (centroCosto) {
1653
1660
  _this.idEmpresa = +centroCosto.id_empresa;
1654
1661
  _this.idEnterprise = +centroCosto.id_enterprise;
1655
1662
  _this.centro = centroCosto.centro ? centroCosto.centro : centroCosto.codcencos;
1656
1663
  _this.denominacion = centroCosto.denominacion;
1664
+ if (centroCosto.usuarios) {
1665
+ _this.usuarios = centroCosto.usuarios.map(function (e) { return new MUsuarioCentroCosto(e); });
1666
+ }
1657
1667
  }
1658
1668
  else {
1659
1669
  _this.isNew = true;
@@ -1667,6 +1677,7 @@
1667
1677
  id_enterprise: this.idEnterprise.toString(),
1668
1678
  codcencos: this.centro,
1669
1679
  denominacion: this.denominacion,
1680
+ usuarios: this.usuarios.map(function (e) { return e.dataInterface(); }),
1670
1681
  };
1671
1682
  };
1672
1683
  return MCentroCosto;
@@ -1685,7 +1696,7 @@
1685
1696
  _this.idEnterprise = +e.id_enterprise;
1686
1697
  _this.codigoCentroCosto = e.codcencos;
1687
1698
  _this.usuario = e.codusu;
1688
- _this.usuario = e.codusu;
1699
+ _this.idDtCentro = +e.id_dt_cencos;
1689
1700
  }
1690
1701
  else {
1691
1702
  _this.isNew = true;
@@ -6191,7 +6202,7 @@
6191
6202
  * @return Promise<any[]>
6192
6203
  * @author Miguel Ramírez
6193
6204
  */
6194
- SigespService.prototype.getBudgetStructureComplete = function () {
6205
+ SigespService.prototype.getBudgetStructureComplete = function (nivel) {
6195
6206
  return __awaiter(this, void 0, void 0, function () {
6196
6207
  var _this = this;
6197
6208
  return __generator(this, function (_a) {
@@ -6201,7 +6212,7 @@
6201
6212
  switch (_a.label) {
6202
6213
  case 0:
6203
6214
  data = [];
6204
- return [4 /*yield*/, this.getBudgetStructureFive(5).subscribe(function (result) {
6215
+ return [4 /*yield*/, this.getBudgetStructureFive(nivel).subscribe(function (result) {
6205
6216
  data.push.apply(data, __spread(result));
6206
6217
  })];
6207
6218
  case 1:
@@ -6497,14 +6508,19 @@
6497
6508
  * @description Obtiene los centros de costo
6498
6509
  * @return Observable<MCentroCosto[]>
6499
6510
  * @author Miguel Ramírez
6500
- * modificado 9-11-2022
6511
+ * @param id:idusurio o id del ecntro de costo
6512
+ * modificado 28-12-2022
6501
6513
  */
6502
- SigespService.prototype.getCentroCosto = function (tipo) {
6503
- return this.http.get(this.URL + "/dao/scg/centro_costo_dao.php?codigo=" + tipo, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) {
6504
- if (res.success) {
6505
- res.data = res.data.map(function (e) { return new MCentroCosto(e); });
6514
+ SigespService.prototype.getCentroCosto = function (tipo, id) {
6515
+ if (tipo === void 0) { tipo = null; }
6516
+ return this.http.get(this.URL + "/dao/scg/centro_costo_dao.php?tipo=" + tipo + "&id=" + id, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (resp) {
6517
+ if (tipo == 'all') {
6518
+ resp = resp.data.map(function (element) { return new MCentroCosto(element); });
6506
6519
  }
6507
- return res;
6520
+ else {
6521
+ resp.data.map(function (element) { return new MCentroCosto(element); });
6522
+ }
6523
+ return resp;
6508
6524
  }));
6509
6525
  };
6510
6526
  /**
@@ -6521,7 +6537,7 @@
6521
6537
  }));
6522
6538
  };
6523
6539
  SigespService.prototype.getUserCostCenters = function (codigo) {
6524
- return this.http.get(this.URL + "/dao/scg/control_numero_usuario_dao.php?codigo=" + codigo, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) {
6540
+ return this.http.get(this.URL + "/dao/scg/centro_costo_usuario_dao.php?codigo=" + codigo, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) {
6525
6541
  if (res.success) {
6526
6542
  res.data = res.data.map(function (element) { return new MUsuarioCentroCosto(element); });
6527
6543
  }
@@ -8358,7 +8374,7 @@
8358
8374
  TableSelectComponent,
8359
8375
  CatalogoEstructurasComponent,
8360
8376
  CatalogoDobleInputComponent,
8361
- IsoCurrencyPipe
8377
+ IsoCurrencyPipe,
8362
8378
  ],
8363
8379
  imports: [
8364
8380
  common.CommonModule,