Update kiosko.php
This commit is contained in:
@@ -262,6 +262,15 @@ unset($p);
|
|||||||
}
|
}
|
||||||
.btn-kiosko-back:hover { background: var(--brand-mid); border-color: var(--brand); color: var(--brand-dark); }
|
.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 ── */
|
||||||
.ticket-box {
|
.ticket-box {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
@@ -445,7 +454,7 @@ unset($p);
|
|||||||
Recuerde traer su documento de identidad y la orden médica.
|
Recuerde traer su documento de identidad y la orden médica.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn-nuevo" onclick="reiniciar()">
|
<button class="btn-nuevo" onclick="seleccionarOtraPrioridad()">
|
||||||
<i class="fas fa-plus me-1"></i>Nuevo turno
|
<i class="fas fa-plus me-1"></i>Nuevo turno
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -510,23 +519,27 @@ unset($p);
|
|||||||
mostrarTicket(json.turno ?? json.data?.turno);
|
mostrarTicket(json.turno ?? json.data?.turno);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
mostrarError(err.message);
|
mostrarError(err.message);
|
||||||
} finally {
|
|
||||||
setSpinner(false);
|
setSpinner(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function mostrarTicket(t) {
|
function mostrarTicket(t) {
|
||||||
|
setSpinner(false);
|
||||||
document.getElementById('tick-codigo').textContent = t.codigo;
|
document.getElementById('tick-codigo').textContent = t.codigo;
|
||||||
document.getElementById('tick-codigo').style.color = prioColor;
|
document.getElementById('tick-codigo').style.color = prioColor;
|
||||||
document.getElementById('tick-posicion').textContent = '#' + t.posicion_cola;
|
document.getElementById('tick-posicion').textContent = '#' + t.posicion_cola;
|
||||||
document.getElementById('tick-prio-badge').innerHTML =
|
document.getElementById('tick-prio-badge').innerHTML =
|
||||||
`<span class="ticket-prio-badge" style="background:${prioColor}">${prioCodigo} — ${prioNombre}</span>`;
|
`<span class="ticket-prio-badge" style="background:${prioColor}">${prioCodigo} — ${prioNombre}</span>`;
|
||||||
mostrar('screen-ticket');
|
mostrar('screen-ticket');
|
||||||
|
|
||||||
|
// Imprimir automáticamente
|
||||||
|
setTimeout(() => window.print(), 300);
|
||||||
|
|
||||||
clearTimeout(window._timer);
|
clearTimeout(window._timer);
|
||||||
window._timer = setTimeout(reiniciar, 30000);
|
window._timer = setTimeout(seleccionarOtraPrioridad, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
function reiniciar() {
|
function seleccionarOtraPrioridad() {
|
||||||
clearTimeout(window._timer);
|
clearTimeout(window._timer);
|
||||||
document.getElementById('inp-cedula').value = '';
|
document.getElementById('inp-cedula').value = '';
|
||||||
document.getElementById('inp-cel').value = '';
|
document.getElementById('inp-cel').value = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user