diff --git a/modules/turnero/views/display_global.php b/modules/turnero/views/display_global.php index 2ad6d1d..2cd244f 100644 --- a/modules/turnero/views/display_global.php +++ b/modules/turnero/views/display_global.php @@ -618,6 +618,10 @@ function renderSnapshot(snap) { if (l.turno) allTurnos.push({ ...l.turno, destino: l.lugar_nombre }); }); + // Eliminar de llamados los turnos que ya no están activos + const activeIds = new Set(allTurnos.map(t => t.id)); + llamados = llamados.filter(l => activeIds.has(l.id)); + // Detectar turnos nuevos y anunciar const currentKeys = new Set(); let anuncioNuevo = false;