fix: tomas prolongadas — firma no guardaba y countdown no aparecía
ver_formulario_enviado.php:
- $_mpPrimeraPendiente, $_mpBloqueado y $fSvg buscaban la clave campoId_svg
pero guardar_toma.php guarda con clave campoId (sin sufijo). Se añade
fallback a ambas claves para compatibilidad hacia adelante y atrás.
lugar.php:
- new Date('2026-07-09 15:30:00') no parsea en Safari; se reemplaza el
espacio por 'T' para formato ISO antes de construir el timestamp.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
590795c199
commit
1296918c20
@@ -1254,7 +1254,7 @@ function renderConsentimientos(lista) {
|
|||||||
lista.forEach(c => {
|
lista.forEach(c => {
|
||||||
if (c.es_toma_progresiva && c.estado === 'en_progreso') {
|
if (c.es_toma_progresiva && c.estado === 'en_progreso') {
|
||||||
_tomaTimers[c.id] = {
|
_tomaTimers[c.id] = {
|
||||||
siguiente_toma_at: c.siguiente_toma_at ? new Date(c.siguiente_toma_at).getTime() : null,
|
siguiente_toma_at: c.siguiente_toma_at ? new Date(c.siguiente_toma_at.replace(' ', 'T')).getTime() : null,
|
||||||
alertado: false,
|
alertado: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ if ($modoTurnero && $embebido && $_soloFirmaPro) {
|
|||||||
$_mpPrimeraPendiente = null;
|
$_mpPrimeraPendiente = null;
|
||||||
if (!empty($_mpMap)) {
|
if (!empty($_mpMap)) {
|
||||||
foreach ($_mpMap as $_fid => $_) {
|
foreach ($_mpMap as $_fid => $_) {
|
||||||
if (empty($datosCliente[$_fid . '_svg'])) {
|
if (empty($datosCliente[$_fid]) && empty($datosCliente[$_fid . '_svg'])) {
|
||||||
$_mpPrimeraPendiente = $_fid;
|
$_mpPrimeraPendiente = $_fid;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -670,8 +670,8 @@ function esc2(mixed $v): string {
|
|||||||
// Campos posteriores (ej. desistimiento) solo muestran su propia firma por campo.
|
// Campos posteriores (ej. desistimiento) solo muestran su propia firma por campo.
|
||||||
$fSvg = $isPro
|
$fSvg = $isPro
|
||||||
? (empty($_mpMap) && !$_renderedFirmaProfesional
|
? (empty($_mpMap) && !$_renderedFirmaProfesional
|
||||||
? ($firmaSharedProfesional ?? $datosCliente[$cid . '_svg'] ?? null)
|
? ($firmaSharedProfesional ?? $datosCliente[$cid] ?? $datosCliente[$cid . '_svg'] ?? null)
|
||||||
: ($datosCliente[$cid . '_svg'] ?? null))
|
: ($datosCliente[$cid] ?? $datosCliente[$cid . '_svg'] ?? null))
|
||||||
: ($datosCliente[$cid . '_svg'] ?? (!$_firmaGlobalPacienteUsada ? $firmaSharedPaciente : null) ?? null);
|
: ($datosCliente[$cid . '_svg'] ?? (!$_firmaGlobalPacienteUsada ? $firmaSharedPaciente : null) ?? null);
|
||||||
$fFoto = $datosCliente[$cid . '_foto'] ?? null;
|
$fFoto = $datosCliente[$cid . '_foto'] ?? null;
|
||||||
$fIcon = $isPro ? 'fa-user-md' : 'fa-signature';
|
$fIcon = $isPro ? 'fa-user-md' : 'fa-signature';
|
||||||
@@ -741,6 +741,7 @@ function esc2(mixed $v): string {
|
|||||||
$_mpBloqueado = !empty($_mpMap)
|
$_mpBloqueado = !empty($_mpMap)
|
||||||
&& $_mpPrimeraPendiente !== null
|
&& $_mpPrimeraPendiente !== null
|
||||||
&& $cid !== $_mpPrimeraPendiente
|
&& $cid !== $_mpPrimeraPendiente
|
||||||
|
&& empty($datosCliente[$cid])
|
||||||
&& empty($datosCliente[$cid . '_svg']);
|
&& empty($datosCliente[$cid . '_svg']);
|
||||||
?>
|
?>
|
||||||
<div class="firma-pro-widget no-print" id="fpw-<?= htmlspecialchars($cid) ?>"
|
<div class="firma-pro-widget no-print" id="fpw-<?= htmlspecialchars($cid) ?>"
|
||||||
|
|||||||
Reference in New Issue
Block a user