Update recepcion.php
This commit is contained in:
@@ -472,6 +472,7 @@ let pollingColaId = null;
|
|||||||
|
|
||||||
const API = '<?= BASE_URL ?>modules/turnero/api/';
|
const API = '<?= BASE_URL ?>modules/turnero/api/';
|
||||||
const API_PAC = '<?= BASE_URL ?>api/lab/get_pacientes.php';
|
const API_PAC = '<?= BASE_URL ?>api/lab/get_pacientes.php';
|
||||||
|
const BASE_WA = '<?= BASE_URL ?>';
|
||||||
const DESK_ID = <?= $deskId ?: 'null' ?>;
|
const DESK_ID = <?= $deskId ?: 'null' ?>;
|
||||||
|
|
||||||
// ── Arranque ──────────────────────────────────────────────────
|
// ── Arranque ──────────────────────────────────────────────────
|
||||||
@@ -1033,8 +1034,8 @@ async function firmarConsentimiento(formularioId, nombre) {
|
|||||||
body: JSON.stringify({ turno_id: turnoActivo.id, formulario_id: formularioId }),
|
body: JSON.stringify({ turno_id: turnoActivo.id, formulario_id: formularioId }),
|
||||||
});
|
});
|
||||||
const json = await res.json();
|
const json = await res.json();
|
||||||
if (json.ok && json.data?.url) {
|
if (json.ok && (json.url || json.data?.url)) {
|
||||||
window.open(json.data.url, '_blank');
|
window.open(json.url || json.data.url, '_blank');
|
||||||
// Iniciar polling automático para detectar firma
|
// Iniciar polling automático para detectar firma
|
||||||
if (!pollingConsentimientosId) {
|
if (!pollingConsentimientosId) {
|
||||||
pollingConsentimientosId = setInterval(() => {
|
pollingConsentimientosId = setInterval(() => {
|
||||||
@@ -1243,5 +1244,6 @@ function mostrarToast(msg, type = 'info', duration = 2500) {
|
|||||||
toastTimer = setTimeout(() => el.classList.remove('show'), duration);
|
toastTimer = setTimeout(() => el.classList.remove('show'), duration);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user