utn-cli 2.0.94 → 2.0.96
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.
- package/package.json +1 -1
- package/templates/backend/rutas/misc.js +1 -1
- package/templates/backend/servicios/Nucleo/Miscelaneas.js +14 -2
- package/templates/frontend/nginx.conf +2 -2
- package/templates/frontend/src/app/Paginas/Nucleo/contenedor-componentes/contenedor-componentes.component.html +1 -1
- package/templates/frontend/src/app/Paginas/Nucleo/contenedor-componentes/contenedor-componentes.component.ts +2 -0
- package/templates/frontend/src/app/Paginas/gestion-tabla/gestion-tabla.component.ts +1 -0
package/package.json
CHANGED
|
@@ -458,7 +458,7 @@ Router.get('/configurarFrontend', async (solicitud, respuesta, next) => {
|
|
|
458
458
|
try {
|
|
459
459
|
if (await Miscelaneo.validarTokenV2(solicitud.headers.authorization) && await Miscelaneo.validarAccesoDelOrigen(solicitud)) {
|
|
460
460
|
try {
|
|
461
|
-
return respuesta.json({ body: await Miscelaneo.configurarFrontend(), error: undefined });
|
|
461
|
+
return respuesta.json({ body: await Miscelaneo.configurarFrontend(solicitud.headers.authorization), error: undefined });
|
|
462
462
|
} catch (error) {
|
|
463
463
|
const MensajeDeError = 'No fue posible obtener la información para configurar el frontend';
|
|
464
464
|
console.error(new ManejadorDeErrores(MensajeDeError, ManejadorDeErrores.obtenerNumeroDeLinea(), true, `Dirección IP: ${solicitud.ip}`));
|
|
@@ -2264,13 +2264,25 @@ class Miscelaneo {
|
|
|
2264
2264
|
return;
|
|
2265
2265
|
}
|
|
2266
2266
|
|
|
2267
|
-
async configurarFrontend() {
|
|
2267
|
+
async configurarFrontend(Token = undefined) {
|
|
2268
|
+
let NombreUsuario = '';
|
|
2269
|
+
if (Token) {
|
|
2270
|
+
try {
|
|
2271
|
+
const datosUsuario = await this.obtenerDatosDelUsuario(Token);
|
|
2272
|
+
if (datosUsuario) {
|
|
2273
|
+
NombreUsuario = `${datosUsuario.Nombre || ''} ${datosUsuario.PrimerApellido || ''} ${datosUsuario.SegundoApellido || ''}`.trim();
|
|
2274
|
+
}
|
|
2275
|
+
} catch (e) {
|
|
2276
|
+
console.error('Error obteniendo datos de usuario para frontend:', e);
|
|
2277
|
+
}
|
|
2278
|
+
}
|
|
2268
2279
|
return {
|
|
2269
2280
|
"Modulo": this.NombreCanonicoDelModulo,
|
|
2270
2281
|
"Titulo": this.NombreDelModulo,
|
|
2271
2282
|
"Version": this.Version + "$$" + this.versionDelNucleo().split(' ')[0],
|
|
2272
2283
|
"Descripcion": this.DescripcionDelModulo,
|
|
2273
|
-
"Detalle": this.DetalleDelModulo
|
|
2284
|
+
"Detalle": this.DetalleDelModulo,
|
|
2285
|
+
"NombreUsuario": NombreUsuario
|
|
2274
2286
|
};
|
|
2275
2287
|
// if (this.NombresParalocalhost().includes(process.env.HOST) && (typeof process.env.DB_HOST_SIGU === "undefined")) {
|
|
2276
2288
|
// try {
|
|
@@ -4,8 +4,8 @@ server {
|
|
|
4
4
|
root /usr/share/nginx/html/browser;
|
|
5
5
|
index index.html;
|
|
6
6
|
location / {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
add_header X-Frame-Options "SAMEORIGIN";
|
|
8
|
+
add_header Content-Security-Policy "frame-ancestors 'self'";
|
|
9
9
|
try_files $uri /index.html;
|
|
10
10
|
}
|
|
11
11
|
error_page 404 /index.html;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<button class="botonDeNavegacion" matTooltip="Salir" (click)="Salir()">
|
|
11
11
|
<mat-icon>logout</mat-icon>
|
|
12
12
|
</button>
|
|
13
|
-
<button class="botonDeNavegacion" matTooltip="Perfil" (click)="irAPerfil()">
|
|
13
|
+
<button class="botonDeNavegacion" [matTooltip]="NombreUsuario || 'Perfil'" (click)="irAPerfil()">
|
|
14
14
|
<mat-icon>person</mat-icon>
|
|
15
15
|
</button>
|
|
16
16
|
} @else {
|
|
@@ -30,6 +30,7 @@ export class ContenedorComponentesComponent implements OnInit, OnDestroy {
|
|
|
30
30
|
public claseDelContenedor: string = '';
|
|
31
31
|
public Descripcion: string = '';
|
|
32
32
|
public Detalle: string = '';
|
|
33
|
+
public NombreUsuario: string = '';
|
|
33
34
|
public UsuariosActuales: number = 0;
|
|
34
35
|
public UsuariosActivos: number = 0;
|
|
35
36
|
public AnimarUsuarios: boolean = true;
|
|
@@ -75,6 +76,7 @@ export class ContenedorComponentesComponent implements OnInit, OnDestroy {
|
|
|
75
76
|
this.Version = datos.body.Version;
|
|
76
77
|
this.Descripcion = datos.body.Descripcion;
|
|
77
78
|
this.Detalle = datos.body.Detalle;
|
|
79
|
+
this.NombreUsuario = datos.body.NombreUsuario || 'Perfil';
|
|
78
80
|
})
|
|
79
81
|
this.http.get(this.datosGlobalesService.ObtenerURL() + 'misc/obtenerNotificaciones', {
|
|
80
82
|
headers: new HttpHeaders({
|