This commit is contained in:
Lizandro Guarnizo
2026-03-17 12:58:42 -05:00
parent 262009f4e5
commit 775c654790
4 changed files with 263 additions and 12 deletions
+30
View File
@@ -277,6 +277,7 @@ function esc2(mixed $v): string {
<div class="esquema-sep"><?= esc2($campo['label'] ?? '') ?></div>
<?php continue; endif;
if ($tipo === 'firma') continue;
if ($tipo === 'firma_profesional') continue;
// ── Parrafo estático ──────────────────────────────────
if ($tipo === 'parrafo'):
@@ -334,6 +335,35 @@ function esc2(mixed $v): string {
</div>
<?php endif; ?>
<!-- Firmas inline (firma_paciente y firma_profesional por campo) -->
<?php foreach ($esquema as $campo):
$tipo = $campo['tipo'] ?? '';
if ($tipo !== 'firma' && $tipo !== 'firma_profesional') continue;
$cid = $campo['id'] ?? null;
if (!$cid) continue;
$fSvg = $datosCliente[$cid . '_svg'] ?? null;
$fFoto = $datosCliente[$cid . '_foto'] ?? null;
if (!$fSvg && !$fFoto) continue;
$isPro = ($tipo === 'firma_profesional');
$icon = $isPro ? 'fa-user-md' : 'fa-signature';
$color = $isPro ? '#198754' : '#1565c0';
$titLabel = htmlspecialchars($campo['label'] ?? ($isPro ? 'Firma profesional' : 'Firma paciente'));
?>
<div class="section-title mt-4" style="color:<?= $color ?>">
<i class="fas <?= $icon ?> me-1"></i><?= $titLabel ?>
</div>
<?php if ($fSvg): ?>
<div class="firma-box" style="border-color:<?= $color ?>">
<img src="<?= htmlspecialchars($fSvg) ?>" alt="<?= $titLabel ?>">
</div>
<?php endif; ?>
<?php if ($fFoto): ?>
<div class="firma-box mt-2" style="border-color:<?= $color ?>">
<img src="<?= htmlspecialchars($fFoto) ?>" alt="Foto - <?= $titLabel ?>">
</div>
<?php endif; ?>
<?php endforeach; ?>
<!-- Info del envío -->
<div class="section-title mt-4"><i class="fas fa-clock me-1"></i>Información del envío</div>
<div class="campo-row">