Update recepcion.php
This commit is contained in:
@@ -472,6 +472,7 @@ let pollingColaId = null;
|
||||
|
||||
const API = '<?= BASE_URL ?>modules/turnero/api/';
|
||||
const API_PAC = '<?= BASE_URL ?>api/lab/get_pacientes.php';
|
||||
const BASE_WA = '<?= BASE_URL ?>';
|
||||
const DESK_ID = <?= $deskId ?: 'null' ?>;
|
||||
|
||||
// ── 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);
|
||||
}
|
||||
</script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user