This commit is contained in:
Lizandro Guarnizo
2026-04-21 20:06:05 -05:00
parent c934125f2f
commit b5067eb9fa
2 changed files with 51 additions and 10 deletions
+17
View File
@@ -38,6 +38,23 @@ try {
$_trLinks[] = ['name' => 'Recepción', 'icon' => 'fas fa-concierge-bell', 'route' => '/erp.php?m=turnero&v=recepcion'];
}
// ── Links dinámicos: un enlace por estación de Muestras ──────
try {
$_trMuestras = $_trPdo->query(
"SELECT id, nombre FROM turnero_lugares
WHERE activo = 1 AND tipo = 'muestras'
ORDER BY sort_order ASC"
)->fetchAll(PDO::FETCH_ASSOC);
foreach ($_trMuestras as $_m) {
$_trLinks[] = [
'name' => $_m['nombre'],
'icon' => 'fas fa-flask',
'route' => '/erp.php?m=turnero&v=lugar&lugar_id=' . (int)$_m['id'],
];
}
} catch (\Throwable $_) {}
return [
'slug' => 'turnero',
'name' => 'Turnero',
+34 -10
View File
@@ -244,6 +244,14 @@ $_labColor = preg_match('/^#[0-9a-fA-F]{3,8}$/', $_dispCfg['doc_color'] ?? '')
font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
color: #e2e8f0;
}
/* Layout: sin scroll */
.pg-wrap { display: grid; grid-template-rows: auto 1fr auto auto; height: 100vh; overflow: hidden; }
/* Header/footer: brand más oscuro */
.pg-header { background: color-mix(in srgb, var(--brand) 72%, #000) !important; }
.pg-footer { background: color-mix(in srgb, var(--brand) 42%, #000) !important; border-top: 1px solid color-mix(in srgb, var(--brand) 35%, transparent) !important; }
/* Botón pantalla completa */
.btn-fs { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.8); border-radius: 8px; padding: 4px 10px; font-size: .68rem; cursor: pointer; font-family: inherit; transition: background .2s; }
.btn-fs:hover { background: rgba(255,255,255,.22); }
/* Header modernize */
.pg-header::before {
content: ''; position: absolute; inset: 0; pointer-events: none;
@@ -268,28 +276,28 @@ $_labColor = preg_match('/^#[0-9a-fA-F]{3,8}$/', $_dispCfg['doc_color'] ?? '')
.v-split { background: linear-gradient(180deg,transparent,var(--border) 12%,var(--border) 88%,transparent); width: 1px; }
.area-col { background: var(--bg); display: flex; flex-direction: column; overflow: hidden; }
.col-hdr { display: flex; align-items: center; gap: .55rem; padding: .38rem 1.1rem; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 2.5px; color: rgba(255,255,255,.88); flex-shrink: 0; }
.col-hdr.rec { background: linear-gradient(90deg,#1e1b4b,#1e3a8a); border-bottom: 1px solid rgba(96,165,250,.18); }
.col-hdr.mue { background: linear-gradient(90deg,#052e16,#064e3b); border-bottom: 1px solid rgba(52,211,153,.18); }
.col-hdr.rec { background: linear-gradient(90deg, color-mix(in srgb,var(--brand) 38%,#000), color-mix(in srgb,var(--brand) 58%,#000)); border-bottom: 1px solid color-mix(in srgb,var(--brand) 45%,transparent); }
.col-hdr.mue { background: linear-gradient(90deg, color-mix(in srgb,var(--brand) 28%,#000), color-mix(in srgb,var(--brand) 44%,#000)); border-bottom: 1px solid color-mix(in srgb,var(--brand) 35%,transparent); opacity: .88; }
.slot-grid { display: grid; grid-auto-rows: 1fr; height: 100%; overflow: hidden; }
.slot { display: flex; flex-direction: column; border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.slot:last-child { border-bottom: none; }
.slot-hdr { display: flex; align-items: center; gap: .4rem; padding: .27rem .9rem; font-size: .59rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.8px; flex-shrink: 0; z-index: 1; position: relative; }
.slot-hdr.rec { color: #93c5fd; border-bottom: 1px solid rgba(59,130,246,.1); background: rgba(30,58,138,.22); }
.slot-hdr.mue { color: #6ee7b7; border-bottom: 1px solid rgba(16,185,129,.1); background: rgba(6,78,59,.22); }
.slot-hdr.rec { color: color-mix(in srgb,var(--brand) 88%,#fff); border-bottom: 1px solid color-mix(in srgb,var(--brand) 28%,transparent); background: color-mix(in srgb,var(--brand) 18%,transparent); }
.slot-hdr.mue { color: color-mix(in srgb,var(--brand) 78%,#fff); border-bottom: 1px solid color-mix(in srgb,var(--brand) 22%,transparent); background: color-mix(in srgb,var(--brand) 12%,transparent); }
.slot-hdr .hdot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.slot-hdr.rec .hdot { background: #60a5fa; box-shadow: 0 0 5px #60a5fa88; }
.slot-hdr.mue .hdot { background: #34d399; box-shadow: 0 0 5px #34d39988; }
.slot-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .8rem 1rem; position: relative; overflow: hidden; }
.slot-hdr.rec .hdot { background: var(--brand); box-shadow: 0 0 5px color-mix(in srgb,var(--brand) 80%,transparent); }
.slot-hdr.mue .hdot { background: color-mix(in srgb,var(--brand) 75%,#fff); box-shadow: 0 0 5px color-mix(in srgb,var(--brand) 65%,transparent); }
.slot-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .3rem .7rem; position: relative; overflow: hidden; }
.slot-body::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .6s; background: radial-gradient(ellipse 80% 60% at 50% 60%, var(--pc,transparent) 0%, transparent 70%); }
.slot-body.lit::after { opacity: .07; }
.slot-body::before { content: ''; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px; border-radius: 0 3px 3px 0; background: var(--pc,transparent); opacity: 0; transition: opacity .5s,background .5s; }
.slot-body.lit::before { opacity: 1; }
.lbl-dest { font-size: clamp(.5rem,.95vw,.66rem); font-weight: 700; text-transform: uppercase; letter-spacing: 3px; color: var(--muted); margin-bottom: .1rem; z-index: 1; position: relative; transition: color .4s; }
.slot-body.lit .lbl-dest { color: var(--pc); opacity: .7; }
.big-code { font-size: clamp(2.5rem,8.5vw,8rem); font-weight: 900; line-height: 1; color: var(--muted); letter-spacing: -2px; font-variant-numeric: tabular-nums; z-index: 1; position: relative; transition: color .45s; }
.big-code { font-size: clamp(1.8rem,5.5vw,5.5rem); font-weight: 900; line-height: 1; color: var(--muted); letter-spacing: -2px; font-variant-numeric: tabular-nums; z-index: 1; position: relative; transition: color .45s; }
.slot-body.lit .big-code { color: var(--pc); }
.pac-name { font-size: clamp(.68rem,1.5vw,1.05rem); font-weight: 700; color: rgba(255,255,255,.6); margin-top: .2rem; text-align: center; min-height: 1.3em; z-index: 1; position: relative; }
.prio-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .27rem .82rem; border-radius: 99px; font-size: clamp(.54rem,.92vw,.72rem); font-weight: 700; margin-top: .42rem; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); color: var(--muted); transition: background .4s,color .4s,border-color .4s; z-index: 1; position: relative; }
.pac-name { font-size: clamp(.55rem,1vw,.8rem); font-weight: 700; color: rgba(255,255,255,.6); margin-top: .15rem; text-align: center; min-height: 1em; z-index: 1; position: relative; }
.prio-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .16rem .6rem; border-radius: 99px; font-size: clamp(.46rem,.72vw,.6rem); font-weight: 700; margin-top: .2rem; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); color: var(--muted); transition: background .4s,color .4s,border-color .4s; z-index: 1; position: relative; }
.ring-pop-el { position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%,-50%); pointer-events: none; z-index: 0; }
.ring-pop-el.do-pop { animation: r-pop .85s ease-out forwards; }
@keyframes r-pop { 0%{transform:translate(-50%,-50%) scale(1);background:var(--pc,var(--brand));opacity:.38} 100%{transform:translate(-50%,-50%) scale(50);background:var(--pc,var(--brand));opacity:0} }
@@ -366,6 +374,9 @@ $_labColor = preg_match('/^#[0-9a-fA-F]{3,8}$/', $_dispCfg['doc_color'] ?? '')
<button class="btn-son" id="btn-sonido" onclick="event.stopPropagation();activarSonido()">
<i class="fas fa-volume-mute"></i> Sonido
</button>
<button class="btn-fs" id="btn-fs" onclick="toggleFullscreen()" title="Pantalla completa">
<i class="fas fa-expand" id="fs-icon"></i>
</button>
<div class="reloj" id="reloj">--:--:--</div>
</div>
</header>
@@ -415,6 +426,19 @@ function tick() {
}
tick(); setInterval(tick, 1000);
// ── Pantalla completa ─────────────────────────────────────────
function toggleFullscreen() {
if (!document.fullscreenElement) {
document.documentElement.requestFullscreen().catch(() => {});
} else {
document.exitFullscreen().catch(() => {});
}
}
document.addEventListener('fullscreenchange', () => {
const ico = document.getElementById('fs-icon');
if (ico) ico.className = document.fullscreenElement ? 'fas fa-compress' : 'fas fa-expand';
});
// ── Audio ──────────────────────────────────────────────────────
let audioCtx = null, sonidoActivo = false;