fix: enf-nombre muestra nombre real desde sesión PHP (no queda en Cargando…)

This commit is contained in:
Lizandro Guarnizo
2026-03-13 09:03:31 -05:00
parent b8b4bffde2
commit 4bcfd585cd
+2 -4
View File
@@ -129,7 +129,7 @@ $hoy = date('Y-m-d');
<i class="fas fa-user-nurse text-white"></i>
</div>
<div>
<div class="fw-bold lh-1" id="enf-nombre">Cargando…</div>
<div class="fw-bold lh-1" id="enf-nombre"><?= htmlspecialchars($usuario['full_name'] ?? $usuario['username'] ?? 'Enfermero') ?></div>
<small class="opacity-75">Portal Enfermero · <?= date('d/m/Y') ?></small>
</div>
</div>
@@ -370,9 +370,7 @@ const portal = {
this._agenda = d.agenda || [];
// Nombre de la enfermera (primer registro o fallback)
if (d.agenda?.length) {
// enriched by backend, or use session
}
// El nombre ya viene del servidor — no se necesita asignarlo aquí
this._renderResumen(d.totales || {}, d.total || 0);
this._renderLista();