From 80b61f88beb0c0cc524ecd6ff60afd47d25ab387 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Mon, 27 Jul 2026 22:08:41 -0500 Subject: [PATCH] =?UTF-8?q?turnero:=20renombrar=20estado=20'rechazada'=20?= =?UTF-8?q?=E2=86=92=20'Pendiente'=20en=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Muestra que el paciente trae después no se muestra como rechazo. Colores rojo → naranja, botón/etiqueta/íconos actualizados en lugar.php y bandeja.php. DB/API internos sin cambio (enum 'rechazada' se mantiene). Co-Authored-By: Claude Sonnet 4.6 --- modules/turnero/views/bandeja.php | 4 ++-- modules/turnero/views/lugar.php | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/turnero/views/bandeja.php b/modules/turnero/views/bandeja.php index c572fe9..3cce07f 100644 --- a/modules/turnero/views/bandeja.php +++ b/modules/turnero/views/bandeja.php @@ -220,7 +220,7 @@ Layout::open('Bandeja del día', 'fas fa-layer-group'); .bnd-m-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; } .bnd-m-dot.pendiente { background: #f59e0b; } .bnd-m-dot.recibida { background: #22c55e; } -.bnd-m-dot.rechazada { background: #ef4444; } +.bnd-m-dot.rechazada { background: #f97316; } .bnd-m-label { font-weight: 600; color: #1e293b; } .bnd-m-estado { color: #64748b; font-size: 0.74rem; } .bnd-m-rechazado { color: #ef4444; font-size: 0.72rem; } @@ -592,7 +592,7 @@ function _renderDetalle(d) { secM += `
${m.tipo_muestra} - ${m.estado}${m.recibida_at?' · '+_hora(m.recibida_at):''} + ${m.estado==='rechazada'?'Pendiente':m.estado}${m.recibida_at?' · '+_hora(m.recibida_at):''} ${rechazo}
`; }); diff --git a/modules/turnero/views/lugar.php b/modules/turnero/views/lugar.php index d6ef3c9..a89849a 100644 --- a/modules/turnero/views/lugar.php +++ b/modules/turnero/views/lugar.php @@ -502,7 +502,7 @@ try { } .muestra-row.pendiente { background: #fffbeb; border-color: #fde68a; } .muestra-row.recibida { background: #f0fdf4; border-color: #bbf7d0; color: #166534; } - .muestra-row.rechazada { background: #fef2f2; border-color: #fca5a5; color: #991b1b; } + .muestra-row.rechazada { background: #fff7ed; border-color: #fed7aa; color: #c2410c; } .muestra-info { flex: 1; min-width: 0; } .muestra-label { font-weight: 600; font-size: .82rem; font-family: monospace; } .muestra-motivo { font-size: .7rem; margin-top: 2px; opacity: .85; } @@ -515,7 +515,7 @@ try { } .btn-muestra-accion:active { opacity: .75; } .btn-muestra-accion.recibir { background: #16a34a; color: #fff; } - .btn-muestra-accion.rechazar { background: #fff; color: #991b1b; border: 1.5px solid #fca5a5; } + .btn-muestra-accion.rechazar { background: #fff; color: #c2410c; border: 1.5px solid #fed7aa; } .muestras-summary { font-size: .72rem; color: #64748b; margin-bottom: .5rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; @@ -524,7 +524,7 @@ try { font-size: .68rem; } .muestras-summary .mc.pend { background: #fef9c3; color: #854d0e; } .muestras-summary .mc.rec { background: #dcfce7; color: #166534; } - .muestras-summary .mc.rech { background: #fee2e2; color: #991b1b; } + .muestras-summary .mc.rech { background: #fff7ed; color: #c2410c; } @@ -1800,7 +1800,7 @@ async function iniciarAtencion() { async function finalizarAtencion() { if (!turnoActivo) return; if (hayPendientes) { mostrarError('Debe firmar todos los consentimientos antes de finalizar.'); return; } - if (hayMuestrasPendientes) { mostrarError('Debe marcar cada muestra como recibida o rechazada antes de finalizar.'); return; } + if (hayMuestrasPendientes) { mostrarError('Debe marcar cada muestra como recibida o pendiente antes de finalizar.'); return; } if (!confirm(`¿Finalizar atención del turno ${turnoActivo.codigo}?`)) return; await cambiarEstadoTurno('finalizado'); } @@ -2203,7 +2203,7 @@ function renderMuestras(lista) { let chips = ''; if (nPend) chips += `${nPend} pendiente${nPend > 1 ? 's' : ''}`; if (nRec) chips += `${nRec} recibida${nRec > 1 ? 's' : ''}`; - if (nRech) chips += `${nRech} rechazada${nRech > 1 ? 's' : ''}`; + if (nRech) chips += `${nRech} pendiente${nRech > 1 ? 's' : ''}`; summary.innerHTML = chips; cont.innerHTML = lista.map(m => { @@ -2230,7 +2230,7 @@ function renderMuestras(lista) { ` : `${tsHtml} @@ -2243,7 +2243,7 @@ function renderMuestras(lista) { const ico = m.estado === 'recibida' ? '' : m.estado === 'rechazada' - ? '' + ? '' : ''; return `
@@ -2278,7 +2278,7 @@ async function marcarMuestra(muestraId, estado, motivo = null) { renderMuestras(_muestrasActivas); const msg = estado === 'recibida' ? 'Muestra recibida ✓' - : estado === 'rechazada' ? 'Muestra rechazada' : 'Revertida a pendiente'; + : estado === 'rechazada' ? 'Pendiente' : 'Revertida a pendiente'; mostrarToast(msg, estado === 'recibida' ? 'success' : estado === 'rechazada' ? 'warn' : 'info', 2000); } catch (err) { mostrarError(err.message); @@ -2286,7 +2286,7 @@ async function marcarMuestra(muestraId, estado, motivo = null) { } function pedirRechazo(muestraId, tipoMuestra) { - const motivo = prompt(`Motivo de rechazo para "${tipoMuestra}":\n(hemólisis, coagulado, volumen insuficiente…)`); + const motivo = prompt(`Nota para "${tipoMuestra}" (opcional):\n(ej: paciente la trae mañana, volumen insuficiente…)`); if (motivo === null) return; marcarMuestra(muestraId, 'rechazada', motivo.trim() || null); }