fix(classrooms): excluir reservas pasadas de próximas clases y cursadas activas (v3.8.11)

This commit is contained in:
2026-10-26 11:20:08 -03:00
parent 452ff8098a
commit bbaab0b1d7
9 changed files with 146 additions and 40 deletions
+44
View File
@@ -168,6 +168,50 @@
{% endif %}
</div>
{% endif %}
{% if past_reservations and (past_reservations|length > 0) %}
<div class="border-top p-3 bg-body-tertiary">
<div class="d-flex justify-content-between align-items-center">
<span class="small fw-semibold text-muted">
<i class="bi bi-clock-history me-1"></i>Historial de Clases Finalizadas ({{ past_reservations|length }})
</span>
<button class="btn btn-sm btn-link text-decoration-none p-0 text-muted" type="button" data-bs-toggle="collapse" data-bs-target="#collapsePastClasses" aria-expanded="false" style="font-size: 0.75rem;">
Ver historial anterior <i class="bi bi-chevron-down ms-1"></i>
</button>
</div>
<div class="collapse mt-2" id="collapsePastClasses">
<div class="table-responsive bg-body rounded border">
<table class="table table-sm table-hover align-middle mb-0" style="font-size: 0.78rem;">
<thead class="table-light">
<tr>
<th class="ps-2">Fecha y Horario</th>
<th>Materia</th>
<th>Comisión</th>
<th class="text-end pe-2">Estado</th>
</tr>
</thead>
<tbody>
{% for pres in past_reservations %}
<tr class="text-muted">
<td class="ps-2">
<i class="bi bi-check2-circle me-1 text-secondary"></i>{{ pres.date_display_friendly }} · {{ pres.time_range_friendly }}
</td>
<td>
<span class="fw-semibold">{{ pres.subject_name }}</span>
{% if pres.subject_code %}
<small class="badge bg-secondary-subtle text-secondary font-monospace ms-1">{{ pres.subject_code }}</small>
{% endif %}
</td>
<td><span class="badge bg-secondary-subtle text-secondary font-monospace">{{ pres.commission.code if pres.commission else 'C1' }}</span></td>
<td class="text-end pe-2"><span class="badge bg-secondary-subtle text-secondary border">Finalizada</span></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>