utn-cli 2.1.14 → 2.1.15
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/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 +1 -0
- package/templates/frontend/src/app/Paginas/contenedor-principal/contenedor-principal.component.ts +2 -0
- package/templates/frontend/src/app/datos-globales.service.ts +2 -1
package/package.json
CHANGED
|
@@ -41,6 +41,7 @@ export class ContenedorComponentesComponent implements OnInit, OnDestroy, AfterV
|
|
|
41
41
|
private intervaloUsuarios: any;
|
|
42
42
|
|
|
43
43
|
get esDashboard(): boolean { return this.router.url === '/'; }
|
|
44
|
+
get tieneTarjetas(): boolean { return this.datosGlobalesService.cantidadDeTarjetas$.value > 0; }
|
|
44
45
|
get filtro(): string { return this.datosGlobalesService.filtroDeTarjetas$.value; }
|
|
45
46
|
|
|
46
47
|
onFiltroChange(event: Event): void {
|
package/templates/frontend/src/app/Paginas/contenedor-principal/contenedor-principal.component.ts
CHANGED
|
@@ -97,10 +97,12 @@ export class ContenedorPrincipalComponent implements OnInit, OnDestroy {
|
|
|
97
97
|
this.http.get(`${this.datosGlobalesService.ObtenerURL()}misc/obtenerTarjetasDelContenedor`).subscribe({
|
|
98
98
|
next: (datos: any) => {
|
|
99
99
|
this.tarjetas = (datos.body ?? []).map((d: any) => this.mapearTarjeta(d));
|
|
100
|
+
this.datosGlobalesService.cantidadDeTarjetas$.next(this.tarjetas.length);
|
|
100
101
|
},
|
|
101
102
|
error: (error) => {
|
|
102
103
|
console.error('Error al obtener las tarjetas del contenedor:', error);
|
|
103
104
|
this.tarjetas = [];
|
|
105
|
+
this.datosGlobalesService.cantidadDeTarjetas$.next(0);
|
|
104
106
|
}
|
|
105
107
|
});
|
|
106
108
|
}
|
|
@@ -7,13 +7,14 @@ import { BehaviorSubject } from 'rxjs';
|
|
|
7
7
|
export class DatosGlobalesService {
|
|
8
8
|
|
|
9
9
|
readonly filtroDeTarjetas$ = new BehaviorSubject<string>('');
|
|
10
|
+
readonly cantidadDeTarjetas$ = new BehaviorSubject<number>(0);
|
|
10
11
|
|
|
11
12
|
constructor() { }
|
|
12
13
|
|
|
13
14
|
ObtenerToken() {
|
|
14
15
|
const baseUrl = this.ObtenerURL();
|
|
15
16
|
if (baseUrl === 'http://localhost/') {
|
|
16
|
-
return 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
|
|
17
|
+
return 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIxMiIsIklkZW50aWZpY2Fkb3IiOiIxMiIsImlhdCI6MTc3ODQzMDUzMSwiZXhwIjoxNzc4NDY2NTMxfQ.C0bScJZ00863G1GsjFLox-V4wBj4nLUc2eXfswiOaxg';
|
|
17
18
|
}
|
|
18
19
|
const match = document.cookie.match(/(?:^|;\s*)_siguid=([^;]+)/);
|
|
19
20
|
let token = match ? decodeURIComponent(match[1]) : '';
|