feat: historial turnos — mostrar recepcionista, desk, bacteriólogo y exámenes

Columnas nuevas en tabla principal:
- Recepción: módulo de desk + nombre del recepcionista
- Lugar / Bacteriólogo: lugar destino + quien atendió toma de muestras
- Exámenes: badges con código de cada examen solicitado

Los datos ya venían del API (get_historial.php), solo se exponen en la tabla.
Se elimina columna Teléfono y Entrada de la vista principal (siguen en detalle).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-23 20:22:07 -05:00
co-authored by Claude Sonnet 4.6
parent f57fa39c33
commit f738607738
+22 -6
View File
@@ -193,12 +193,12 @@ Layout::open('Historial de Turnos', 'fas fa-history');
<th>Código</th>
<th>Prioridad</th>
<th>Paciente</th>
<th>Teléfono</th>
<th>Lugar</th>
<th>Recepción</th>
<th>Lugar / Bacteriólogo</th>
<th>Exámenes</th>
<th>Estado</th>
<th>Espera</th>
<th>Servicio</th>
<th>Entrada</th>
<th></th>
</tr>
</thead>
@@ -414,6 +414,16 @@ function renderTabla(turnos) {
const lbl = ESTADO_LBL[t.estado] || t.estado;
const rowId = `det-${t.id}`;
// Recepción: desk + recepcionista
const desk = esc(t.recepcion_desk_nombre || '—');
const recep = esc(t.atendido_recepcion_nombre || '—');
const bacterio = esc(t.atendido_lugar_nombre || '—');
// Exámenes: badges con código
const examsHtml = (t.examenes && t.examenes.length)
? t.examenes.map(e => `<span class="badge bg-success-subtle text-success me-1 mb-1" style="font-size:.65rem">${esc(e.codigo)}</span>`).join('')
: '<span class="text-muted small">—</span>';
return `<tr data-id="${t.id}">
<td class="text-nowrap text-muted small">${esc(fecha)}</td>
<td><strong style="color:${priCls}">${esc(t.codigo)}</strong></td>
@@ -423,12 +433,18 @@ function renderTabla(turnos) {
</span>
</td>
<td>${nombre}</td>
<td class="text-muted small">${tel}</td>
<td>${lugar}</td>
<td class="small">
<div class="text-muted" style="font-size:.72rem"><i class="fas fa-desktop me-1 opacity-50"></i>${desk}</div>
<div><i class="fas fa-user-tie me-1 opacity-50" style="font-size:.72rem"></i>${recep}</div>
</td>
<td class="small">
<div class="fw-semibold">${lugar}</div>
<div class="text-muted" style="font-size:.72rem"><i class="fas fa-microscope me-1 opacity-50"></i>${bacterio}</div>
</td>
<td style="max-width:140px">${examsHtml}</td>
<td><span class="eb ${cls}">${lbl}</span></td>
<td class="text-nowrap">${espMin}</td>
<td class="text-nowrap">${srvMin}</td>
<td class="text-nowrap small text-muted">${horaEnt}</td>
<td>
<button class="btn btn-sm btn-outline-secondary py-0 px-2"
onclick="toggleDetalle('${rowId}', this, ${t.id})"