feat(dashboard): add tomorrow filter to period switchers and schedule view v3.4.4
This commit is contained in:
@@ -107,6 +107,9 @@
|
||||
<button type="button" class="btn btn-outline-primary active" data-period="today" onclick="switchAdminPercentiles('today')">
|
||||
<i class="bi bi-calendar-day me-1"></i>Día (Hoy)
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-primary" data-period="tomorrow" onclick="switchAdminPercentiles('tomorrow')">
|
||||
<i class="bi bi-calendar-event me-1"></i>Mañana
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-primary" data-period="week" onclick="switchAdminPercentiles('week')">
|
||||
<i class="bi bi-calendar-week me-1"></i>Semana
|
||||
</button>
|
||||
|
||||
@@ -109,6 +109,9 @@
|
||||
<button type="button" class="btn btn-outline-primary active" data-period="today" onclick="switchBedeliaPercentiles('today')">
|
||||
<i class="bi bi-calendar-day me-1"></i>Día (Hoy)
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-primary" data-period="tomorrow" onclick="switchBedeliaPercentiles('tomorrow')">
|
||||
<i class="bi bi-calendar-plus me-1"></i>Mañana
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-primary" data-period="week" onclick="switchBedeliaPercentiles('week')">
|
||||
<i class="bi bi-calendar-week me-1"></i>Semana
|
||||
</button>
|
||||
@@ -223,6 +226,10 @@
|
||||
<i class="bi bi-calendar-day me-1"></i>Clases de Hoy
|
||||
<span class="badge bg-primary ms-1" id="bedeliaTodayBadge">{{ role_data.today_schedule_list | length }}</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-primary" data-view="tomorrow" onclick="switchBedeliaScheduleView('tomorrow')">
|
||||
<i class="bi bi-calendar-plus me-1"></i>Mañana
|
||||
<span class="badge bg-primary ms-1" id="bedeliaTomorrowBadge">{{ role_data.tomorrow_schedule_list | length if role_data.tomorrow_schedule_list else 0 }}</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-primary" data-view="week" onclick="switchBedeliaScheduleView('week')">
|
||||
<i class="bi bi-calendar-week me-1"></i>Esta Semana
|
||||
<span class="badge bg-primary ms-1" id="bedeliaWeekBadge">{{ role_data.week_schedule_list | length }}</span>
|
||||
@@ -306,6 +313,75 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Tabla Clases de Mañana -->
|
||||
<div id="bedeliaScheduleTomorrow" style="display: none;">
|
||||
{% if role_data.tomorrow_schedule_list and role_data.tomorrow_schedule_list | length > 0 %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0 small">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="ps-3">Horario</th>
|
||||
<th>Aula / Espacio</th>
|
||||
<th>Asignatura</th>
|
||||
<th>Comisión / Turno</th>
|
||||
<th>Docente</th>
|
||||
<th class="text-center">Estado</th>
|
||||
<th class="text-end pe-3">Acción</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in role_data.tomorrow_schedule_list %}
|
||||
<tr>
|
||||
<td class="ps-3 font-monospace">
|
||||
<strong>{{ r.start_time }}</strong> - {{ r.end_time }} hs
|
||||
</td>
|
||||
<td>
|
||||
{% if r.classroom.is_virtual %}
|
||||
<span class="badge bg-info-subtle text-info border">
|
||||
<i class="bi bi-camera-video me-1"></i>{{ r.classroom.code }}
|
||||
</span>
|
||||
{% if r.virtual_link %}
|
||||
<a href="{{ r.virtual_link }}" target="_blank" class="btn btn-xs btn-outline-info ms-1 py-0 px-1" title="Unirse a videoconferencia">
|
||||
<i class="bi bi-box-arrow-up-right"></i> Link
|
||||
</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="badge bg-primary-subtle text-primary border font-monospace">
|
||||
<i class="bi bi-door-open me-1"></i>{{ r.classroom.code }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<div class="fw-semibold text-body">{{ r.subject_name }}</div>
|
||||
{% if r.subject_code %}<small class="text-muted font-monospace">{{ r.subject_code }}</small>{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge bg-secondary-subtle text-secondary border me-1">{{ r.commission.code }}</span>
|
||||
<span class="badge bg-light text-dark border">{{ r.shift }}</span>
|
||||
</td>
|
||||
<td class="small">{{ r.user.name }}</td>
|
||||
<td class="text-center">
|
||||
<span class="badge bg-success-subtle text-success border">Confirmada</span>
|
||||
</td>
|
||||
<td class="text-end pe-3">
|
||||
<a href="/schedule/today_schedule" class="btn btn-sm btn-outline-primary py-0 px-2" title="Ver en cartelera">
|
||||
<i class="bi bi-eye me-1"></i>Ver
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="text-center py-4">
|
||||
<i class="bi bi-calendar-x text-muted fs-1 d-block mb-2"></i>
|
||||
<h6 class="text-secondary fw-bold">No hay clases programadas para el día de mañana</h6>
|
||||
<p class="text-muted small mb-0">Consulte el cronograma semanal o cargue una nueva reserva si corresponde.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Tabla Agenda Semanal -->
|
||||
<div id="bedeliaScheduleWeek" style="display: none;">
|
||||
{% if role_data.week_schedule_list and role_data.week_schedule_list | length > 0 %}
|
||||
@@ -383,11 +459,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex gap-2 align-items-center flex-wrap">
|
||||
<!-- Selector de período: Día (Hoy por defecto), Semana, Mes -->
|
||||
<!-- Selector de período: Día (Hoy por defecto), Mañana, Semana, Mes -->
|
||||
<div class="btn-group btn-group-sm" role="group" id="commFilterPeriodSwitcher">
|
||||
<button type="button" class="btn btn-outline-primary active" data-period="today" onclick="switchCommFilterPeriod('today')">
|
||||
<i class="bi bi-calendar-day me-1"></i>Día (Hoy)
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-primary" data-period="tomorrow" onclick="switchCommFilterPeriod('tomorrow')">
|
||||
<i class="bi bi-calendar-plus me-1"></i>Mañana
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-primary" data-period="week" onclick="switchCommFilterPeriod('week')">
|
||||
<i class="bi bi-calendar-week me-1"></i>Semana
|
||||
</button>
|
||||
@@ -527,7 +606,109 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- 2. SEMANA: Sin Asignar -->
|
||||
<!-- 2. MAÑANA: Sin Asignar -->
|
||||
<div id="commBlock-tomorrow-unassigned" class="comm-block" style="display: none;">
|
||||
{% if filter_stats.tomorrow.commissions.unassigned and filter_stats.tomorrow.commissions.unassigned | length > 0 %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0 small">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="ps-3">Comisión</th>
|
||||
<th>Asignatura</th>
|
||||
<th>Docente</th>
|
||||
<th>Horario Habitual</th>
|
||||
<th>Turno</th>
|
||||
<th>Cupo</th>
|
||||
<th class="text-end pe-3">Acción</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for comm in filter_stats.tomorrow.commissions.unassigned %}
|
||||
<tr>
|
||||
<td class="ps-3 font-monospace">
|
||||
<span class="badge bg-danger-subtle text-danger border font-monospace">{{ comm.full_code }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="fw-semibold text-body">{{ comm.subject_name }}</div>
|
||||
{% if comm.subject_code %}<small class="text-muted font-monospace">{{ comm.subject_code }}</small>{% endif %}
|
||||
</td>
|
||||
<td class="small">{{ comm.teacher_name }}</td>
|
||||
<td><span class="badge bg-body-tertiary text-body border"><i class="bi bi-clock me-1"></i>{{ comm.schedule }}</span></td>
|
||||
<td><span class="badge bg-info-subtle text-info-emphasis border">{{ comm.shift }}</span></td>
|
||||
<td class="font-monospace">{{ comm.current_students }}/{{ comm.max_students }}</td>
|
||||
<td class="text-end pe-3">
|
||||
<a href="/schedule/add_reservation?commission_id={{ comm.id }}" class="btn btn-sm btn-outline-success py-0 px-2" title="Asignar aula mañana a esta comisión">
|
||||
<i class="bi bi-plus-circle me-1"></i>Asignar Aula
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="text-center py-4">
|
||||
<i class="bi bi-check-circle-fill text-success fs-1 d-block mb-2"></i>
|
||||
<h6 class="text-success fw-bold">¡Todas las comisiones de mañana tienen aula asignada!</h6>
|
||||
<p class="text-muted small mb-0">No hay comisiones huérfanas sin espacio para el día de mañana.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- 2. MAÑANA: Asignadas -->
|
||||
<div id="commBlock-tomorrow-assigned" class="comm-block" style="display: none;">
|
||||
{% if filter_stats.tomorrow.commissions.assigned and filter_stats.tomorrow.commissions.assigned | length > 0 %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0 small">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="ps-3">Comisión</th>
|
||||
<th>Asignatura</th>
|
||||
<th>Aula Asignada</th>
|
||||
<th>Horario de Clase</th>
|
||||
<th>Docente</th>
|
||||
<th>Turno</th>
|
||||
<th class="text-end pe-3">Acción</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for comm in filter_stats.tomorrow.commissions.assigned %}
|
||||
<tr>
|
||||
<td class="ps-3 font-monospace">
|
||||
<span class="badge bg-success-subtle text-success border font-monospace">{{ comm.full_code }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="fw-semibold text-body">{{ comm.subject_name }}</div>
|
||||
{% if comm.subject_code %}<small class="text-muted font-monospace">{{ comm.subject_code }}</small>{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge bg-primary-subtle text-primary border font-monospace">
|
||||
<i class="bi bi-door-open me-1"></i>{{ comm.assigned_room or 'Aula Asignada' }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="font-monospace text-primary fw-bold">{{ comm.assigned_time or comm.schedule }}</td>
|
||||
<td class="small">{{ comm.teacher_name }}</td>
|
||||
<td><span class="badge bg-info-subtle text-info-emphasis border">{{ comm.shift }}</span></td>
|
||||
<td class="text-end pe-3">
|
||||
<a href="/schedule/today_schedule" class="btn btn-sm btn-outline-primary py-0 px-2" title="Ver en cartelera">
|
||||
<i class="bi bi-eye me-1"></i>Ver
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="text-center py-4">
|
||||
<i class="bi bi-info-circle text-muted fs-1 d-block mb-2"></i>
|
||||
<h6 class="text-secondary fw-bold">No hay comisiones asignadas para el día de mañana</h6>
|
||||
<p class="text-muted small mb-0">Consulte las pestañas de semana o mes para ver las asignaciones programadas.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- 3. SEMANA: Sin Asignar -->
|
||||
<div id="commBlock-week-unassigned" class="comm-block" style="display: none;">
|
||||
{% if filter_stats.week.commissions.unassigned and filter_stats.week.commissions.unassigned | length > 0 %}
|
||||
<div class="table-responsive">
|
||||
@@ -740,11 +921,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex gap-2 align-items-center flex-wrap">
|
||||
<!-- Selector de período: Día (Hoy por defecto), Semana, Mes -->
|
||||
<!-- Selector de período: Día (Hoy por defecto), Mañana, Semana, Mes -->
|
||||
<div class="btn-group btn-group-sm" role="group" id="classFilterPeriodSwitcher">
|
||||
<button type="button" class="btn btn-outline-success active" data-period="today" onclick="switchClassFilterPeriod('today')">
|
||||
<i class="bi bi-calendar-day me-1"></i>Día (Hoy)
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-success" data-period="tomorrow" onclick="switchClassFilterPeriod('tomorrow')">
|
||||
<i class="bi bi-calendar-plus me-1"></i>Mañana
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-success" data-period="week" onclick="switchClassFilterPeriod('week')">
|
||||
<i class="bi bi-calendar-week me-1"></i>Semana
|
||||
</button>
|
||||
@@ -852,7 +1036,73 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- 2. SEMANA: Libres -->
|
||||
<!-- 2. MAÑANA: Libres / Sin Asignar -->
|
||||
<div id="classBlock-tomorrow-unassigned" class="class-block" style="display: none;">
|
||||
{% if filter_stats.tomorrow.classrooms.unassigned and filter_stats.tomorrow.classrooms.unassigned | length > 0 %}
|
||||
<div class="row g-2">
|
||||
{% for aula in filter_stats.tomorrow.classrooms.unassigned %}
|
||||
<div class="col-sm-6 col-md-4 col-lg-3">
|
||||
<a href="/schedule/add_reservation?classroom_id={{ aula.id }}" class="text-decoration-none text-reset d-block h-100">
|
||||
<div class="p-3 rounded border h-100 transition-all bg-success bg-opacity-10 border-success-subtle hover-shadow">
|
||||
<div class="d-flex justify-content-between align-items-start mb-2">
|
||||
<span class="badge bg-success text-white border font-monospace fw-bold">{{ aula.code }}</span>
|
||||
<span class="badge bg-success-subtle text-success border">Disponible Mañana</span>
|
||||
</div>
|
||||
<div class="small text-muted mb-1">
|
||||
<i class="bi bi-building me-1"></i>{{ aula.building }}{% if aula.floor %} · {{ aula.floor }}{% endif %}
|
||||
</div>
|
||||
<div class="d-flex justify-content-between align-items-center mt-2 pt-2 border-top border-success-subtle">
|
||||
<span class="small fw-semibold text-body"><i class="bi bi-people-fill me-1"></i>Cap: {{ aula.capacity }}</span>
|
||||
<span class="badge bg-success text-white small"><i class="bi bi-plus-circle me-1"></i>Asignar</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="text-center py-4">
|
||||
<i class="bi bi-calendar-check-fill text-primary fs-1 d-block mb-2"></i>
|
||||
<h6 class="text-primary fw-bold">¡Todas las aulas están ocupadas el día de mañana!</h6>
|
||||
<p class="text-muted small mb-0">No hay espacios físicos disponibles para nuevas asignaciones mañana.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- 2. MAÑANA: Asignadas / En Uso -->
|
||||
<div id="classBlock-tomorrow-assigned" class="class-block" style="display: none;">
|
||||
{% if filter_stats.tomorrow.classrooms.assigned and filter_stats.tomorrow.classrooms.assigned | length > 0 %}
|
||||
<div class="row g-2">
|
||||
{% for aula in filter_stats.tomorrow.classrooms.assigned %}
|
||||
<div class="col-sm-6 col-md-4 col-lg-3">
|
||||
<div class="p-3 rounded border h-100 bg-primary bg-opacity-10 border-primary-subtle">
|
||||
<div class="d-flex justify-content-between align-items-start mb-2">
|
||||
<span class="badge bg-primary text-white border font-monospace fw-bold">{{ aula.code }}</span>
|
||||
<span class="badge bg-primary-subtle text-primary border">En Uso Mañana</span>
|
||||
</div>
|
||||
<div class="small text-muted mb-1">
|
||||
<i class="bi bi-building me-1"></i>{{ aula.building }}{% if aula.floor %} · {{ aula.floor }}{% endif %}
|
||||
</div>
|
||||
<div class="small text-primary fw-semibold mb-2 text-truncate" title="{{ aula.assigned_summary }}">
|
||||
<i class="bi bi-clock-history me-1"></i>{{ aula.assigned_summary or 'Clase activa' }}
|
||||
</div>
|
||||
<div class="d-flex justify-content-between align-items-center mt-2 pt-2 border-top border-primary-subtle">
|
||||
<span class="small fw-semibold text-body"><i class="bi bi-people-fill me-1"></i>Cap: {{ aula.capacity }}</span>
|
||||
<a href="/schedule/today_schedule" class="btn btn-xs btn-outline-primary py-0 px-2">Ver Cartelera</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="text-center py-4">
|
||||
<i class="bi bi-door-open text-muted fs-1 d-block mb-2"></i>
|
||||
<h6 class="text-secondary fw-bold">No hay aulas en uso el día de mañana</h6>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- 3. SEMANA: Libres -->
|
||||
<div id="classBlock-week-unassigned" class="class-block" style="display: none;">
|
||||
{% if filter_stats.week.classrooms.unassigned and filter_stats.week.classrooms.unassigned | length > 0 %}
|
||||
<div class="row g-2">
|
||||
|
||||
Reference in New Issue
Block a user