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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utn-cli",
3
- "version": "2.1.14",
3
+ "version": "2.1.15",
4
4
  "description": "Herramienta CLI unificada para la gestión de plantillas en SIGU.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -65,7 +65,7 @@
65
65
  } -->
66
66
  <div class="contenido">
67
67
  @if(TienePermiso){
68
- @if(Descripcion !== '' && Descripcion !== '-') {
68
+ @if(!esDashboard || tieneTarjetas) {
69
69
  <div class="cabecera2">
70
70
  <div class="cabecera2-info">
71
71
  <p class="titulo2">{{ Descripcion }}</p>
@@ -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 {
@@ -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.eyJ1aWQiOiIxMiIsIklkZW50aWZpY2Fkb3IiOiIxMiIsImlhdCI6MTc3Nzk4OTgwOSwiZXhwIjoxNzc4MDI1ODA5fQ.T1kUm7H4hwbapQ3eFok31GVvezkPitdTlJL96MorozY';
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]) : '';