fix: correct API response path for lugar formularios in recepcion

- API returns json.formularios, not json.data.formularios
- Now consents will properly display when selecting a lugar
- Fixes issue where configured consents were not appearing in recepcion

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-16 11:15:15 -05:00
co-authored by Claude Haiku 4.5
parent 8a5e57cebe
commit 5b02be6686
+2 -2
View File
@@ -480,12 +480,12 @@ async function onLugarChange() {
try {
const res = await fetch(`${API}get_lugar_formularios.php?lugar_id=${lugarId}`);
const json = await res.json();
if (!json.ok || !json.data?.formularios?.length) {
if (!json.ok || !json.formularios?.length) {
sec.style.display = 'none';
return;
}
lista.innerHTML = json.data.formularios.map(f => {
lista.innerHTML = json.formularios.map(f => {
const nom = escHtml(f.nombre);
const disabled = !turnoActivo ? 'disabled title="Llama el turno primero"' : '';
return `<div class="consent-item pendiente">