utn-cli 2.0.79 → 2.0.81

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.0.79",
3
+ "version": "2.0.81",
4
4
  "description": "Herramienta CLI unificada para la gestión de plantillas en SIGU.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -12,7 +12,7 @@ app.use(helmet());
12
12
  app.use(async (solicitud, respuesta, next) => {
13
13
  let Usuario = null;
14
14
  // Si length es > a 43 es un JWT, de lo contario es un UUID
15
- if (solicitud.headers.authorization.length > 43) {
15
+ if (solicitud.headers.authorization && solicitud.headers.authorization.length > 43) {
16
16
  Usuario = await Miscelaneo.obtenerDatosDelUsuario(solicitud.headers.authorization) ?? null;
17
17
  } else {
18
18
  Usuario = solicitud.user ?? null;
@@ -1,5 +1,5 @@
1
1
  import { Component, OnInit } from "@angular/core";
2
- import { CommonModule } from "@angular/common";
2
+ import { CommonModule } from "@angular/common";
3
3
  import { TarjetaComponent } from "../../Componentes/Nucleo/tarjeta/tarjeta.component";
4
4
  import { TarjetaMultipleComponent } from "../../Componentes/Nucleo/tarjeta-multiple/tarjeta-multiple.component";
5
5
  import { TarjetaReporteComponent } from "../../Componentes/Nucleo/tarjeta-reporte/tarjeta-reporte.component";
@@ -195,53 +195,52 @@ export class ContenedorPrincipalComponent implements OnInit {
195
195
  }
196
196
  ];
197
197
 
198
- // 2. Check for extra permissions (Personas card)
199
- this.http.get(`${this.datosGlobalesService.ObtenerURL()}Personas/PermisoExtra`).subscribe({
200
- next: (datos: any) => {
201
- if (datos.body) {
202
- const personasCard: TarjetaMultipleConfig = {
203
- type: 'multiple',
204
- position: 25,
205
- titulo: 'Personas',
206
- descripcion: 'Módulo para el mantenimiento de los datos relacionados con personas',
207
- rutas: [
208
- { nombre: 'Personas', ruta: 'tablaPersonas' },
209
- { nombre: 'Correos', ruta: 'tablaCorreosPersonas' },
210
- { nombre: 'Cuentas bancarias', ruta: 'tablaCuentasPersonas' },
211
- { nombre: 'Teléfonos', ruta: 'tablaTelefonosPersonas' },
212
- { nombre: 'Ubicación', ruta: 'tablaUbicacionPersona' },
213
- ]
214
- };
215
- baseTarjetas.push(personasCard);
216
- }
217
-
218
- // 3. Load user-specific positions from backend
219
- this.http.get(`${this.datosGlobalesService.ObtenerURL()}ConfiguracionDeTarjetas/obtener`).subscribe({
220
- next: (res: any) => {
221
- if (res.body && res.body.length > 0) {
222
- const savedConfigs = res.body;
223
- baseTarjetas.forEach(tarjeta => {
224
- const config = savedConfigs.find((c: any) => c.Titulo === tarjeta.titulo);
225
- if (config) {
226
- tarjeta.position = config.Posicion;
227
- if (config.ColorDeBorde) {
228
- tarjeta.ColorDeBorde = config.ColorDeBorde;
229
- }
230
- }
231
- });
198
+ // // 2. Check for extra permissions (Personas card)
199
+ // this.http.get(`${this.datosGlobalesService.ObtenerURL()}Personas/PermisoExtra`).subscribe({
200
+ // next: (datos: any) => {
201
+ // if (datos.body) {
202
+ // const personasCard: TarjetaMultipleConfig = {
203
+ // type: 'multiple',
204
+ // position: 25,
205
+ // titulo: 'Personas',
206
+ // descripcion: 'Módulo para el mantenimiento de los datos relacionados con personas',
207
+ // rutas: [
208
+ // { nombre: 'Personas', ruta: 'tablaPersonas' },
209
+ // { nombre: 'Correos', ruta: 'tablaCorreosPersonas' },
210
+ // { nombre: 'Cuentas bancarias', ruta: 'tablaCuentasPersonas' },
211
+ // { nombre: 'Teléfonos', ruta: 'tablaTelefonosPersonas' },
212
+ // { nombre: 'Ubicación', ruta: 'tablaUbicacionPersona' },
213
+ // ]
214
+ // };
215
+ // baseTarjetas.push(personasCard);
216
+ // }
217
+ // },
218
+ // error: (error) => {
219
+ // console.error('Problemas al intentar obtener los datos: ', error);
220
+ // this.tarjetas = baseTarjetas.sort((a, b) => a.position - b.position);
221
+ // },
222
+ // });
223
+ // 3. Load user-specific positions from backend
224
+ this.http.get(`${this.datosGlobalesService.ObtenerURL()}ConfiguracionDeTarjetas/obtener`).subscribe({
225
+ next: (res: any) => {
226
+ if (res.body && res.body.length > 0) {
227
+ const savedConfigs = res.body;
228
+ baseTarjetas.forEach(tarjeta => {
229
+ const config = savedConfigs.find((c: any) => c.Titulo === tarjeta.titulo);
230
+ if (config) {
231
+ tarjeta.position = config.Posicion;
232
+ if (config.ColorDeBorde) {
233
+ tarjeta.ColorDeBorde = config.ColorDeBorde;
234
+ }
232
235
  }
233
- this.tarjetas = baseTarjetas.sort((a, b) => a.position - b.position);
234
- },
235
- error: (error) => {
236
- console.error('Error al obtener configuración de tarjetas:', error);
237
- this.tarjetas = baseTarjetas.sort((a, b) => a.position - b.position);
238
- }
239
- });
236
+ });
237
+ }
238
+ this.tarjetas = baseTarjetas.sort((a, b) => a.position - b.position);
240
239
  },
241
240
  error: (error) => {
242
- console.error('Problemas al intentar obtener los datos: ', error);
241
+ console.error('Error al obtener configuración de tarjetas:', error);
243
242
  this.tarjetas = baseTarjetas.sort((a, b) => a.position - b.position);
244
- },
243
+ }
245
244
  });
246
245
  }
247
246
 
@@ -270,6 +269,12 @@ export class ContenedorPrincipalComponent implements OnInit {
270
269
  });
271
270
  }
272
271
 
272
+ EjecutarAccionPersonalizada(accion: string) {
273
+ // if (accion === 'DescargarInformacionSociodemografica') {
274
+ // this.DescargarInformacionSociodemografica();
275
+ // }
276
+ }
277
+
273
278
  GenerarReporte(event: { reporte: string }) {
274
279
  if (event.reporte === 'ElReporte1') {
275
280
  this.http.get(`${this.datosGlobalesService.ObtenerURL()}misc/DatosParaReporteCSV`, {