feat(bandeja): filtro por estado en la bandeja del día

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-28 12:02:37 -05:00
co-authored by Claude Sonnet 4.6
parent 7d444699d3
commit 2e3534ab02
+12 -4
View File
@@ -357,6 +357,14 @@ Layout::open('Bandeja del día', 'fas fa-layer-group');
<span class="bnd-chip bnd-chip-pend" id="st-pend"><i class="fas fa-clock"></i> Por revisar: —</span>
<span class="bnd-chip bnd-chip-vis" id="st-vis"><i class="fas fa-eye"></i> Vistos: —</span>
<span class="bnd-chip bnd-chip-mp" id="st-mp"><i class="fas fa-exclamation-triangle"></i> Muestras pend.: —</span>
<select id="bnd-filtro-estado" onchange="_bndFiltrar()" style="border:1px solid #cbd5e1;border-radius:6px;padding:3px 8px;font-size:.78rem;color:#475569;background:#fff;cursor:pointer;outline:none">
<option value="">Todos los estados</option>
<option value="en_espera_lugar">En espera</option>
<option value="en_servicio">En servicio</option>
<option value="finalizado">Finalizado</option>
<option value="ausente">Ausente</option>
<option value="cancelado">Cancelado</option>
</select>
<button class="bnd-refresh-btn" onclick="_bndRefrescarLista()">
<i class="fas fa-sync-alt" id="bnd-spin"></i> Actualizar
</button>
@@ -441,11 +449,11 @@ async function _bndRefrescarLista() {
}
function _bndFiltrar() {
const q = (document.getElementById('bnd-filtro')?.value || '').toLowerCase().trim();
const q = (document.getElementById('bnd-filtro')?.value || '').toLowerCase().trim();
const st = document.getElementById('bnd-filtro-estado')?.value || '';
const match = t =>
!q ||
(t.paciente_nombre || '').toLowerCase().includes(q) ||
(t.examenes_txt || '').toLowerCase().includes(q);
(!q || (t.paciente_nombre || '').toLowerCase().includes(q) || (t.examenes_txt || '').toLowerCase().includes(q)) &&
(!st || t.estado === st);
_renderLista(
_bndAllData.pendientes?.filter(match) || [],