From 047583604dbee8f49ee74fd57085c36854c7ab3e Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Tue, 16 Jun 2026 12:14:26 -0500 Subject: [PATCH] Update recepcion.php --- modules/turnero/views/recepcion.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/turnero/views/recepcion.php b/modules/turnero/views/recepcion.php index 5cacc7e..2f9ab32 100644 --- a/modules/turnero/views/recepcion.php +++ b/modules/turnero/views/recepcion.php @@ -472,6 +472,7 @@ let pollingColaId = null; const API = 'modules/turnero/api/'; const API_PAC = 'api/lab/get_pacientes.php'; +const BASE_WA = ''; const DESK_ID = ; // ── Arranque ────────────────────────────────────────────────── @@ -1033,8 +1034,8 @@ async function firmarConsentimiento(formularioId, nombre) { body: JSON.stringify({ turno_id: turnoActivo.id, formulario_id: formularioId }), }); const json = await res.json(); - if (json.ok && json.data?.url) { - window.open(json.data.url, '_blank'); + if (json.ok && (json.url || json.data?.url)) { + window.open(json.url || json.data.url, '_blank'); // Iniciar polling automático para detectar firma if (!pollingConsentimientosId) { pollingConsentimientosId = setInterval(() => { @@ -1243,5 +1244,6 @@ function mostrarToast(msg, type = 'info', duration = 2500) { toastTimer = setTimeout(() => el.classList.remove('show'), duration); } +