fix: nombre profesional bajo firma firmada; ver paciente desde espera toma
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
309c1c93c6
commit
90d4e1bc49
@@ -1238,8 +1238,16 @@ function renderColaCard(t) {
|
||||
|
||||
// ── Seleccionar sin llamar ────────────────────────────────────
|
||||
async function seleccionarSinLlamar(turnoId) {
|
||||
const t = _colaMap.get(turnoId);
|
||||
if (!t) return;
|
||||
let t = _colaMap.get(turnoId);
|
||||
if (!t) {
|
||||
// Turno no está en cola (p.ej. en espera de siguiente toma) — cargar directamente
|
||||
try {
|
||||
const r = await fetch(`${API}get_turno.php?id=${turnoId}`);
|
||||
const j = await r.json();
|
||||
if (!j.ok || !j.turno) return;
|
||||
t = j.turno;
|
||||
} catch (_) { return; }
|
||||
}
|
||||
turnoActivo = t;
|
||||
mostrarCabeceraTurno(t);
|
||||
await cargarFichaSolicitud(t.id);
|
||||
|
||||
@@ -257,7 +257,8 @@ if ($modoTurnero && $embebido && isUserLoggedIn()) {
|
||||
if ($uid) {
|
||||
try {
|
||||
$stmt = $db->getConnection()->prepare(
|
||||
"SELECT au.firma_svg, le.nombre_completo AS pro_nombre, le.numero_documento AS pro_documento
|
||||
"SELECT au.firma_svg, au.full_name,
|
||||
le.nombre_completo AS pro_nombre, le.numero_documento AS pro_documento
|
||||
FROM admin_users au
|
||||
LEFT JOIN lab_enfermeras le ON le.id = au.enfermera_id
|
||||
WHERE au.id = ? LIMIT 1"
|
||||
@@ -265,7 +266,7 @@ if ($modoTurnero && $embebido && isUserLoggedIn()) {
|
||||
$stmt->execute([$uid]);
|
||||
$pRow = $stmt->fetch(PDO::FETCH_ASSOC) ?: [];
|
||||
$firmaProfPreguardada = $pRow['firma_svg'] ?: null;
|
||||
$profNombre = $pRow['pro_nombre'] ?: null;
|
||||
$profNombre = $pRow['pro_nombre'] ?: ($pRow['full_name'] ?: null);
|
||||
$profDocumento = $pRow['pro_documento'] ?: null;
|
||||
} catch (\Throwable $_) {}
|
||||
}
|
||||
@@ -1171,12 +1172,6 @@ function _addExamWizardHtml(string $cid): string {
|
||||
</div>
|
||||
<?php if ($firmaProfPreguardada): ?></div><?php endif; ?>
|
||||
<div class="fpw-msg mt-2 small"></div>
|
||||
<?php if ($profNombre || $profDocumento): ?>
|
||||
<div class="firma-pro-ident mt-2" style="font-size:13px;line-height:1.5">
|
||||
<?php if ($profNombre): ?><strong><?= esc2($profNombre) ?></strong><br><?php endif; ?>
|
||||
<?php if ($profDocumento): ?><span style="color:#6c757d;font-size:12px">C.C. <?= esc2($profDocumento) ?></span><?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php elseif ($modoPublico): ?>
|
||||
<div class="alert py-2 px-3 no-print" style="background:#fff8e1;border:1.5px dashed #f59e0b;border-radius:8px;color:#92400e;font-size:.85rem">
|
||||
|
||||
Reference in New Issue
Block a user