sigesp 0.9.3-20221025 → 0.9.4-2022-11-20

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.
@@ -2953,12 +2953,14 @@
2953
2953
  _this.serviceId = null;
2954
2954
  _this.denomination = '';
2955
2955
  _this.code = '';
2956
+ _this.status = false;
2956
2957
  if (ser) {
2957
2958
  _this.companyId = parseInt(ser.id_empresa);
2958
2959
  _this.id = parseInt(ser.id_cargo);
2959
2960
  _this.serviceId = parseInt(ser.id_servicio);
2960
2961
  _this.denomination = ser.dencar;
2961
2962
  _this.code = ser.codcar;
2963
+ _this.status = ser.estcarpri == '1' ? true : false;
2962
2964
  }
2963
2965
  else {
2964
2966
  _this.isNew = true;
@@ -2972,6 +2974,7 @@
2972
2974
  id_servicio: this.serviceId.toString(),
2973
2975
  codcar: this.code,
2974
2976
  dencar: this.denomination,
2977
+ estcarpri: this.status ? '1' : '0'
2975
2978
  };
2976
2979
  };
2977
2980
  return MServiceCharge;
@@ -6004,16 +6007,15 @@
6004
6007
  * @description Obtiene los centros de costo
6005
6008
  * @return Observable<MCentroCosto[]>
6006
6009
  * @author Miguel Ramírez
6010
+ * modificado 9-11-2022
6007
6011
  */
6008
- SigespService.prototype.getCentroCosto = function () {
6009
- var request = {
6010
- operacion: 'obtenerData',
6011
- sigesp_conexion: {
6012
- servidor: this.URL,
6013
- usuario: this.usuarioActivo.getInterface()
6012
+ SigespService.prototype.getCentroCosto = function (tipo) {
6013
+ 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) {
6014
+ if (res.success) {
6015
+ res.data = res.data.map(function (e) { return new MCentroCosto(e); });
6014
6016
  }
6015
- };
6016
- return this.http.post(this.URL + "/dao/scg/centrocosto_dao.php", request).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (resp) { return resp.map(function (element) { return new MCentroCosto(element); }); }));
6017
+ return res;
6018
+ }));
6017
6019
  };
6018
6020
  /**
6019
6021
  * @description Obtiene los centros de costo