|
|
@@ -107,16 +107,10 @@ export class MESMREComponent implements AfterViewInit {
|
|
|
localStorage.getItem('TIMUSERENC')!
|
|
|
);
|
|
|
this.nombre_usuario = usuario.NOMBRE;
|
|
|
-
|
|
|
- if (
|
|
|
- this._encService.desencriptar(JSON.parse(localStorage.getItem('TIMUSERENC')!).PERFIL) === '1'
|
|
|
- ) {
|
|
|
+
|
|
|
+ if (this._encService.desencriptar(JSON.parse(localStorage.getItem('TIMUSERENC')!).PERFIL) === '1') {
|
|
|
this.role = 'Administrador';
|
|
|
- } else if (
|
|
|
- this._encService.desencriptar(
|
|
|
- JSON.parse(localStorage.getItem('TIMUSERENC')!).PERFIL
|
|
|
- ) !== '1'
|
|
|
- ) {
|
|
|
+ } else if (this._encService.desencriptar(JSON.parse(localStorage.getItem('TIMUSERENC')!).PERFIL) !== '1') {
|
|
|
this.opcionesSolicitudes = this.opcionesSolicitudes.slice(0, 1);
|
|
|
this.isUser = true;
|
|
|
this.role = 'Usuario';
|
|
|
@@ -168,11 +162,7 @@ export class MESMREComponent implements AfterViewInit {
|
|
|
}
|
|
|
|
|
|
async obtenerEmpleados() {
|
|
|
- if (
|
|
|
- this._encService.desencriptar(
|
|
|
- JSON.parse(localStorage.getItem('TIMUSERENC')!).PERFIL
|
|
|
- ) === '1'
|
|
|
- ) {
|
|
|
+ if (this._encService.desencriptar(JSON.parse(localStorage.getItem('TIMUSERENC')!).PERFIL) === '1') {
|
|
|
await lastValueFrom(this.__mesmreService.consultarTodos()).then(
|
|
|
(res: any) => {
|
|
|
if (res.error) {
|
|
|
@@ -210,11 +200,7 @@ export class MESMREComponent implements AfterViewInit {
|
|
|
)
|
|
|
)
|
|
|
);
|
|
|
- } else if (
|
|
|
- this._encService.desencriptar(
|
|
|
- JSON.parse(localStorage.getItem('TIMUSERENC')!).PERFIL
|
|
|
- ) !== '1'
|
|
|
- ) {
|
|
|
+ } else if (this._encService.desencriptar(JSON.parse(localStorage.getItem('TIMUSERENC')!).PERFIL) !== '1') {
|
|
|
await lastValueFrom(this.__mesmreService.consultarEmpleados()).then(
|
|
|
(res: any) => {
|
|
|
if (res.error) {
|