turnero: orden estricto de llegada + color de prioridad en cola recepción
- get_cola.php: quita orden por orden_peso, deja solo creado_at ASC - recepcion.php: cards con prioridad distinta a E (general) muestran borde izquierdo y fondo tintado con el color de la prioridad Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
0f6c837d35
commit
8917daf9be
@@ -61,7 +61,7 @@ if ($area === 'recepcion') {
|
||||
JOIN turnero_prioridades p ON p.id = t.prioridad_id
|
||||
LEFT JOIN turnero_solicitudes s ON s.turno_id = t.id
|
||||
WHERE t.sesion_id = ? AND t.estado IN ($inEstados)
|
||||
ORDER BY p.orden_peso ASC, t.creado_at ASC"
|
||||
ORDER BY t.creado_at ASC"
|
||||
);
|
||||
$stmt->execute([$sesionId]);
|
||||
} else {
|
||||
|
||||
@@ -1219,9 +1219,13 @@ function renderCola(snap) {
|
||||
const badgeRow = enAtencion
|
||||
? `<div class="t-badge-row"><span class="atencion-chip"><i class="fas fa-circle" style="font-size:.45rem;vertical-align:middle;margin-right:3px"></i>EN ATENCIÓN</span></div>`
|
||||
: (te ? `<div class="t-badge-row"><span class="tiempo-chip ${te.cls}">${escHtml(te.txt)}</span></div>` : '');
|
||||
const esPrioEspecial = t.prioridad_codigo !== 'E';
|
||||
const prioStyle = esPrioEspecial && !enAtencion
|
||||
? `border-left:4px solid ${t.prioridad_color};background:${t.prioridad_color}18;`
|
||||
: '';
|
||||
const clases = ['cola-card', turnoActivo?.id === t.id ? 'activo' : '', enAtencion ? 'en-atencion' : ''].filter(Boolean).join(' ');
|
||||
return `
|
||||
<div class="${clases}" data-id="${t.id}">
|
||||
<div class="${clases}" data-id="${t.id}" style="${prioStyle}">
|
||||
<div class="prio-dot" style="background:${t.prioridad_color};cursor:pointer" onclick="seleccionarTurno(${t.id})">${t.prioridad_codigo}</div>
|
||||
<div class="turno-info" style="cursor:pointer" onclick="seleccionarTurno(${t.id})">
|
||||
<div class="cod">${escHtml(t.codigo)}</div>
|
||||
|
||||
Reference in New Issue
Block a user