feat(tiempos): agregar tiempo total puerta a puerta en historial y dashboard
- APIs: total_min = creado_at → fin_lugar_at (solo finalizados) - Dashboard: KPI card 'Total prom. puerta a puerta' + columna Total en tabla - Historial: columna Total en tabla Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
c357f18b61
commit
44b737c253
@@ -214,6 +214,7 @@ Layout::open('Historial de Turnos', 'fas fa-history');
|
||||
<th>Estado</th>
|
||||
<th>Espera</th>
|
||||
<th>Servicio</th>
|
||||
<th>Total</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -407,7 +408,7 @@ const ESTADO_LBL = {
|
||||
function renderTabla(turnos) {
|
||||
const tbody = document.getElementById('tbody');
|
||||
if (!turnos.length) {
|
||||
tbody.innerHTML = `<tr><td colspan="11">
|
||||
tbody.innerHTML = `<tr><td colspan="12">
|
||||
<div class="empty-state"><i class="fas fa-search"></i>Sin resultados para los filtros aplicados</div>
|
||||
</td></tr>`;
|
||||
return;
|
||||
@@ -425,6 +426,7 @@ function renderTabla(turnos) {
|
||||
: '—';
|
||||
const espMin = t.espera_min != null ? t.espera_min + ' m' : '—';
|
||||
const srvMin = t.servicio_min != null ? t.servicio_min + ' m' : '—';
|
||||
const totMin = t.total_min != null ? t.total_min + ' m' : '—';
|
||||
const tel = esc(t.paciente_cel || '—');
|
||||
const priCls = esc(t.prioridad_color || '#888');
|
||||
const cls = ESTADO_CLS[t.estado] || 'eb-finalizado';
|
||||
@@ -467,6 +469,7 @@ function renderTabla(turnos) {
|
||||
<td><span class="eb ${cls}">${lbl}</span></td>
|
||||
<td class="text-nowrap">${espMin}</td>
|
||||
<td class="text-nowrap">${srvMin}</td>
|
||||
<td class="text-nowrap">${totMin}</td>
|
||||
<td class="text-nowrap">
|
||||
<button class="btn btn-sm btn-outline-secondary py-0 px-2 me-1"
|
||||
onclick="toggleDetalle('${rowId}', this, ${t.id})"
|
||||
|
||||
Reference in New Issue
Block a user