sigesp 0.9.22-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.
@@ -6008,15 +6008,7 @@ class SigespService {
6008
6008
  * modificado 28-12-2022
6009
6009
  */
6010
6010
  getCentroCosto(tipo = null, id) {
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) => {
6012
- if (tipo == 'all') {
6013
- resp = resp.data.map(element => new MCentroCosto(element));
6014
- }
6015
- else {
6016
- resp.data.map(element => new MCentroCosto(element));
6017
- }
6018
- return resp;
6019
- }));
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))));
6020
6012
  }
6021
6013
  /**
6022
6014
  * @description Obtiene los centros de costo