From 6c54674795d36d39f88109fea4ddf7ba986a73e7 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Mon, 27 Jul 2026 21:21:01 -0500 Subject: [PATCH] =?UTF-8?q?fix(bandeja):=20corregir=20res.data=20=E2=86=92?= =?UTF-8?q?=20top-level=20keys=20(jsonOk=20no=20anida=20en=20data)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- modules/turnero/views/bandeja.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/turnero/views/bandeja.php b/modules/turnero/views/bandeja.php index 0f4874c..05e7a9d 100644 --- a/modules/turnero/views/bandeja.php +++ b/modules/turnero/views/bandeja.php @@ -432,14 +432,14 @@ async function _bndRefrescarLista() { const res = await fetch(BND_API).then(r => r.json()).catch(() => null); if (!res?.ok) return; - _bndListData = res.data; - const s = res.data.stats; + _bndListData = res; + const s = res.stats; document.getElementById('st-total').innerHTML = ` Total: ${s.total}`; document.getElementById('st-activos').innerHTML = ` Activos: ${s.activos}`; document.getElementById('st-cerr').innerHTML = ` Cerrados: ${s.cerrados}`; document.getElementById('st-mp').innerHTML = ` Muestras pend.: ${s.muestras_pendientes}`; - _renderLista(res.data.activos, res.data.cerrados); + _renderLista(res.activos, res.cerrados); } function _renderLista(activos, cerrados) { @@ -491,7 +491,7 @@ async function _bndVerDetalle(turnoId) { const res = await fetch(`${BND_API}?turno_id=${turnoId}`).then(r => r.json()).catch(() => null); if (!res?.ok) { det.innerHTML = `

Error al cargar

`; return; } - _renderDetalle(res.data); + _renderDetalle(res); } function _renderDetalle(d) {