|
|
@@ -1,6 +1,7 @@
|
|
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
|
import { Injectable } from '@angular/core';
|
|
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
|
+import { map } from 'rxjs';
|
|
|
import { MESMREInterface } from 'src/app/interfaces/mes/mesmre/mesmre-interface';
|
|
|
import { ResponseData } from 'src/app/interfaces/response-data';
|
|
|
import { USERInterface } from 'src/app/interfaces/user-interface';
|
|
|
@@ -39,14 +40,14 @@ export class MESMREService {
|
|
|
this.usuario_session.IDUSUARIO
|
|
|
)}/${this.formatoRFC(this.usuario_session.RFCEMPRESA)}}`,
|
|
|
{ headers: this.header }
|
|
|
- );
|
|
|
+ ).pipe(map(data => data));
|
|
|
}
|
|
|
|
|
|
consultarUsuario(id: string) {
|
|
|
return this.http.get<MESMREInterface>(
|
|
|
`${this._url}/consultar/${id}/${this.formatoRFC(this.usuario_session.RFCEMPRESA)}}`,
|
|
|
{ headers: this.header }
|
|
|
- );
|
|
|
+ ).pipe(map(data => data));
|
|
|
}
|
|
|
|
|
|
consultarTodos(): any {
|
|
|
@@ -55,7 +56,7 @@ export class MESMREService {
|
|
|
this.usuario_session.PERFIL
|
|
|
)}/${this._encService.desencriptar(this.usuario_session.IDUSUARIO)}/${this.formatoRFC(this.usuario_session.RFCEMPRESA)}}`,
|
|
|
{ headers: this.header }
|
|
|
- );
|
|
|
+ ).pipe(map(data => data));
|
|
|
}
|
|
|
|
|
|
consultarEmpleados(): any {
|
|
|
@@ -66,7 +67,7 @@ export class MESMREService {
|
|
|
this.usuario_session.IDUSUARIO
|
|
|
)}/${this.formatoRFC(this.usuario_session.RFCEMPRESA)}}`,
|
|
|
{ headers: this.header }
|
|
|
- );
|
|
|
+ ).pipe(map(data => data));
|
|
|
}
|
|
|
|
|
|
private formatoRFC(rfc: string){
|