Update kiosko.php

This commit is contained in:
Lizandro Guarnizo
2026-06-09 17:41:54 -05:00
parent ab8b5ae620
commit eff6b6745f
+17 -4
View File
@@ -262,6 +262,15 @@ unset($p);
}
.btn-kiosko-back:hover { background: var(--brand-mid); border-color: var(--brand); color: var(--brand-dark); }
/* ── Print: solo el ticket ── */
@media print {
body { background: #fff !important; }
.kiosko-topbar, .kiosko-footer, .spinner-overlay, .toast-error,
.btn-nuevo, #screen-prio, #screen-datos { display: none !important; }
#screen-ticket { display: block !important; opacity: 1 !important; position: static !important; }
.ticket-box { box-shadow: none !important; border: 1px solid #ddd !important; }
}
/* ── Ticket ── */
.ticket-box {
background: #fff;
@@ -445,7 +454,7 @@ unset($p);
Recuerde traer su documento de identidad y la orden médica.
</div>
</div>
<button class="btn-nuevo" onclick="reiniciar()">
<button class="btn-nuevo" onclick="seleccionarOtraPrioridad()">
<i class="fas fa-plus me-1"></i>Nuevo turno
</button>
</div>
@@ -510,23 +519,27 @@ unset($p);
mostrarTicket(json.turno ?? json.data?.turno);
} catch (err) {
mostrarError(err.message);
} finally {
setSpinner(false);
}
}
function mostrarTicket(t) {
setSpinner(false);
document.getElementById('tick-codigo').textContent = t.codigo;
document.getElementById('tick-codigo').style.color = prioColor;
document.getElementById('tick-posicion').textContent = '#' + t.posicion_cola;
document.getElementById('tick-prio-badge').innerHTML =
`<span class="ticket-prio-badge" style="background:${prioColor}">${prioCodigo} — ${prioNombre}</span>`;
mostrar('screen-ticket');
// Imprimir automáticamente
setTimeout(() => window.print(), 300);
clearTimeout(window._timer);
window._timer = setTimeout(reiniciar, 30000);
window._timer = setTimeout(seleccionarOtraPrioridad, 3000);
}
function reiniciar() {
function seleccionarOtraPrioridad() {
clearTimeout(window._timer);
document.getElementById('inp-cedula').value = '';
document.getElementById('inp-cel').value = '';