@litigiovirtual/ius-alertas 0.1.1 → 0.2.1
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.
|
@@ -3,8 +3,58 @@ import * as i0 from '@angular/core';
|
|
|
3
3
|
import { InjectionToken, makeEnvironmentProviders, inject, Injectable, signal, computed, effect, untracked, input, numberAttribute, output, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
4
|
import { catchError, of, Subject, switchMap, EMPTY, map, finalize } from 'rxjs';
|
|
5
5
|
import { HubConnectionBuilder } from '@microsoft/signalr';
|
|
6
|
+
import { DOCUMENT } from '@angular/common';
|
|
6
7
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
|
-
import { ToastService, DrawerComponent, DropdownComponent, EmptyStateComponent, FlexComponent, IconButtonComponent, IllustrationComponent, IusDrawerHeaderActionsDirective, IusDropdownTriggerDirective, NotificationItemComponent, SectionHeaderComponent, SkeletonComponent, StatusStateComponent } from '@litigiovirtual/ius-design-components';
|
|
8
|
+
import { ToastService, ButtonComponent, DrawerComponent, DropdownComponent, EmptyStateComponent, FlexComponent, IconButtonComponent, IllustrationComponent, IusDrawerHeaderActionsDirective, IusDropdownTriggerDirective, IusModalFooterDirective, ModalComponent, NotificationItemComponent, SectionHeaderComponent, SkeletonComponent, StatusStateComponent, TextAreaComponent } from '@litigiovirtual/ius-design-components';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* El destino de la alerta con `alerta=<id>`; null si no hay destino, si la ruta no es relativa (como la valida el Auth al
|
|
12
|
+
* recibirla) o si el prefijo no tiene web conocida.
|
|
13
|
+
*/
|
|
14
|
+
function resolverDestino(destino, alertaID, app, urlApps) {
|
|
15
|
+
if (!destino) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
const separador = destino.indexOf(':');
|
|
19
|
+
if (separador < 0) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const prefijo = destino.slice(0, separador);
|
|
23
|
+
const relativa = destino.slice(separador + 1);
|
|
24
|
+
// Pegada a la base, una ruta sin su «/» o con «//» cambia de host («@evil.com», «.evil.com»).
|
|
25
|
+
if (!esRutaRelativa(relativa)) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
const ruta = conAlerta(relativa, alertaID);
|
|
29
|
+
if (prefijo === app) {
|
|
30
|
+
return { tipo: 'interno', ruta };
|
|
31
|
+
}
|
|
32
|
+
// Sin hasOwn, «constructor» o «toString» salen del prototipo del objeto.
|
|
33
|
+
const base = Object.hasOwn(urlApps, prefijo) ? urlApps[prefijo] : undefined;
|
|
34
|
+
if (!base) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
return { tipo: 'externo', url: base.replace(/\/+$/, '') + ruta };
|
|
38
|
+
}
|
|
39
|
+
/** El path de una ruta interna, sin query ni fragmento: sirve para saber si el destino es la pantalla actual. */
|
|
40
|
+
function pathDeRuta(ruta) {
|
|
41
|
+
return ruta.split('#')[0].split('?')[0];
|
|
42
|
+
}
|
|
43
|
+
/** La misma regla que `EsDestinoRelativo` del Auth: «/» y algo más, sin «//», sin «\» ni caracteres de control. */
|
|
44
|
+
function esRutaRelativa(ruta) {
|
|
45
|
+
return /^\/[^/]/.test(ruta) && !/[\\\u0000-\u001f\u007f-\u009f]/.test(ruta);
|
|
46
|
+
}
|
|
47
|
+
/** Un `alerta=` que ya traiga el destino se reemplaza; los demás parámetros quedan tal cual, sin recodificar. */
|
|
48
|
+
function conAlerta(ruta, alertaID) {
|
|
49
|
+
const almohadilla = ruta.indexOf('#');
|
|
50
|
+
const sinFragmento = almohadilla < 0 ? ruta : ruta.slice(0, almohadilla);
|
|
51
|
+
const fragmento = almohadilla < 0 ? '' : ruta.slice(almohadilla);
|
|
52
|
+
const interrogacion = sinFragmento.indexOf('?');
|
|
53
|
+
const path = interrogacion < 0 ? sinFragmento : sinFragmento.slice(0, interrogacion);
|
|
54
|
+
const parametros = interrogacion < 0 ? [] : sinFragmento.slice(interrogacion + 1).split('&');
|
|
55
|
+
const otros = parametros.filter(p => p !== '' && p.split('=')[0] !== 'alerta');
|
|
56
|
+
return `${path}?${[...otros, `alerta=${alertaID}`].join('&')}${fragmento}`;
|
|
57
|
+
}
|
|
8
58
|
|
|
9
59
|
/** En el orden del catálogo: es el orden del filtro. */
|
|
10
60
|
const MODULOS_ALERTA = {
|
|
@@ -42,9 +92,29 @@ class AlertasApiService {
|
|
|
42
92
|
headers: this.cabeceras(),
|
|
43
93
|
}));
|
|
44
94
|
}
|
|
95
|
+
destinoNoDisponible(accountID, alertaID) {
|
|
96
|
+
return this.responder(this.http.put(this.url('DestinoNoDisponible'), null, {
|
|
97
|
+
params: { accountID, alertaID },
|
|
98
|
+
headers: this.cabeceras(),
|
|
99
|
+
}));
|
|
100
|
+
}
|
|
101
|
+
solicitudCupo(accountID, solicitudCupoID) {
|
|
102
|
+
return this.responder(this.http.get(this.urlSubscripciones('SolicitudCupo'), {
|
|
103
|
+
params: { accountID, solicitudCupoID },
|
|
104
|
+
headers: this.cabeceras(),
|
|
105
|
+
}));
|
|
106
|
+
}
|
|
107
|
+
resolverSolicitudCupo(cuerpo) {
|
|
108
|
+
return this.responder(this.http.put(this.urlSubscripciones('ResolverSolicitudCupo'), cuerpo, {
|
|
109
|
+
headers: this.cabeceras(),
|
|
110
|
+
}));
|
|
111
|
+
}
|
|
45
112
|
url(accion) {
|
|
46
113
|
return `${this.config.urlAuth}/api/v1/Alert/${accion}`;
|
|
47
114
|
}
|
|
115
|
+
urlSubscripciones(accion) {
|
|
116
|
+
return `${this.config.urlAuth}/api/v1/Subscripciones/${accion}`;
|
|
117
|
+
}
|
|
48
118
|
// Explícito: la cookie de sesión no viaja al dominio del Auth (azurewebsites.net).
|
|
49
119
|
cabeceras() {
|
|
50
120
|
return new HttpHeaders({ Authorization: `Bearer ${this.config.token()}` });
|
|
@@ -212,9 +282,13 @@ function modulosConPendientes(alertas) {
|
|
|
212
282
|
function hayMarcables(alertas) {
|
|
213
283
|
return alertas.some(a => !a.seDecideEnSitio);
|
|
214
284
|
}
|
|
285
|
+
/**
|
|
286
|
+
* Con ids cuentan solo ellos: la referencia no lleva `tipoReferencia`, y una «Tarea» y una «Asignacion» pueden compartir
|
|
287
|
+
* número. La referencia queda para los avisos sin ids (`DismissFromAmacode`).
|
|
288
|
+
*/
|
|
215
289
|
function coincideConSalida(a, salida) {
|
|
216
|
-
if (salida.alertaIDs
|
|
217
|
-
return
|
|
290
|
+
if (salida.alertaIDs)
|
|
291
|
+
return salida.alertaIDs.includes(a.alertaID);
|
|
218
292
|
if (!salida.aplicacionOrigen || !salida.referenciaOrigenId)
|
|
219
293
|
return false;
|
|
220
294
|
return (a.aplicacionOrigen === salida.aplicacionOrigen &&
|
|
@@ -224,7 +298,25 @@ function coincideConSalida(a, salida) {
|
|
|
224
298
|
|
|
225
299
|
const ERROR_GENERICO = 'El servicio no respondió. Vuelve a intentarlo.';
|
|
226
300
|
const ALERTA_NO_ENCONTRADA = 'ALERTA_NO_ENCONTRADA';
|
|
301
|
+
const SOLICITUD_CUPO = 'SolicitudCupo';
|
|
302
|
+
/** La solicitud ya no existe o ya no se puede ver (AC6/AC7): su pantalla dice que no está disponible. */
|
|
303
|
+
const SOLICITUD_NO_DISPONIBLE = ['SOLICITUD_CUPO_NOT_FOUND', 'DETALLE_CONTRATO_NOT_FOUND', 'SUBSCRIPTION_PERMISSION_REQUIRED'];
|
|
304
|
+
const SOLICITUD_YA_RESUELTA = 'SOLICITUD_CUPO_YA_RESUELTA';
|
|
227
305
|
const MINUTO_MS = 60_000;
|
|
306
|
+
/** El error genérico solo con una falla real; un rechazo con código trae su propio mensaje. */
|
|
307
|
+
function mensajeDeError(respuesta) {
|
|
308
|
+
const fallaReal = !respuesta.code || respuesta.code === SERVICIO_NO_DISPONIBLE;
|
|
309
|
+
return fallaReal ? ERROR_GENERICO : respuesta.message || ERROR_GENERICO;
|
|
310
|
+
}
|
|
311
|
+
function solicitudNoDisponible(respuesta) {
|
|
312
|
+
return !respuesta.isSuccess && SOLICITUD_NO_DISPONIBLE.includes(respuesta.code ?? '');
|
|
313
|
+
}
|
|
314
|
+
function solicitudYaResuelta(respuesta) {
|
|
315
|
+
return !respuesta.isSuccess && respuesta.code === SOLICITUD_YA_RESUELTA;
|
|
316
|
+
}
|
|
317
|
+
function solicitudAprobada(cupos) {
|
|
318
|
+
return cupos === 1 ? 'Solicitud aprobada · 1 cupo asignado' : `Solicitud aprobada · ${cupos} cupos asignados`;
|
|
319
|
+
}
|
|
228
320
|
/** El panel de alertas de la cuenta activa: lo que pinta la campana y el drawer, en vivo. */
|
|
229
321
|
class AlertasState {
|
|
230
322
|
constructor() {
|
|
@@ -232,6 +324,7 @@ class AlertasState {
|
|
|
232
324
|
this.api = inject(AlertasApiService);
|
|
233
325
|
this.hub = inject(AlertasHubService);
|
|
234
326
|
this.toast = inject(ToastService);
|
|
327
|
+
this.doc = inject(DOCUMENT);
|
|
235
328
|
this.iniciado = signal(false, /* @ts-ignore */
|
|
236
329
|
...(ngDevMode ? [{ debugName: "iniciado" }] : /* istanbul ignore next */ []));
|
|
237
330
|
this.lista = signal([], /* @ts-ignore */
|
|
@@ -246,11 +339,22 @@ class AlertasState {
|
|
|
246
339
|
...(ngDevMode ? [{ debugName: "_saliendo" }] : /* istanbul ignore next */ []));
|
|
247
340
|
this._ahora = signal(ahoraEnColombia(), /* @ts-ignore */
|
|
248
341
|
...(ngDevMode ? [{ debugName: "_ahora" }] : /* istanbul ignore next */ []));
|
|
342
|
+
this._descarte = signal(null, /* @ts-ignore */
|
|
343
|
+
...(ngDevMode ? [{ debugName: "_descarte" }] : /* istanbul ignore next */ []));
|
|
344
|
+
this._rechazo = signal(null, /* @ts-ignore */
|
|
345
|
+
...(ngDevMode ? [{ debugName: "_rechazo" }] : /* istanbul ignore next */ []));
|
|
346
|
+
this._resolviendo = signal(new Set(), /* @ts-ignore */
|
|
347
|
+
...(ngDevMode ? [{ debugName: "_resolviendo" }] : /* istanbul ignore next */ []));
|
|
249
348
|
this.cargas = new Subject();
|
|
250
349
|
/** Lo que cambió mientras viaja una carga: se reaplica sobre su respuesta, que puede ser anterior. */
|
|
251
350
|
this.enVuelo = null;
|
|
252
|
-
/**
|
|
351
|
+
/**
|
|
352
|
+
* Con el PUT que la saca del Auth pendiente («vista» o destino no disponible), una recarga puede leer la base antes
|
|
353
|
+
* del commit: no vuelven a entrar.
|
|
354
|
+
*/
|
|
253
355
|
this.marcando = new Set();
|
|
356
|
+
/** Cada apertura (y cada reset) deja sin efecto la verificación de la anterior: gana la última. */
|
|
357
|
+
this.aperturas = 0;
|
|
254
358
|
this.abierto = this._abierto.asReadonly();
|
|
255
359
|
this.estado = this._estado.asReadonly();
|
|
256
360
|
this.filtro = this._filtro.asReadonly();
|
|
@@ -258,6 +362,12 @@ class AlertasState {
|
|
|
258
362
|
this.saliendo = this._saliendo.asReadonly();
|
|
259
363
|
/** Hora de pared de Colombia (ver `ahoraEnColombia`); se refresca cada minuto con el panel abierto. */
|
|
260
364
|
this.ahora = this._ahora.asReadonly();
|
|
365
|
+
/** La alerta que espera «Descartar y continuar» (AC5). */
|
|
366
|
+
this.descarte = this._descarte.asReadonly();
|
|
367
|
+
/** La solicitud de cupo con el modal de rechazo abierto. */
|
|
368
|
+
this.rechazo = this._rechazo.asReadonly();
|
|
369
|
+
/** Las solicitudes, por `alertaID`, con Aprobar o Rechazar en vuelo. */
|
|
370
|
+
this.resolviendo = this._resolviendo.asReadonly();
|
|
261
371
|
this.vigentes = computed(() => this.lista().filter(a => !this._saliendo().has(a.alertaID)), /* @ts-ignore */
|
|
262
372
|
...(ngDevMode ? [{ debugName: "vigentes" }] : /* istanbul ignore next */ []));
|
|
263
373
|
/** El número de la campana. */
|
|
@@ -277,7 +387,7 @@ class AlertasState {
|
|
|
277
387
|
.pipe(switchMap(cuenta => (cuenta === undefined ? EMPTY : this.api.pendientes(cuenta).pipe(map(r => ({ cuenta, r }))))), takeUntilDestroyed())
|
|
278
388
|
.subscribe(({ cuenta, r }) => this.alCargar(cuenta, r));
|
|
279
389
|
this.hub.llegadas$.pipe(takeUntilDestroyed()).subscribe(alerta => this.alLlegar(alerta));
|
|
280
|
-
this.hub.salidas$.pipe(takeUntilDestroyed()).subscribe(salida => this.
|
|
390
|
+
this.hub.salidas$.pipe(takeUntilDestroyed()).subscribe(salida => this.alSalir(salida));
|
|
281
391
|
this.hub.conectado$.pipe(takeUntilDestroyed()).subscribe(() => this.recargar());
|
|
282
392
|
this.config.sesionCerrada$.pipe(takeUntilDestroyed()).subscribe(() => this.alCerrarSesion());
|
|
283
393
|
effect(() => {
|
|
@@ -350,6 +460,68 @@ class AlertasState {
|
|
|
350
460
|
this.devolver(cuenta, marcables, r);
|
|
351
461
|
});
|
|
352
462
|
}
|
|
463
|
+
/**
|
|
464
|
+
* «Ver detalle» o la tarjeta: lleva a su destino sin quitarla (AC2, AC3). Las informativas no se abren, ni la solicitud
|
|
465
|
+
* con Aprobar o Rechazar en vuelo: su verificación respondería YA_RESUELTA y saldrían dos avisos.
|
|
466
|
+
*/
|
|
467
|
+
abrir(alerta) {
|
|
468
|
+
if (alerta.clase === 'info' || this._resolviendo().has(alerta.alertaID))
|
|
469
|
+
return;
|
|
470
|
+
this.aperturas++;
|
|
471
|
+
const destino = this.destinoDe(alerta);
|
|
472
|
+
this.cerrar();
|
|
473
|
+
// Sin destino no hay a dónde ir ni cambios que perder: solo se cierra el panel.
|
|
474
|
+
if (!destino)
|
|
475
|
+
return;
|
|
476
|
+
if (this.pideDescarte(destino)) {
|
|
477
|
+
this._descarte.set(alerta);
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
this.irA(alerta);
|
|
481
|
+
}
|
|
482
|
+
confirmarDescarte() {
|
|
483
|
+
const alerta = this._descarte();
|
|
484
|
+
if (!alerta)
|
|
485
|
+
return;
|
|
486
|
+
this.aperturas++;
|
|
487
|
+
this.config.cambiosSinGuardar?.descartar();
|
|
488
|
+
this._descarte.set(null);
|
|
489
|
+
// Descartar puede llevar a otra pantalla (el «Cancelar» de un formulario vuelve a su lista): no es que la persona se fuera.
|
|
490
|
+
this.irA(alerta, true);
|
|
491
|
+
}
|
|
492
|
+
/** Sigo donde estaba, con el panel cerrado. */
|
|
493
|
+
cancelarDescarte() {
|
|
494
|
+
this._descarte.set(null);
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* La pantalla de destino ya no muestra lo que menciona la alerta (AC6/AC7): sale y el Auth deja de tenerla.
|
|
498
|
+
* No exige que esté en la lista: la pantalla puede avisar antes de que el panel cargue.
|
|
499
|
+
*/
|
|
500
|
+
destinoNoDisponible(alertaID) {
|
|
501
|
+
this.avisarNoDisponible(alertaID).subscribe();
|
|
502
|
+
}
|
|
503
|
+
/** Aprueba lo pedido, sin confirmación (inventario 4.6). */
|
|
504
|
+
aprobar(alerta) {
|
|
505
|
+
this.resolverSolicitud(alerta, { aprobar: true }, r => {
|
|
506
|
+
this.toast.success(solicitudAprobada(r.object?.cuposAprobados ?? 0));
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
pedirRechazo(alerta) {
|
|
510
|
+
this._rechazo.set(alerta);
|
|
511
|
+
}
|
|
512
|
+
cancelarRechazo() {
|
|
513
|
+
this._rechazo.set(null);
|
|
514
|
+
}
|
|
515
|
+
/** Con una falla, el modal sigue abierto y conserva la razón para reintentar. */
|
|
516
|
+
rechazar(razon) {
|
|
517
|
+
const alerta = this._rechazo();
|
|
518
|
+
if (!alerta)
|
|
519
|
+
return;
|
|
520
|
+
this.resolverSolicitud(alerta, { aprobar: false, razon: razon.trim() }, () => {
|
|
521
|
+
this.cerrarRechazo(alerta);
|
|
522
|
+
this.toast.success('Solicitud rechazada');
|
|
523
|
+
});
|
|
524
|
+
}
|
|
353
525
|
/** Fin de la transición de salida. */
|
|
354
526
|
quitar(alertaID) {
|
|
355
527
|
this.soltar([alertaID]);
|
|
@@ -363,6 +535,10 @@ class AlertasState {
|
|
|
363
535
|
this._saliendo.set(new Set());
|
|
364
536
|
this._filtro.set(null);
|
|
365
537
|
this._estado.set('cargando');
|
|
538
|
+
this._descarte.set(null);
|
|
539
|
+
this._rechazo.set(null);
|
|
540
|
+
this._resolviendo.set(new Set());
|
|
541
|
+
this.aperturas++;
|
|
366
542
|
}
|
|
367
543
|
recargar() {
|
|
368
544
|
const cuenta = this.config.cuentaActiva();
|
|
@@ -398,6 +574,18 @@ class AlertasState {
|
|
|
398
574
|
this.toast.info(`${modulo} · ${alerta.titulo}`, { message: alerta.descripcion });
|
|
399
575
|
}
|
|
400
576
|
}
|
|
577
|
+
alSalir(salida) {
|
|
578
|
+
const rechazo = this._rechazo();
|
|
579
|
+
const descarte = this._descarte();
|
|
580
|
+
// Como el Drawer de F11 (inventario 4.15): si otro la resolvió, el modal ya no tiene qué decidir.
|
|
581
|
+
if (rechazo && coincideConSalida(rechazo, salida))
|
|
582
|
+
this._rechazo.set(null);
|
|
583
|
+
// Una solicitud resuelta tampoco tiene a dónde llevar: su descarte se cierra y los cambios se quedan. Un destino que no
|
|
584
|
+
// se decide en el sitio sigue ahí aunque la alerta salga.
|
|
585
|
+
if (descarte?.seDecideEnSitio && coincideConSalida(descarte, salida))
|
|
586
|
+
this._descarte.set(null);
|
|
587
|
+
this.sacar(a => coincideConSalida(a, salida));
|
|
588
|
+
}
|
|
401
589
|
alCerrarSesion() {
|
|
402
590
|
this.iniciado.set(false);
|
|
403
591
|
this._abierto.set(false);
|
|
@@ -419,8 +607,120 @@ class AlertasState {
|
|
|
419
607
|
return;
|
|
420
608
|
this.soltar(alertas.map(a => a.alertaID));
|
|
421
609
|
this.aplicar(lista => [...lista, ...alertas.filter(a => !lista.some(b => b.alertaID === a.alertaID))]);
|
|
422
|
-
|
|
423
|
-
|
|
610
|
+
this.toast.error(mensajeDeError(respuesta));
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* Una solicitud se verifica antes de salir: si otro ya la resolvió, se dice aquí; si ya no existe o ya no se puede ver,
|
|
614
|
+
* sale del panel y su pantalla dice que no está disponible (AC6/AC7).
|
|
615
|
+
*/
|
|
616
|
+
irA(alerta, trasDescartar = false) {
|
|
617
|
+
const destino = this.destinoDe(alerta);
|
|
618
|
+
const cuenta = this.config.cuentaActiva();
|
|
619
|
+
if (!destino)
|
|
620
|
+
return;
|
|
621
|
+
if (alerta.tipoReferencia !== SOLICITUD_CUPO || cuenta === undefined) {
|
|
622
|
+
this.navegar(destino);
|
|
623
|
+
return;
|
|
624
|
+
}
|
|
625
|
+
const apertura = this.aperturas;
|
|
626
|
+
const pantalla = trasDescartar ? null : this.doc.location.pathname;
|
|
627
|
+
this.api.solicitudCupo(cuenta, Number(alerta.referenciaOrigenId)).subscribe(r => {
|
|
628
|
+
// Hexti puede tardar hasta el timeout del Auth: si mientras tanto se abrió otra o cambió la sesión, esta ya no manda.
|
|
629
|
+
if (apertura !== this.aperturas || cuenta !== this.config.cuentaActiva())
|
|
630
|
+
return;
|
|
631
|
+
// Tampoco si la persona se fue a otra pantalla por el menú: ya no quiere ir. Se compara el path porque la pantalla puede limpiar su
|
|
632
|
+
// propia query (replaceUrl) en ese rato sin que la persona se haya ido.
|
|
633
|
+
if (pantalla !== null && this.doc.location.pathname !== pantalla)
|
|
634
|
+
return;
|
|
635
|
+
if (solicitudYaResuelta(r)) {
|
|
636
|
+
this.perdida(alerta, r.message);
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
639
|
+
// Mientras se verificaba pudo empezar una edición. La que ya no está disponible sale después de decidir: su
|
|
640
|
+
// DismissAlert cerraría el modal.
|
|
641
|
+
if (this.pideDescarte(destino)) {
|
|
642
|
+
this._descarte.set(alerta);
|
|
643
|
+
return;
|
|
644
|
+
}
|
|
645
|
+
// Una falla real (Hexti o el Auth caídos) no dice que no exista: se navega igual.
|
|
646
|
+
if (solicitudNoDisponible(r)) {
|
|
647
|
+
this.irANoDisponible(alerta, destino);
|
|
648
|
+
return;
|
|
649
|
+
}
|
|
650
|
+
this.navegar(destino);
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
/** En otra web se espera al Auth: salir de la página cortaría el aviso. */
|
|
654
|
+
irANoDisponible(alerta, destino) {
|
|
655
|
+
const aviso = this.avisarNoDisponible(alerta.alertaID);
|
|
656
|
+
if (destino.tipo === 'interno') {
|
|
657
|
+
aviso.subscribe();
|
|
658
|
+
this.navegar(destino);
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
aviso.pipe(finalize(() => this.navegar(destino))).subscribe();
|
|
662
|
+
}
|
|
663
|
+
/** En la misma pantalla el destino se aplica sobre ella: no se sale de nada ni hay cambios que perder. */
|
|
664
|
+
pideDescarte(destino) {
|
|
665
|
+
const mismaPantalla = destino.tipo === 'interno' && pathDeRuta(destino.ruta) === this.doc.location.pathname;
|
|
666
|
+
return !mismaPantalla && !!this.config.cambiosSinGuardar?.hay();
|
|
667
|
+
}
|
|
668
|
+
navegar(destino) {
|
|
669
|
+
if (destino.tipo === 'interno') {
|
|
670
|
+
this.config.navegar(destino.ruta);
|
|
671
|
+
return;
|
|
672
|
+
}
|
|
673
|
+
this.doc.location.href = destino.url;
|
|
674
|
+
}
|
|
675
|
+
destinoDe(alerta) {
|
|
676
|
+
return resolverDestino(alerta.destino, alerta.alertaID, this.config.app, this.config.urlApps);
|
|
677
|
+
}
|
|
678
|
+
/** Sin pantalla a la que llevar (otro la resolvió, o se decidía desde la alerta): sale y se avisa con el `message` del backend. */
|
|
679
|
+
perdida(alerta, mensaje) {
|
|
680
|
+
this.destinoNoDisponible(alerta.alertaID);
|
|
681
|
+
this.toast.error(mensaje || ERROR_GENERICO);
|
|
682
|
+
}
|
|
683
|
+
/** Con una falla no vuelve: el Auth la sigue teniendo y la trae la próxima carga. */
|
|
684
|
+
avisarNoDisponible(alertaID) {
|
|
685
|
+
const cuenta = this.config.cuentaActiva();
|
|
686
|
+
if (cuenta === undefined || this.marcando.has(alertaID))
|
|
687
|
+
return of(null);
|
|
688
|
+
this.sacar(a => a.alertaID === alertaID);
|
|
689
|
+
return this.mientrasSeMarca([alertaID], this.api.destinoNoDisponible(cuenta, alertaID));
|
|
690
|
+
}
|
|
691
|
+
/** Una sola resolución en vuelo por solicitud. Con otro código o una falla real, la alerta se queda. */
|
|
692
|
+
resolverSolicitud(alerta, decision, alResolver) {
|
|
693
|
+
const cuenta = this.config.cuentaActiva();
|
|
694
|
+
const id = alerta.alertaID;
|
|
695
|
+
if (cuenta === undefined || this._resolviendo().has(id))
|
|
696
|
+
return;
|
|
697
|
+
this._resolviendo.update(ids => new Set([...ids, id]));
|
|
698
|
+
this.api
|
|
699
|
+
.resolverSolicitudCupo({ accountID: cuenta, solicitudCupoID: Number(alerta.referenciaOrigenId), ...decision })
|
|
700
|
+
.pipe(finalize(() => this._resolviendo.update(ids => new Set([...ids].filter(i => i !== id)))))
|
|
701
|
+
.subscribe(r => {
|
|
702
|
+
// Si ya no está en `resolviendo`, un reset (cambio de cuenta o cierre de sesión) la soltó: es de antes.
|
|
703
|
+
if (!this._resolviendo().has(id) || cuenta !== this.config.cuentaActiva())
|
|
704
|
+
return;
|
|
705
|
+
if (r.isSuccess) {
|
|
706
|
+
// El Auth cierra el aviso de todos, también el de quien resuelve, antes de responder: su DismissAlert suele
|
|
707
|
+
// llegar primero. Sacarla otra vez no la duplica, y el aviso de éxito va igual.
|
|
708
|
+
this.sacar(a => a.alertaID === id);
|
|
709
|
+
alResolver(r);
|
|
710
|
+
return;
|
|
711
|
+
}
|
|
712
|
+
if (solicitudNoDisponible(r) || solicitudYaResuelta(r)) {
|
|
713
|
+
this.cerrarRechazo(alerta);
|
|
714
|
+
this.perdida(alerta, r.message);
|
|
715
|
+
return;
|
|
716
|
+
}
|
|
717
|
+
this.toast.error(mensajeDeError(r));
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
/** Solo si el modal sigue siendo el de esta solicitud: pudo cancelarse y abrirse otro mientras viajaba. */
|
|
721
|
+
cerrarRechazo(alerta) {
|
|
722
|
+
if (this._rechazo()?.alertaID === alerta.alertaID)
|
|
723
|
+
this._rechazo.set(null);
|
|
424
724
|
}
|
|
425
725
|
mientrasSeMarca(ids, peticion) {
|
|
426
726
|
ids.forEach(id => this.marcando.add(id));
|
|
@@ -455,6 +755,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
455
755
|
|
|
456
756
|
/** Valor de «Todos los módulos» en el filtro. */
|
|
457
757
|
const TODOS = 'todas';
|
|
758
|
+
/** Las acciones de una solicitud de cupo: se deciden en el sitio, sin salir de la pantalla. */
|
|
759
|
+
const ACCIONES_SOLICITUD = [
|
|
760
|
+
{ key: 'aprobar', label: 'Aprobar', primary: true },
|
|
761
|
+
{ key: 'rechazar', label: 'Rechazar' },
|
|
762
|
+
];
|
|
458
763
|
/** El panel de alertas (inventario F6·HU-1 §2–§6): solo pinta lo que recibe y avisa lo que pide el usuario. */
|
|
459
764
|
class AlertasPanelComponent {
|
|
460
765
|
constructor() {
|
|
@@ -479,6 +784,15 @@ class AlertasPanelComponent {
|
|
|
479
784
|
/** Hora de pared de Colombia (`ahoraEnColombia`): de ella salen «hace N» y la hora. */
|
|
480
785
|
this.ahora = input.required(/* @ts-ignore */
|
|
481
786
|
...(ngDevMode ? [{ debugName: "ahora" }] : /* istanbul ignore next */ []));
|
|
787
|
+
/** La alerta que espera «Descartar y continuar». */
|
|
788
|
+
this.descarte = input(null, /* @ts-ignore */
|
|
789
|
+
...(ngDevMode ? [{ debugName: "descarte" }] : /* istanbul ignore next */ []));
|
|
790
|
+
/** La solicitud de cupo con el modal de rechazo abierto. */
|
|
791
|
+
this.rechazo = input(null, /* @ts-ignore */
|
|
792
|
+
...(ngDevMode ? [{ debugName: "rechazo" }] : /* istanbul ignore next */ []));
|
|
793
|
+
/** Las solicitudes con Aprobar o Rechazar en vuelo. */
|
|
794
|
+
this.resolviendo = input(new Set(), /* @ts-ignore */
|
|
795
|
+
...(ngDevMode ? [{ debugName: "resolviendo" }] : /* istanbul ignore next */ []));
|
|
482
796
|
this.cerrar = output();
|
|
483
797
|
this.reintentar = output();
|
|
484
798
|
this.filtrar = output();
|
|
@@ -489,6 +803,13 @@ class AlertasPanelComponent {
|
|
|
489
803
|
this.quitada = output();
|
|
490
804
|
/** «Ver detalle» o la tarjeta de una alerta de acción (HU-2). */
|
|
491
805
|
this.abrirAlerta = output();
|
|
806
|
+
/** «Aprobar» o «Rechazar» de una solicitud de cupo. */
|
|
807
|
+
this.accionAlerta = output();
|
|
808
|
+
this.confirmarDescarte = output();
|
|
809
|
+
this.cancelarDescarte = output();
|
|
810
|
+
/** La razón que escribió quien rechaza. */
|
|
811
|
+
this.confirmarRechazo = output();
|
|
812
|
+
this.cancelarRechazo = output();
|
|
492
813
|
/** Con un filtro, la lista puede quedar vacía aunque haya pendientes de otros módulos. */
|
|
493
814
|
this.hayPendientes = computed(() => this.grupos().length > 0 || this.modulos().length > 0, /* @ts-ignore */
|
|
494
815
|
...(ngDevMode ? [{ debugName: "hayPendientes" }] : /* istanbul ignore next */ []));
|
|
@@ -503,6 +824,16 @@ class AlertasPanelComponent {
|
|
|
503
824
|
...(ngDevMode ? [{ debugName: "cuerpo" }] : /* istanbul ignore next */ []));
|
|
504
825
|
this.conAcciones = computed(() => this.estado() === 'listo' && this.hayPendientes(), /* @ts-ignore */
|
|
505
826
|
...(ngDevMode ? [{ debugName: "conAcciones" }] : /* istanbul ignore next */ []));
|
|
827
|
+
/** Se limpia cada vez que cambia la solicitud del modal de rechazo. */
|
|
828
|
+
this.razon = signal('', /* @ts-ignore */
|
|
829
|
+
...(ngDevMode ? [{ debugName: "razon" }] : /* istanbul ignore next */ []));
|
|
830
|
+
this.sinRazon = computed(() => this.razon().trim() === '', /* @ts-ignore */
|
|
831
|
+
...(ngDevMode ? [{ debugName: "sinRazon" }] : /* istanbul ignore next */ []));
|
|
832
|
+
this.rechazando = computed(() => {
|
|
833
|
+
const alerta = this.rechazo();
|
|
834
|
+
return alerta !== null && this.resolviendo().has(alerta.alertaID);
|
|
835
|
+
}, /* @ts-ignore */
|
|
836
|
+
...(ngDevMode ? [{ debugName: "rechazando" }] : /* istanbul ignore next */ []));
|
|
506
837
|
this.valorFiltro = computed(() => this.filtro() ?? TODOS, /* @ts-ignore */
|
|
507
838
|
...(ngDevMode ? [{ debugName: "valorFiltro" }] : /* istanbul ignore next */ []));
|
|
508
839
|
this.tooltipFiltro = computed(() => {
|
|
@@ -524,20 +855,37 @@ class AlertasPanelComponent {
|
|
|
524
855
|
modulo: MODULOS_ALERTA[alerta.modulo],
|
|
525
856
|
tiempo: tiempoDeAlerta(alerta.fechaRegistro, ahora),
|
|
526
857
|
deAccion: alerta.clase !== 'info',
|
|
858
|
+
acciones: this.accionesDe(alerta),
|
|
527
859
|
})),
|
|
528
860
|
}));
|
|
529
861
|
}, /* @ts-ignore */
|
|
530
862
|
...(ngDevMode ? [{ debugName: "secciones" }] : /* istanbul ignore next */ []));
|
|
863
|
+
effect(() => {
|
|
864
|
+
this.rechazo();
|
|
865
|
+
this.razon.set('');
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
/** Cada acción se deshabilita mientras su solicitud se resuelve. */
|
|
869
|
+
accionesDe(alerta) {
|
|
870
|
+
if (!alerta.seDecideEnSitio || alerta.tipoReferencia !== 'SolicitudCupo') {
|
|
871
|
+
return [];
|
|
872
|
+
}
|
|
873
|
+
const enVuelo = this.resolviendo().has(alerta.alertaID);
|
|
874
|
+
return ACCIONES_SOLICITUD.map(accion => ({ ...accion, disabled: enVuelo }));
|
|
875
|
+
}
|
|
876
|
+
alAccionar(alerta, key) {
|
|
877
|
+
this.accionAlerta.emit({ alerta, accion: key === 'aprobar' ? 'aprobar' : 'rechazar' });
|
|
531
878
|
}
|
|
532
879
|
alFiltrar(valor) {
|
|
533
880
|
this.filtrar.emit(valor === TODOS || valor === undefined ? null : valor);
|
|
534
881
|
}
|
|
535
882
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AlertasPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
536
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AlertasPanelComponent, isStandalone: true, selector: "ius-alertas-panel", inputs: { offsetTop: { classPropertyName: "offsetTop", publicName: "offsetTop", isSignal: true, isRequired: false, transformFunction: null }, abierto: { classPropertyName: "abierto", publicName: "abierto", isSignal: true, isRequired: false, transformFunction: null }, estado: { classPropertyName: "estado", publicName: "estado", isSignal: true, isRequired: false, transformFunction: null }, grupos: { classPropertyName: "grupos", publicName: "grupos", isSignal: true, isRequired: false, transformFunction: null }, modulos: { classPropertyName: "modulos", publicName: "modulos", isSignal: true, isRequired: false, transformFunction: null }, filtro: { classPropertyName: "filtro", publicName: "filtro", isSignal: true, isRequired: false, transformFunction: null }, hayMarcables: { classPropertyName: "hayMarcables", publicName: "hayMarcables", isSignal: true, isRequired: false, transformFunction: null }, saliendo: { classPropertyName: "saliendo", publicName: "saliendo", isSignal: true, isRequired: false, transformFunction: null }, ahora: { classPropertyName: "ahora", publicName: "ahora", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { cerrar: "cerrar", reintentar: "reintentar", filtrar: "filtrar", marcarVista: "marcarVista", marcarTodas: "marcarTodas", quitada: "quitada", abrirAlerta: "abrirAlerta" }, ngImport: i0, template: "<ius-drawer\n side=\"right\"\n size=\"sm\"\n title=\"Alertas\"\n showClose\n [showScrim]=\"false\"\n [closeOnScrim]=\"false\"\n [offsetTop]=\"offsetTop()\"\n [open]=\"abierto()\"\n (closed)=\"cerrar.emit()\"\n>\n @if (conAcciones()) {\n <div iusDrawerHeaderActions ius-flex gap=\"xxs\" align=\"center\">\n @if (modulos().length > 1) {\n <ius-dropdown\n selectable\n placement=\"bottom-end\"\n label=\"Filtrar por m\u00F3dulo\"\n ariaLabel=\"Filtrar por m\u00F3dulo\"\n [items]=\"opciones()\"\n [value]=\"valorFiltro()\"\n (valueChange)=\"alFiltrar($event.value)\"\n >\n <ius-icon-button\n iusDropdownTrigger\n icon=\"filter_list\"\n shape=\"circle\"\n size=\"small\"\n ariaLabel=\"Filtrar\"\n [variant]=\"filtro() ? 'secondary' : 'tertiary'\"\n [tooltip]=\"tooltipFiltro()\"\n />\n </ius-dropdown>\n }\n <ius-icon-button\n icon=\"done_all\"\n variant=\"tertiary\"\n shape=\"circle\"\n size=\"small\"\n tooltip=\"Marcar todas como vistas\"\n ariaLabel=\"Marcar todas como vistas\"\n [disabled]=\"!hayMarcables()\"\n (clicked)=\"marcarTodas.emit()\"\n />\n </div>\n }\n\n @switch (cuerpo()) {\n @case ('cargando') {\n <div ius-flex direction=\"column\" gap=\"sm\">\n @for (pieza of [0, 1, 2, 3]; track pieza) {\n <ius-skeleton variant=\"rect\" height=\"56px\" />\n }\n </div>\n }\n @case ('error') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-status-state\n status=\"error\"\n size=\"compact\"\n title=\"No se cargaron las alertas\"\n [illustrationTemplate]=\"ilustracionError\"\n [primaryAction]=\"{ label: 'Reintentar', icon: 'refresh' }\"\n (primaryClick)=\"reintentar.emit()\"\n />\n </div>\n }\n @case ('al-dia') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-empty-state\n size=\"compact\"\n variant=\"no-data\"\n illustration=\"empty-inbox\"\n title=\"Est\u00E1s al d\u00EDa\"\n description=\"Cuando pase algo en tus procesos, tus tareas o tu cuenta, te avisamos aqu\u00ED.\"\n />\n </div>\n }\n @case ('sin-resultados') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-empty-state\n size=\"compact\"\n variant=\"no-results\"\n title=\"No hay alertas de este m\u00F3dulo\"\n primaryAction=\"Ver todas\"\n [illustration]=\"true\"\n (primaryClick)=\"filtrar.emit(null)\"\n />\n </div>\n }\n @default {\n <div ius-flex direction=\"column\" gap=\"md\">\n @for (seccion of secciones(); track seccion.dia) {\n <div ius-flex direction=\"column\" gap=\"xs\">\n <ius-section-header variant=\"group\" [count]=\"seccion.alertas.length\">{{ seccion.etiqueta }}</ius-section-header>\n <div>\n @for (fila of seccion.filas; track fila.alerta.alertaID) {\n <ius-notification-item\n [kind]=\"fila.deAccion ? 'action' : 'info'\"\n [icon]=\"fila.modulo.icono\"\n [module]=\"fila.modulo.etiqueta\"\n [title]=\"fila.alerta.titulo\"\n [message]=\"fila.alerta.descripcion\"\n [time]=\"fila.tiempo\"\n [dismissible]=\"!fila.alerta.seDecideEnSitio\"\n [leaving]=\"saliendo().has(fila.alerta.alertaID)\"\n (opened)=\"abrirAlerta.emit(fila.alerta)\"\n (dismissed)=\"marcarVista.emit(fila.alerta.alertaID)\"\n (exited)=\"quitada.emit(fila.alerta.alertaID)\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n }\n</ius-drawer>\n\n<ng-template #ilustracionError>\n <ius-illustration name=\"screenError\" size=\"small\" />\n</ng-template>\n", styles: [".ius-alertas-panel__centro{min-height:100%}\n"], dependencies: [{ kind: "component", type: DrawerComponent, selector: "ius-drawer", inputs: ["open", "defaultOpen", "side", "size", "title", "centerTitle", "showBack", "showClose", "closeOnScrim", "closeOnEsc", "showScrim", "offsetTop", "ariaLabel"], outputs: ["closed", "openChange", "back"] }, { kind: "component", type: DropdownComponent, selector: "ius-dropdown", inputs: ["items", "selectable", "value", "label", "triggerLabel", "triggerIcon", "tone", "variant", "placement", "open", "defaultOpen", "ariaLabel"], outputs: ["valueChange", "openChange"] }, { kind: "component", type: EmptyStateComponent, selector: "ius-empty-state", inputs: ["variant", "size", "tone", "icon", "illustration", "illustrationTemplate", "title", "description", "primaryAction", "secondaryAction", "actionsTemplate", "role"], outputs: ["primaryClick", "secondaryClick"] }, { kind: "component", type: FlexComponent, selector: "ius-flex, [ius-flex]", inputs: ["direction", "gap", "align", "justify", "wrap", "inline"] }, { kind: "component", type: IconButtonComponent, selector: "ius-icon-button", inputs: ["icon", "variant", "size", "shape", "disabled", "type", "ariaLabel", "tooltip", "ariaPressed", "ariaExpanded", "ariaControls", "ariaHaspopup", "tooltipPlacement"], outputs: ["clicked"] }, { kind: "component", type: IllustrationComponent, selector: "ius-illustration", inputs: ["name", "size", "title"] }, { kind: "directive", type: IusDrawerHeaderActionsDirective, selector: "[iusDrawerHeaderActions]" }, { kind: "directive", type: IusDropdownTriggerDirective, selector: "[iusDropdownTrigger]" }, { kind: "component", type: NotificationItemComponent, selector: "ius-notification-item", inputs: ["kind", "icon", "module", "title", "message", "time", "unread", "dismissible", "openLabel", "dismissLabel", "actions", "leaving"], outputs: ["opened", "dismissed", "actionClick", "exited"] }, { kind: "component", type: SectionHeaderComponent, selector: "ius-section-header", inputs: ["icon", "count", "variant", "accent", "collapsible", "collapsed", "sticky", "ariaLabel"], outputs: ["toggle"] }, { kind: "component", type: SkeletonComponent, selector: "ius-skeleton", inputs: ["variant", "width", "height", "radius", "lines", "lastLineWidth", "bars", "gap", "animation", "loading", "ariaLabel"] }, { kind: "component", type: StatusStateComponent, selector: "ius-status-state", inputs: ["status", "code", "showCode", "title", "description", "illustrationTemplate", "icon", "tone", "size", "primaryAction", "secondaryAction", "role"], outputs: ["primaryClick", "secondaryClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
883
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AlertasPanelComponent, isStandalone: true, selector: "ius-alertas-panel", inputs: { offsetTop: { classPropertyName: "offsetTop", publicName: "offsetTop", isSignal: true, isRequired: false, transformFunction: null }, abierto: { classPropertyName: "abierto", publicName: "abierto", isSignal: true, isRequired: false, transformFunction: null }, estado: { classPropertyName: "estado", publicName: "estado", isSignal: true, isRequired: false, transformFunction: null }, grupos: { classPropertyName: "grupos", publicName: "grupos", isSignal: true, isRequired: false, transformFunction: null }, modulos: { classPropertyName: "modulos", publicName: "modulos", isSignal: true, isRequired: false, transformFunction: null }, filtro: { classPropertyName: "filtro", publicName: "filtro", isSignal: true, isRequired: false, transformFunction: null }, hayMarcables: { classPropertyName: "hayMarcables", publicName: "hayMarcables", isSignal: true, isRequired: false, transformFunction: null }, saliendo: { classPropertyName: "saliendo", publicName: "saliendo", isSignal: true, isRequired: false, transformFunction: null }, ahora: { classPropertyName: "ahora", publicName: "ahora", isSignal: true, isRequired: true, transformFunction: null }, descarte: { classPropertyName: "descarte", publicName: "descarte", isSignal: true, isRequired: false, transformFunction: null }, rechazo: { classPropertyName: "rechazo", publicName: "rechazo", isSignal: true, isRequired: false, transformFunction: null }, resolviendo: { classPropertyName: "resolviendo", publicName: "resolviendo", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cerrar: "cerrar", reintentar: "reintentar", filtrar: "filtrar", marcarVista: "marcarVista", marcarTodas: "marcarTodas", quitada: "quitada", abrirAlerta: "abrirAlerta", accionAlerta: "accionAlerta", confirmarDescarte: "confirmarDescarte", cancelarDescarte: "cancelarDescarte", confirmarRechazo: "confirmarRechazo", cancelarRechazo: "cancelarRechazo" }, ngImport: i0, template: "<ius-drawer\n side=\"right\"\n size=\"sm\"\n title=\"Alertas\"\n showClose\n [showScrim]=\"false\"\n [closeOnScrim]=\"false\"\n [offsetTop]=\"offsetTop()\"\n [open]=\"abierto()\"\n (closed)=\"cerrar.emit()\"\n>\n @if (conAcciones()) {\n <div iusDrawerHeaderActions ius-flex gap=\"xxs\" align=\"center\">\n @if (modulos().length > 1) {\n <ius-dropdown\n selectable\n placement=\"bottom-end\"\n label=\"Filtrar por m\u00F3dulo\"\n ariaLabel=\"Filtrar por m\u00F3dulo\"\n [items]=\"opciones()\"\n [value]=\"valorFiltro()\"\n (valueChange)=\"alFiltrar($event.value)\"\n >\n <ius-icon-button\n iusDropdownTrigger\n icon=\"filter_list\"\n shape=\"circle\"\n size=\"small\"\n ariaLabel=\"Filtrar\"\n [variant]=\"filtro() ? 'secondary' : 'tertiary'\"\n [tooltip]=\"tooltipFiltro()\"\n />\n </ius-dropdown>\n }\n <ius-icon-button\n icon=\"done_all\"\n variant=\"tertiary\"\n shape=\"circle\"\n size=\"small\"\n tooltip=\"Marcar todas como vistas\"\n ariaLabel=\"Marcar todas como vistas\"\n [disabled]=\"!hayMarcables()\"\n (clicked)=\"marcarTodas.emit()\"\n />\n </div>\n }\n\n @switch (cuerpo()) {\n @case ('cargando') {\n <div ius-flex direction=\"column\" gap=\"sm\">\n @for (pieza of [0, 1, 2, 3]; track pieza) {\n <ius-skeleton variant=\"rect\" height=\"56px\" />\n }\n </div>\n }\n @case ('error') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-status-state\n status=\"error\"\n size=\"compact\"\n title=\"No se cargaron las alertas\"\n [illustrationTemplate]=\"ilustracionError\"\n [primaryAction]=\"{ label: 'Reintentar', icon: 'refresh' }\"\n (primaryClick)=\"reintentar.emit()\"\n />\n </div>\n }\n @case ('al-dia') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-empty-state\n size=\"compact\"\n variant=\"no-data\"\n illustration=\"empty-inbox\"\n title=\"Est\u00E1s al d\u00EDa\"\n description=\"Cuando pase algo en tus procesos, tus tareas o tu cuenta, te avisamos aqu\u00ED.\"\n />\n </div>\n }\n @case ('sin-resultados') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-empty-state\n size=\"compact\"\n variant=\"no-results\"\n title=\"No hay alertas de este m\u00F3dulo\"\n primaryAction=\"Ver todas\"\n [illustration]=\"true\"\n (primaryClick)=\"filtrar.emit(null)\"\n />\n </div>\n }\n @default {\n <div ius-flex direction=\"column\" gap=\"md\">\n @for (seccion of secciones(); track seccion.dia) {\n <div ius-flex direction=\"column\" gap=\"xs\">\n <ius-section-header variant=\"group\" [count]=\"seccion.alertas.length\">{{ seccion.etiqueta }}</ius-section-header>\n <div>\n @for (fila of seccion.filas; track fila.alerta.alertaID) {\n <ius-notification-item\n [kind]=\"fila.deAccion ? 'action' : 'info'\"\n [icon]=\"fila.modulo.icono\"\n [module]=\"fila.modulo.etiqueta\"\n [title]=\"fila.alerta.titulo\"\n [message]=\"fila.alerta.descripcion\"\n [time]=\"fila.tiempo\"\n [dismissible]=\"!fila.alerta.seDecideEnSitio\"\n [leaving]=\"saliendo().has(fila.alerta.alertaID)\"\n [actions]=\"fila.acciones\"\n (opened)=\"abrirAlerta.emit(fila.alerta)\"\n (actionClick)=\"alAccionar(fila.alerta, $event)\"\n (dismissed)=\"marcarVista.emit(fila.alerta.alertaID)\"\n (exited)=\"quitada.emit(fila.alerta.alertaID)\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n }\n</ius-drawer>\n\n@if (rechazo()) {\n <ius-modal\n open\n size=\"small\"\n title=\"\u00BFRechazar la solicitud?\"\n (closed)=\"cancelarRechazo.emit()\"\n >\n <ius-text-area\n label=\"Raz\u00F3n del rechazo\"\n placeholder=\"Expl\u00EDcale al solicitante por qu\u00E9 no apruebas la solicitud\"\n required\n rows=\"3\"\n (valueChange)=\"razon.set($event)\"\n />\n <div iusModalFooter ius-flex justify=\"end\" gap=\"xs\">\n <ius-button variant=\"tertiary\" label=\"Cancelar\" (clicked)=\"cancelarRechazo.emit()\" />\n <ius-button\n variant=\"danger\"\n prefixIcon=\"close\"\n label=\"Rechazar solicitud\"\n [disabled]=\"sinRazon() || rechazando()\"\n (clicked)=\"confirmarRechazo.emit(razon())\"\n />\n </div>\n </ius-modal>\n}\n\n@if (descarte()) {\n <ius-modal\n open\n size=\"small\"\n dividers\n icon=\"help\"\n iconTone=\"warning\"\n destructive\n title=\"\u00BFDescartar los cambios?\"\n description=\"Tienes cambios sin guardar en esta pantalla.\"\n secondaryLabel=\"Cancelar\"\n primaryLabel=\"Descartar y continuar\"\n (closed)=\"cancelarDescarte.emit()\"\n (secondary)=\"cancelarDescarte.emit()\"\n (primary)=\"confirmarDescarte.emit()\"\n />\n}\n\n<ng-template #ilustracionError>\n <ius-illustration name=\"screenError\" size=\"small\" />\n</ng-template>\n", styles: [".ius-alertas-panel__centro{min-height:100%}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "ius-button", inputs: ["variant", "label", "prefixIcon", "sufixIcon", "dynamic", "loading", "status", "disabled", "pressed", "fullWidth", "type", "ariaLabel", "ariaCurrent", "action", "size"], outputs: ["clicked"] }, { kind: "component", type: DrawerComponent, selector: "ius-drawer", inputs: ["open", "defaultOpen", "side", "size", "title", "centerTitle", "showBack", "showClose", "closeOnScrim", "closeOnEsc", "showScrim", "offsetTop", "ariaLabel"], outputs: ["closed", "openChange", "back"] }, { kind: "component", type: DropdownComponent, selector: "ius-dropdown", inputs: ["items", "selectable", "value", "label", "triggerLabel", "triggerIcon", "tone", "variant", "placement", "open", "defaultOpen", "ariaLabel"], outputs: ["valueChange", "openChange"] }, { kind: "component", type: EmptyStateComponent, selector: "ius-empty-state", inputs: ["variant", "size", "tone", "icon", "illustration", "illustrationTemplate", "title", "description", "primaryAction", "secondaryAction", "actionsTemplate", "role"], outputs: ["primaryClick", "secondaryClick"] }, { kind: "component", type: FlexComponent, selector: "ius-flex, [ius-flex]", inputs: ["direction", "gap", "align", "justify", "wrap", "inline"] }, { kind: "component", type: IconButtonComponent, selector: "ius-icon-button", inputs: ["icon", "variant", "size", "shape", "disabled", "type", "ariaLabel", "tooltip", "ariaPressed", "ariaExpanded", "ariaControls", "ariaHaspopup", "tooltipPlacement"], outputs: ["clicked"] }, { kind: "component", type: IllustrationComponent, selector: "ius-illustration", inputs: ["name", "size", "title"] }, { kind: "directive", type: IusDrawerHeaderActionsDirective, selector: "[iusDrawerHeaderActions]" }, { kind: "directive", type: IusDropdownTriggerDirective, selector: "[iusDropdownTrigger]" }, { kind: "directive", type: IusModalFooterDirective, selector: "[iusModalFooter]" }, { kind: "component", type: ModalComponent, selector: "ius-modal", inputs: ["open", "size", "title", "description", "icon", "iconTone", "showClose", "primaryLabel", "primaryLoading", "primaryDisabled", "destructive", "secondaryLabel", "dividers", "closeOnScrim", "closeOnEsc", "zIndex", "ariaLabel"], outputs: ["closed", "primary", "secondary"] }, { kind: "component", type: NotificationItemComponent, selector: "ius-notification-item", inputs: ["kind", "icon", "module", "title", "message", "time", "unread", "dismissible", "openLabel", "dismissLabel", "actions", "leaving"], outputs: ["opened", "dismissed", "actionClick", "exited"] }, { kind: "component", type: SectionHeaderComponent, selector: "ius-section-header", inputs: ["icon", "count", "variant", "accent", "collapsible", "collapsed", "sticky", "ariaLabel"], outputs: ["toggle"] }, { kind: "component", type: SkeletonComponent, selector: "ius-skeleton", inputs: ["variant", "width", "height", "radius", "lines", "lastLineWidth", "bars", "gap", "animation", "loading", "ariaLabel"] }, { kind: "component", type: StatusStateComponent, selector: "ius-status-state", inputs: ["status", "code", "showCode", "title", "description", "illustrationTemplate", "icon", "tone", "size", "primaryAction", "secondaryAction", "role"], outputs: ["primaryClick", "secondaryClick"] }, { kind: "component", type: TextAreaComponent, selector: "ius-text-area", inputs: ["label", "placeholder", "required", "helpText", "errorText", "showHelpText", "showIconHelp", "iconHelpTitle", "iconHelpContent", "name", "rows", "maxRows", "autoGrow", "resizable", "maxLength", "showCount", "error", "disabled", "size", "state"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
537
884
|
}
|
|
538
885
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AlertasPanelComponent, decorators: [{
|
|
539
886
|
type: Component,
|
|
540
887
|
args: [{ selector: 'ius-alertas-panel', standalone: true, imports: [
|
|
888
|
+
ButtonComponent,
|
|
541
889
|
DrawerComponent,
|
|
542
890
|
DropdownComponent,
|
|
543
891
|
EmptyStateComponent,
|
|
@@ -546,12 +894,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
546
894
|
IllustrationComponent,
|
|
547
895
|
IusDrawerHeaderActionsDirective,
|
|
548
896
|
IusDropdownTriggerDirective,
|
|
897
|
+
IusModalFooterDirective,
|
|
898
|
+
ModalComponent,
|
|
549
899
|
NotificationItemComponent,
|
|
550
900
|
SectionHeaderComponent,
|
|
551
901
|
SkeletonComponent,
|
|
552
902
|
StatusStateComponent,
|
|
553
|
-
|
|
554
|
-
|
|
903
|
+
TextAreaComponent,
|
|
904
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ius-drawer\n side=\"right\"\n size=\"sm\"\n title=\"Alertas\"\n showClose\n [showScrim]=\"false\"\n [closeOnScrim]=\"false\"\n [offsetTop]=\"offsetTop()\"\n [open]=\"abierto()\"\n (closed)=\"cerrar.emit()\"\n>\n @if (conAcciones()) {\n <div iusDrawerHeaderActions ius-flex gap=\"xxs\" align=\"center\">\n @if (modulos().length > 1) {\n <ius-dropdown\n selectable\n placement=\"bottom-end\"\n label=\"Filtrar por m\u00F3dulo\"\n ariaLabel=\"Filtrar por m\u00F3dulo\"\n [items]=\"opciones()\"\n [value]=\"valorFiltro()\"\n (valueChange)=\"alFiltrar($event.value)\"\n >\n <ius-icon-button\n iusDropdownTrigger\n icon=\"filter_list\"\n shape=\"circle\"\n size=\"small\"\n ariaLabel=\"Filtrar\"\n [variant]=\"filtro() ? 'secondary' : 'tertiary'\"\n [tooltip]=\"tooltipFiltro()\"\n />\n </ius-dropdown>\n }\n <ius-icon-button\n icon=\"done_all\"\n variant=\"tertiary\"\n shape=\"circle\"\n size=\"small\"\n tooltip=\"Marcar todas como vistas\"\n ariaLabel=\"Marcar todas como vistas\"\n [disabled]=\"!hayMarcables()\"\n (clicked)=\"marcarTodas.emit()\"\n />\n </div>\n }\n\n @switch (cuerpo()) {\n @case ('cargando') {\n <div ius-flex direction=\"column\" gap=\"sm\">\n @for (pieza of [0, 1, 2, 3]; track pieza) {\n <ius-skeleton variant=\"rect\" height=\"56px\" />\n }\n </div>\n }\n @case ('error') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-status-state\n status=\"error\"\n size=\"compact\"\n title=\"No se cargaron las alertas\"\n [illustrationTemplate]=\"ilustracionError\"\n [primaryAction]=\"{ label: 'Reintentar', icon: 'refresh' }\"\n (primaryClick)=\"reintentar.emit()\"\n />\n </div>\n }\n @case ('al-dia') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-empty-state\n size=\"compact\"\n variant=\"no-data\"\n illustration=\"empty-inbox\"\n title=\"Est\u00E1s al d\u00EDa\"\n description=\"Cuando pase algo en tus procesos, tus tareas o tu cuenta, te avisamos aqu\u00ED.\"\n />\n </div>\n }\n @case ('sin-resultados') {\n <div ius-flex direction=\"column\" align=\"center\" justify=\"center\" class=\"ius-alertas-panel__centro\">\n <ius-empty-state\n size=\"compact\"\n variant=\"no-results\"\n title=\"No hay alertas de este m\u00F3dulo\"\n primaryAction=\"Ver todas\"\n [illustration]=\"true\"\n (primaryClick)=\"filtrar.emit(null)\"\n />\n </div>\n }\n @default {\n <div ius-flex direction=\"column\" gap=\"md\">\n @for (seccion of secciones(); track seccion.dia) {\n <div ius-flex direction=\"column\" gap=\"xs\">\n <ius-section-header variant=\"group\" [count]=\"seccion.alertas.length\">{{ seccion.etiqueta }}</ius-section-header>\n <div>\n @for (fila of seccion.filas; track fila.alerta.alertaID) {\n <ius-notification-item\n [kind]=\"fila.deAccion ? 'action' : 'info'\"\n [icon]=\"fila.modulo.icono\"\n [module]=\"fila.modulo.etiqueta\"\n [title]=\"fila.alerta.titulo\"\n [message]=\"fila.alerta.descripcion\"\n [time]=\"fila.tiempo\"\n [dismissible]=\"!fila.alerta.seDecideEnSitio\"\n [leaving]=\"saliendo().has(fila.alerta.alertaID)\"\n [actions]=\"fila.acciones\"\n (opened)=\"abrirAlerta.emit(fila.alerta)\"\n (actionClick)=\"alAccionar(fila.alerta, $event)\"\n (dismissed)=\"marcarVista.emit(fila.alerta.alertaID)\"\n (exited)=\"quitada.emit(fila.alerta.alertaID)\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n }\n</ius-drawer>\n\n@if (rechazo()) {\n <ius-modal\n open\n size=\"small\"\n title=\"\u00BFRechazar la solicitud?\"\n (closed)=\"cancelarRechazo.emit()\"\n >\n <ius-text-area\n label=\"Raz\u00F3n del rechazo\"\n placeholder=\"Expl\u00EDcale al solicitante por qu\u00E9 no apruebas la solicitud\"\n required\n rows=\"3\"\n (valueChange)=\"razon.set($event)\"\n />\n <div iusModalFooter ius-flex justify=\"end\" gap=\"xs\">\n <ius-button variant=\"tertiary\" label=\"Cancelar\" (clicked)=\"cancelarRechazo.emit()\" />\n <ius-button\n variant=\"danger\"\n prefixIcon=\"close\"\n label=\"Rechazar solicitud\"\n [disabled]=\"sinRazon() || rechazando()\"\n (clicked)=\"confirmarRechazo.emit(razon())\"\n />\n </div>\n </ius-modal>\n}\n\n@if (descarte()) {\n <ius-modal\n open\n size=\"small\"\n dividers\n icon=\"help\"\n iconTone=\"warning\"\n destructive\n title=\"\u00BFDescartar los cambios?\"\n description=\"Tienes cambios sin guardar en esta pantalla.\"\n secondaryLabel=\"Cancelar\"\n primaryLabel=\"Descartar y continuar\"\n (closed)=\"cancelarDescarte.emit()\"\n (secondary)=\"cancelarDescarte.emit()\"\n (primary)=\"confirmarDescarte.emit()\"\n />\n}\n\n<ng-template #ilustracionError>\n <ius-illustration name=\"screenError\" size=\"small\" />\n</ng-template>\n", styles: [".ius-alertas-panel__centro{min-height:100%}\n"] }]
|
|
905
|
+
}], ctorParameters: () => [], propDecorators: { offsetTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "offsetTop", required: false }] }], abierto: [{ type: i0.Input, args: [{ isSignal: true, alias: "abierto", required: false }] }], estado: [{ type: i0.Input, args: [{ isSignal: true, alias: "estado", required: false }] }], grupos: [{ type: i0.Input, args: [{ isSignal: true, alias: "grupos", required: false }] }], modulos: [{ type: i0.Input, args: [{ isSignal: true, alias: "modulos", required: false }] }], filtro: [{ type: i0.Input, args: [{ isSignal: true, alias: "filtro", required: false }] }], hayMarcables: [{ type: i0.Input, args: [{ isSignal: true, alias: "hayMarcables", required: false }] }], saliendo: [{ type: i0.Input, args: [{ isSignal: true, alias: "saliendo", required: false }] }], ahora: [{ type: i0.Input, args: [{ isSignal: true, alias: "ahora", required: true }] }], descarte: [{ type: i0.Input, args: [{ isSignal: true, alias: "descarte", required: false }] }], rechazo: [{ type: i0.Input, args: [{ isSignal: true, alias: "rechazo", required: false }] }], resolviendo: [{ type: i0.Input, args: [{ isSignal: true, alias: "resolviendo", required: false }] }], cerrar: [{ type: i0.Output, args: ["cerrar"] }], reintentar: [{ type: i0.Output, args: ["reintentar"] }], filtrar: [{ type: i0.Output, args: ["filtrar"] }], marcarVista: [{ type: i0.Output, args: ["marcarVista"] }], marcarTodas: [{ type: i0.Output, args: ["marcarTodas"] }], quitada: [{ type: i0.Output, args: ["quitada"] }], abrirAlerta: [{ type: i0.Output, args: ["abrirAlerta"] }], accionAlerta: [{ type: i0.Output, args: ["accionAlerta"] }], confirmarDescarte: [{ type: i0.Output, args: ["confirmarDescarte"] }], cancelarDescarte: [{ type: i0.Output, args: ["cancelarDescarte"] }], confirmarRechazo: [{ type: i0.Output, args: ["confirmarRechazo"] }], cancelarRechazo: [{ type: i0.Output, args: ["cancelarRechazo"] }] } });
|
|
555
906
|
|
|
556
907
|
/** El panel conectado a `AlertasState`: cada web monta solo esta etiqueta. */
|
|
557
908
|
class IusAlertasComponent {
|
|
@@ -559,11 +910,17 @@ class IusAlertasComponent {
|
|
|
559
910
|
this.alertas = inject(AlertasState);
|
|
560
911
|
/** Alto del encabezado de la web. */
|
|
561
912
|
this.offsetTop = input(0, { ...(ngDevMode ? { debugName: "offsetTop" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
562
|
-
|
|
563
|
-
|
|
913
|
+
}
|
|
914
|
+
alAccionar(alerta, accion) {
|
|
915
|
+
if (accion === 'aprobar') {
|
|
916
|
+
this.alertas.aprobar(alerta);
|
|
917
|
+
}
|
|
918
|
+
else {
|
|
919
|
+
this.alertas.pedirRechazo(alerta);
|
|
920
|
+
}
|
|
564
921
|
}
|
|
565
922
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: IusAlertasComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
566
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: IusAlertasComponent, isStandalone: true, selector: "ius-alertas", inputs: { offsetTop: { classPropertyName: "offsetTop", publicName: "offsetTop", isSignal: true, isRequired: false, transformFunction: null } },
|
|
923
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: IusAlertasComponent, isStandalone: true, selector: "ius-alertas", inputs: { offsetTop: { classPropertyName: "offsetTop", publicName: "offsetTop", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `<ius-alertas-panel
|
|
567
924
|
[offsetTop]="offsetTop()"
|
|
568
925
|
[abierto]="alertas.abierto()"
|
|
569
926
|
[estado]="alertas.estado()"
|
|
@@ -573,14 +930,22 @@ class IusAlertasComponent {
|
|
|
573
930
|
[hayMarcables]="alertas.hayMarcables()"
|
|
574
931
|
[saliendo]="alertas.saliendo()"
|
|
575
932
|
[ahora]="alertas.ahora()"
|
|
933
|
+
[descarte]="alertas.descarte()"
|
|
934
|
+
[rechazo]="alertas.rechazo()"
|
|
935
|
+
[resolviendo]="alertas.resolviendo()"
|
|
576
936
|
(cerrar)="alertas.cerrar()"
|
|
577
937
|
(reintentar)="alertas.reintentar()"
|
|
578
938
|
(filtrar)="alertas.filtrar($event)"
|
|
579
939
|
(marcarVista)="alertas.marcarVista($event)"
|
|
580
940
|
(marcarTodas)="alertas.marcarTodasVistas()"
|
|
581
941
|
(quitada)="alertas.quitar($event)"
|
|
582
|
-
(abrirAlerta)="
|
|
583
|
-
|
|
942
|
+
(abrirAlerta)="alertas.abrir($event)"
|
|
943
|
+
(accionAlerta)="alAccionar($event.alerta, $event.accion)"
|
|
944
|
+
(confirmarDescarte)="alertas.confirmarDescarte()"
|
|
945
|
+
(cancelarDescarte)="alertas.cancelarDescarte()"
|
|
946
|
+
(confirmarRechazo)="alertas.rechazar($event)"
|
|
947
|
+
(cancelarRechazo)="alertas.cancelarRechazo()"
|
|
948
|
+
/>`, isInline: true, dependencies: [{ kind: "component", type: AlertasPanelComponent, selector: "ius-alertas-panel", inputs: ["offsetTop", "abierto", "estado", "grupos", "modulos", "filtro", "hayMarcables", "saliendo", "ahora", "descarte", "rechazo", "resolviendo"], outputs: ["cerrar", "reintentar", "filtrar", "marcarVista", "marcarTodas", "quitada", "abrirAlerta", "accionAlerta", "confirmarDescarte", "cancelarDescarte", "confirmarRechazo", "cancelarRechazo"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
584
949
|
}
|
|
585
950
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: IusAlertasComponent, decorators: [{
|
|
586
951
|
type: Component,
|
|
@@ -598,21 +963,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
598
963
|
[hayMarcables]="alertas.hayMarcables()"
|
|
599
964
|
[saliendo]="alertas.saliendo()"
|
|
600
965
|
[ahora]="alertas.ahora()"
|
|
966
|
+
[descarte]="alertas.descarte()"
|
|
967
|
+
[rechazo]="alertas.rechazo()"
|
|
968
|
+
[resolviendo]="alertas.resolviendo()"
|
|
601
969
|
(cerrar)="alertas.cerrar()"
|
|
602
970
|
(reintentar)="alertas.reintentar()"
|
|
603
971
|
(filtrar)="alertas.filtrar($event)"
|
|
604
972
|
(marcarVista)="alertas.marcarVista($event)"
|
|
605
973
|
(marcarTodas)="alertas.marcarTodasVistas()"
|
|
606
974
|
(quitada)="alertas.quitar($event)"
|
|
607
|
-
(abrirAlerta)="
|
|
975
|
+
(abrirAlerta)="alertas.abrir($event)"
|
|
976
|
+
(accionAlerta)="alAccionar($event.alerta, $event.accion)"
|
|
977
|
+
(confirmarDescarte)="alertas.confirmarDescarte()"
|
|
978
|
+
(cancelarDescarte)="alertas.cancelarDescarte()"
|
|
979
|
+
(confirmarRechazo)="alertas.rechazar($event)"
|
|
980
|
+
(cancelarRechazo)="alertas.cancelarRechazo()"
|
|
608
981
|
/>`,
|
|
609
982
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
610
983
|
}]
|
|
611
|
-
}], propDecorators: { offsetTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "offsetTop", required: false }] }]
|
|
984
|
+
}], propDecorators: { offsetTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "offsetTop", required: false }] }] } });
|
|
612
985
|
|
|
613
986
|
/**
|
|
614
987
|
* Generated bundle index. Do not edit.
|
|
615
988
|
*/
|
|
616
989
|
|
|
617
|
-
export { ALERTAS_CONFIG, AlertasApiService, AlertasHubService, AlertasPanelComponent, AlertasState, IusAlertasComponent, MODULOS_ALERTA, SERVICIO_NO_DISPONIBLE, agruparAlertasPorDia, ahoraEnColombia, claveAlerta, coincideConSalida, esDelPanel, etiquetaDia, hayMarcables, horaCorta, modulosConPendientes, provideAlertas, tiempoDeAlerta };
|
|
990
|
+
export { ALERTAS_CONFIG, AlertasApiService, AlertasHubService, AlertasPanelComponent, AlertasState, IusAlertasComponent, MODULOS_ALERTA, SERVICIO_NO_DISPONIBLE, agruparAlertasPorDia, ahoraEnColombia, claveAlerta, coincideConSalida, esDelPanel, etiquetaDia, hayMarcables, horaCorta, modulosConPendientes, pathDeRuta, provideAlertas, resolverDestino, tiempoDeAlerta };
|
|
618
991
|
//# sourceMappingURL=litigiovirtual-ius-alertas.mjs.map
|