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); } +