|
|
@@ -131,39 +131,39 @@ export class TemplateComponent implements OnInit {
|
|
|
let permissions = localStorage.getItem('permisos');
|
|
|
let permStr = await this._encService.decrypt(permissions!);
|
|
|
let permObj: Permissions = JSON.parse(permStr);
|
|
|
- for(const item of menu.response){
|
|
|
- let idMod = await this._encService.decrypt(item.ID_MODULO);
|
|
|
- let modPerm = permObj.permissions.filter(item2 => item2.id == idMod);
|
|
|
-
|
|
|
- if(modPerm.length > 0){
|
|
|
- let access = modPerm[0].access;
|
|
|
-
|
|
|
- // if(access > 0){
|
|
|
- // let customIconEnc = await this._encService.isEncrypted(item.ICONO_PERSONALIZADO);
|
|
|
- // // let customIcon = customIconEnc ? await this._encService.decrypt(item.ICONO_PERSONALIZADO) : item.ICONO_PERSONALIZADO;
|
|
|
- // // item.ICONO_PERSONALIZADO = customIcon;
|
|
|
-
|
|
|
- // // if(customIcon == 'S'){
|
|
|
- // // let customIconFileURL = await lastValueFrom(this._gdelService.getPublicDocumentUrl(
|
|
|
- // // item.ARCHIVO_ICONO_PERSONALIZADO!,
|
|
|
- // // idUser!,
|
|
|
- // // 1
|
|
|
- // // ));
|
|
|
-
|
|
|
- // // item.ARCHIVO_ICONO_PERSONALIZADO_URL = customIconFileURL.response.public_uri;
|
|
|
- // // this._matIconRegistry.addSvgIcon(
|
|
|
- // // item.ICONO_MODULO,
|
|
|
- // // this._domSanitizer.bypassSecurityTrustResourceUrl(customIconFileURL.response.public_uri)
|
|
|
- // // );
|
|
|
- // // }
|
|
|
+ for(const item of menu.response){
|
|
|
+ let idMod = await this._encService.decrypt(item.ID_MODULO);
|
|
|
+ let modPerm = permObj.permissions.filter(item2 => item2.id == idMod);
|
|
|
+
|
|
|
+ if(modPerm.length > 0){
|
|
|
+ let access = modPerm[0].access;
|
|
|
+
|
|
|
+ if(access > 0){
|
|
|
+ let customIconEnc = await this._encService.isEncrypted(item.ICONO_PERSONALIZADO);
|
|
|
+ let customIcon = customIconEnc ? await this._encService.decrypt(item.ICONO_PERSONALIZADO) : item.ICONO_PERSONALIZADO;
|
|
|
+ item.ICONO_PERSONALIZADO = customIcon;
|
|
|
+
|
|
|
+ if(customIcon == 'S'){
|
|
|
+ let customIconFileURL = await lastValueFrom(this._gdelService.getPublicDocumentUrl(
|
|
|
+ item.ARCHIVO_ICONO_PERSONALIZADO!,
|
|
|
+ idUser!,
|
|
|
+ 1
|
|
|
+ ));
|
|
|
+
|
|
|
+ item.ARCHIVO_ICONO_PERSONALIZADO_URL = customIconFileURL.response.public_uri;
|
|
|
+ this._matIconRegistry.addSvgIcon(
|
|
|
+ item.ICONO_MODULO,
|
|
|
+ this._domSanitizer.bypassSecurityTrustResourceUrl(customIconFileURL.response.public_uri)
|
|
|
+ );
|
|
|
+ }
|
|
|
|
|
|
- item.ID_MODULO_DEC = idMod;
|
|
|
- this.menuItems.push(item);
|
|
|
+ item.ID_MODULO_DEC = idMod;
|
|
|
+ this.menuItems.push(item);
|
|
|
|
|
|
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//Conexiones a los eventos del Socket
|
|
|
if (window.innerWidth <= 616) {
|
|
|
@@ -716,6 +716,7 @@ export class TemplateComponent implements OnInit {
|
|
|
notification.FECREG_DISP = this._functionsService.notificationDate(notification.FECREG);
|
|
|
notificationsAux.push(notification);
|
|
|
}
|
|
|
+
|
|
|
this.totalNotifications = notificationsAux;
|
|
|
}, 30000);
|
|
|
}catch(error: any){
|