From 23a21d02fbfbfbfa91cbdaf6978bcdeb6fbd7671 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Thu, 11 Jun 2026 22:36:11 -0500 Subject: [PATCH] Update display_global.php --- modules/turnero/views/display_global.php | 74 ++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 6 deletions(-) diff --git a/modules/turnero/views/display_global.php b/modules/turnero/views/display_global.php index 64c498b..279b0d2 100644 --- a/modules/turnero/views/display_global.php +++ b/modules/turnero/views/display_global.php @@ -112,6 +112,13 @@ $_hasVideo = (bool)$_tvVideo; } + /* ── Left area ── */ + .left-area { + display: flex; flex-direction: column; + overflow: hidden; + position: relative; + } + /* ── Turno activo (centro) ── */ .turno-activo { display: flex; flex-direction: column; @@ -120,6 +127,7 @@ $_hasVideo = (bool)$_tvVideo; padding: 1rem; position: relative; overflow: hidden; + flex: 1; } .turno-activo .label { font-size: clamp(1.1rem, 1.7vw, 1.3rem); @@ -157,6 +165,33 @@ $_hasVideo = (bool)$_tvVideo; color: #cbd5e1; } + /* ── Últimos llamados ── */ + .ultimos-llamados { + flex-shrink: 0; + border-top: 1px solid #e2e8f0; + padding: .3rem 1.5rem .5rem; + background: #fff; + } + .ultimos-llamados .ul-label { + font-size: .7rem; font-weight: 700; text-transform: uppercase; + letter-spacing: 2px; color: #94a3b8; margin-bottom: .2rem; + } + .ultimos-llamados .ul-scroll { + display: flex; gap: .5rem; + overflow-x: auto; scrollbar-width: none; + } + .ultimos-llamados .ul-scroll::-webkit-scrollbar { display: none; } + .ul-item { + display: flex; align-items: center; gap: .4rem; + padding: .25rem .7rem; border-radius: 99px; + background: #f8fafc; border: 1px solid #e2e8f0; + white-space: nowrap; flex-shrink: 0; + } + .ul-item .ul-cod { font-weight: 800; font-size: .78rem; } + .ul-item .ul-nom { font-size: .72rem; color: #64748b; } + .ul-item .ul-dest { font-size: .65rem; color: #94a3b8; } + .ul-item .ul-dest i { margin-right: 2px; } + /* ── Video reel (9:16, alto completo, columna derecha) ── */ .reel-wrap { display: none; @@ -328,12 +363,18 @@ $_hasVideo = (bool)$_tvVideo;
-
-
Siguiente turno
-
-
Llamado a
-
-
+
+
+
Siguiente turno
+
+
Llamado a
+
+
+
+
@@ -485,6 +526,7 @@ function showAnnouncement({ codigo, destino, paciente, color }) { /* ── State ── */ let lastTurnoKey = null; +let llamados = []; function renderSnapshot(snap) { const codEl = document.getElementById('codigo-activo'); @@ -522,6 +564,9 @@ function renderSnapshot(snap) { color: c }); lastTurnoKey = key; + llamados.unshift({ codigo: t.codigo, destino: t.destino, paciente: t.paciente_nombre, color: c }); + if (llamados.length > 20) llamados.pop(); + renderLlamados(); } } else { codEl.textContent = '—'; @@ -550,6 +595,8 @@ function renderSnapshot(snap) { }); } + renderLlamados(); + // Stats const s = snap.stats || {}; document.getElementById('st-espera').textContent = s.en_espera || 0; @@ -558,6 +605,21 @@ function renderSnapshot(snap) { document.getElementById('st-total').textContent = s.total || 0; } +function renderLlamados() { + const wrap = document.getElementById('ultimos-llamados'); + const sc = document.getElementById('ul-scroll'); + if (!wrap || !sc) return; + if (llamados.length === 0) { wrap.style.display = 'none'; return; } + wrap.style.display = ''; + sc.innerHTML = llamados.map(l => ` +
+ ${esc(l.codigo)} + ${l.paciente ? `${esc(l.paciente)}` : ''} + ${esc(l.destino)} +
+ `).join(''); +} + function esc(s) { const d = document.createElement('div'); d.appendChild(document.createTextNode(String(s ?? '')));