Fix: firma profesional no se mostraba al recargar el formulario

La firma se guardaba en datos_cliente[campo_svg] pero el display
solo leía firma_profesional_svg (columna inexistente en lab_form_envios).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-23 08:44:44 -05:00
co-authored by Claude Sonnet 4.6
parent 3490bc1932
commit da076f86eb
2 changed files with 1 additions and 2 deletions
@@ -36,7 +36,6 @@ $stmt->execute([$turnoId, $formularioId]);
$tc = $stmt->fetch(PDO::FETCH_ASSOC);
if (!$tc) jsonError('Consentimiento no encontrado.', 404);
if ($tc['estado'] !== 'firmado') jsonError('El paciente debe firmar primero antes de que el profesional pueda firmar.');
$stmt = $pdo->prepare(
"UPDATE turnero_consentimientos
+1 -1
View File
@@ -469,7 +469,7 @@ function esc2(mixed $v): string {
// Cada campo busca su firma propia; solo si no existe usa el fallback global
$fSvg = $isPro
? $firmaSharedProfesional
? ($firmaSharedProfesional ?? $datosCliente[$cid . '_svg'] ?? null)
: ($datosCliente[$cid . '_svg'] ?? $firmaSharedPaciente ?? null);
$fFoto = $datosCliente[$cid . '_foto'] ?? null;
$fIcon = $isPro ? 'fa-user-md' : 'fa-signature';