feat(dashboard): add commissions pagination, career filter, unassigned KPI card, and occupancy pie charts v3.8.19

This commit is contained in:
2026-10-26 17:08:39 -03:00
parent e4aa832b6e
commit a692c9ce67
13 changed files with 999 additions and 237 deletions
+106 -36
View File
@@ -137,9 +137,10 @@
</div>
</div>
<div class="card-body p-3">
<div class="row g-3 align-items-center">
<!-- Tarjeta 1: Asignadas -->
<div class="col-md-3">
<!-- Fila 1: 4 Tarjetas KPI (Aulas Asignadas, Aulas Sin Asignar, Comisiones Sin Asignar, Comisiones Asignadas) -->
<div class="row g-3">
<!-- Tarjeta 1: Aulas Asignadas -->
<div class="col-md-3 col-sm-6">
<a href="/classrooms/list_classrooms?view_mode=physical" class="text-decoration-none text-reset d-block h-100">
<div class="p-3 rounded bg-success bg-opacity-10 border border-success-subtle h-100 text-center transition-all">
<div class="d-flex justify-content-between align-items-center mb-1">
@@ -158,8 +159,8 @@
</a>
</div>
<!-- Tarjeta 2: Sin Asignar -->
<div class="col-md-3">
<!-- Tarjeta 2: Aulas Sin Asignar (Libres) -->
<div class="col-md-3 col-sm-6">
<a href="/classrooms/list_classrooms?view_mode=physical" class="text-decoration-none text-reset d-block h-100">
<div class="p-3 rounded bg-warning bg-opacity-10 border border-warning-subtle h-100 text-center transition-all">
<div class="d-flex justify-content-between align-items-center mb-1">
@@ -178,45 +179,114 @@
</a>
</div>
<!-- Tarjeta 3: Barras Comparativas de Percentil -->
<div class="col-md-6">
<div class="p-3 rounded bg-body-tertiary border h-100 d-flex flex-column justify-content-center">
<div class="d-flex justify-content-between align-items-center mb-1">
<span class="small fw-semibold text-body">
<i class="bi bi-pie-chart me-1 text-primary"></i>Ocupación en <span id="adminPctPeriodTitle">Día (Hoy)</span>:
</span>
<span class="small font-monospace text-muted" id="adminPctLegendText">
<strong class="text-success" id="adminPctLegendAssigned">{{ filter_stats.today.classrooms.assigned_count }} asignadas ({{ filter_stats.today.classrooms.assigned_pct }}%)</strong> · <strong class="text-warning-emphasis" id="adminPctLegendUnassigned">{{ filter_stats.today.classrooms.unassigned_count }} libres ({{ filter_stats.today.classrooms.unassigned_pct }}%)</strong>
</span>
</div>
<div class="progress mb-3" style="height: 14px;">
<div id="adminPctProgressBarAssigned" class="progress-bar bg-success progress-bar-striped" role="progressbar"
{{ ('style="width: ' ~ (filter_stats.today.classrooms.assigned_pct or 0) ~ '%;"') | safe }}
aria-valuenow="{{ filter_stats.today.classrooms.assigned_pct }}" aria-valuemin="0" aria-valuemax="100">
<span id="adminPctBarTextAssigned">{{ filter_stats.today.classrooms.assigned_pct }}%</span>
<!-- Tarjeta 3: Comisiones Sin Asignar (Pendientes) -->
<div class="col-md-3 col-sm-6">
<a href="/admin/commissions_list" class="text-decoration-none text-reset d-block h-100">
<div class="p-3 rounded bg-danger bg-opacity-10 border border-danger-subtle h-100 text-center transition-all">
<div class="d-flex justify-content-between align-items-center mb-1">
<span class="text-danger small fw-bold text-uppercase">Comisiones Sin Asignar</span>
<span class="badge bg-danger text-white font-monospace" id="adminPctCommUnassignedPct">{{ filter_stats.today.commissions.unassigned_pct }}%</span>
</div>
<div id="adminPctProgressBarUnassigned" class="progress-bar bg-warning" role="progressbar"
{{ ('style="width: ' ~ (filter_stats.today.classrooms.unassigned_pct or 0) ~ '%;"') | safe }}
aria-valuenow="{{ filter_stats.today.classrooms.unassigned_pct }}" aria-valuemin="0" aria-valuemax="100">
<span id="adminPctBarTextUnassigned">{{ filter_stats.today.classrooms.unassigned_pct }}%</span>
<div class="d-flex align-items-baseline justify-content-center gap-2 my-2">
<h2 class="mb-0 fw-bold text-danger" id="adminPctCommUnassignedCount">{{ filter_stats.today.commissions.unassigned_count }}</h2>
<span class="text-muted small">/ {{ filter_stats.today.commissions.total }} comisiones</span>
</div>
<div class="text-danger small pt-2 border-top border-danger-subtle d-flex align-items-center justify-content-between">
<span>Pendientes de asignación</span>
<i class="bi bi-arrow-right"></i>
</div>
</div>
</a>
</div>
<!-- Comparador de referencia cuatrimestral -->
<div class="d-flex justify-content-between align-items-center mb-1">
<span class="small fw-semibold text-secondary">
<i class="bi bi-calendar-range me-1"></i>Referencia Cuatrimestral Global:
</span>
<span class="small font-monospace text-muted">
{{ stats.assigned_classrooms_pct }}% asignadas · {{ stats.unassigned_classrooms_pct }}% libres
</span>
<!-- Tarjeta 4: Comisiones Asignadas (Con Aula) -->
<div class="col-md-3 col-sm-6">
<a href="/admin/commissions_list" class="text-decoration-none text-reset d-block h-100">
<div class="p-3 rounded bg-primary bg-opacity-10 border border-primary-subtle h-100 text-center transition-all">
<div class="d-flex justify-content-between align-items-center mb-1">
<span class="text-primary small fw-bold text-uppercase">Comisiones Asignadas</span>
<span class="badge bg-primary text-white font-monospace" id="adminPctCommAssignedPct">{{ filter_stats.today.commissions.assigned_pct }}%</span>
</div>
<div class="d-flex align-items-baseline justify-content-center gap-2 my-2">
<h2 class="mb-0 fw-bold text-primary" id="adminPctCommAssignedCount">{{ filter_stats.today.commissions.assigned_count }}</h2>
<span class="text-muted small">/ {{ filter_stats.today.commissions.total }} comisiones</span>
</div>
<div class="text-primary small pt-2 border-top border-primary-subtle d-flex align-items-center justify-content-between">
<span>Con aula asignada</span>
<i class="bi bi-arrow-right"></i>
</div>
</div>
<div class="progress" style="height: 8px;">
<div class="progress-bar bg-secondary" role="progressbar" {{ ('style="width: ' ~ (stats.assigned_classrooms_pct or 0) ~ '%;"') | safe }}></div>
<div class="progress-bar bg-secondary-subtle" role="progressbar" {{ ('style="width: ' ~ (stats.unassigned_classrooms_pct or 0) ~ '%;"') | safe }}></div>
</a>
</div>
</div>
<!-- Fila 2: Gráficos de Torta para Ocupación en Día (Hoy) -->
<div class="row g-3 mt-2">
<!-- Gráfico de Torta: Aulas Físicas -->
<div class="col-md-6">
<div class="p-3 rounded bg-body-tertiary border h-100 d-flex flex-column justify-content-between">
<div class="d-flex justify-content-between align-items-center mb-2">
<span class="small fw-bold text-body">
<i class="bi bi-pie-chart-fill text-success me-1"></i>Ocupación de Aulas: <span id="adminClassPiePeriodTitle">Día (Hoy)</span>
</span>
<span class="badge bg-body text-secondary border font-monospace small" id="adminClassPieTotalBadge">Total: {{ filter_stats.today.classrooms.total }} aulas</span>
</div>
<div class="position-relative d-flex justify-content-center align-items-center my-2" style="height: 180px;">
<canvas id="adminClassroomsPieChart"></canvas>
</div>
<div class="d-flex justify-content-around text-center small pt-2 border-top mt-2">
<div>
<span class="d-inline-block rounded-circle me-1" style="width: 10px; height: 10px; background-color: #198754;"></span>
<span class="text-success fw-semibold" id="adminClassPieLegendAssigned">Asignadas: {{ filter_stats.today.classrooms.assigned_count }} ({{ filter_stats.today.classrooms.assigned_pct }}%)</span>
</div>
<div>
<span class="d-inline-block rounded-circle me-1" style="width: 10px; height: 10px; background-color: #ffc107;"></span>
<span class="text-warning-emphasis fw-semibold" id="adminClassPieLegendUnassigned">Libres: {{ filter_stats.today.classrooms.unassigned_count }} ({{ filter_stats.today.classrooms.unassigned_pct }}%)</span>
</div>
</div>
</div>
</div>
<!-- Gráfico de Torta: Comisiones -->
<div class="col-md-6">
<div class="p-3 rounded bg-body-tertiary border h-100 d-flex flex-column justify-content-between">
<div class="d-flex justify-content-between align-items-center mb-2">
<span class="small fw-bold text-body">
<i class="bi bi-pie-chart-fill text-primary me-1"></i>Asignación de Comisiones: <span id="adminCommPiePeriodTitle">Día (Hoy)</span>
</span>
<span class="badge bg-body text-secondary border font-monospace small" id="adminCommPieTotalBadge">Total: {{ filter_stats.today.commissions.total }} comisiones</span>
</div>
<div class="position-relative d-flex justify-content-center align-items-center my-2" style="height: 180px;">
<canvas id="adminCommissionsPieChart"></canvas>
</div>
<div class="d-flex justify-content-around text-center small pt-2 border-top mt-2">
<div>
<span class="d-inline-block rounded-circle me-1" style="width: 10px; height: 10px; background-color: #0d6efd;"></span>
<span class="text-primary fw-semibold" id="adminCommPieLegendAssigned">Con Aula: {{ filter_stats.today.commissions.assigned_count }} ({{ filter_stats.today.commissions.assigned_pct }}%)</span>
</div>
<div>
<span class="d-inline-block rounded-circle me-1" style="width: 10px; height: 10px; background-color: #dc3545;"></span>
<span class="text-danger fw-semibold" id="adminCommPieLegendUnassigned">Sin Asignar: {{ filter_stats.today.commissions.unassigned_count }} ({{ filter_stats.today.commissions.unassigned_pct }}%)</span>
</div>
</div>
</div>
</div>
</div>
<!-- Referencia Cuatrimestral Global al pie -->
<div class="mt-3 p-2 rounded bg-body-tertiary border d-flex justify-content-between align-items-center flex-wrap gap-2">
<span class="small fw-semibold text-secondary">
<i class="bi bi-calendar-range me-1"></i>Referencia Cuatrimestral Global de Aulas:
</span>
<div class="flex-grow-1 mx-2" style="max-width: 320px; min-width: 180px;">
<div class="progress" style="height: 8px;">
<div class="progress-bar bg-success" role="progressbar" {{ ('style="width: ' ~ (stats.assigned_classrooms_pct or 0) ~ '%;"') | safe }}></div>
<div class="progress-bar bg-warning" role="progressbar" {{ ('style="width: ' ~ (stats.unassigned_classrooms_pct or 0) ~ '%;"') | safe }}></div>
</div>
</div>
<span class="small font-monospace text-muted">
{{ stats.assigned_classrooms_pct }}% asignadas · {{ stats.unassigned_classrooms_pct }}% libres
</span>
</div>
</div>
</div>
+223 -54
View File
@@ -126,9 +126,10 @@
</div>
</div>
<div class="card-body p-3">
<div class="row g-3 align-items-center">
<!-- Fila 1: 4 Tarjetas KPI (Aulas Asignadas, Aulas Sin Asignar, Comisiones Sin Asignar, Comisiones Asignadas) -->
<div class="row g-3">
<!-- Tarjeta 1: Aulas Asignadas -->
<div class="col-md-3">
<div class="col-md-3 col-sm-6">
<a href="/classrooms/list_classrooms?view_mode=physical" class="text-decoration-none text-reset d-block h-100">
<div class="p-3 rounded bg-success bg-opacity-10 border border-success-subtle h-100 text-center transition-all">
<div class="d-flex justify-content-between align-items-center mb-1">
@@ -148,7 +149,7 @@
</div>
<!-- Tarjeta 2: Aulas Sin Asignar (Libres) -->
<div class="col-md-3">
<div class="col-md-3 col-sm-6">
<a href="/schedule/add_reservation" class="text-decoration-none text-reset d-block h-100">
<div class="p-3 rounded bg-warning bg-opacity-10 border border-warning-subtle h-100 text-center transition-all">
<div class="d-flex justify-content-between align-items-center mb-1">
@@ -167,45 +168,114 @@
</a>
</div>
<!-- Tarjeta 3: Barras Comparativas de Percentil -->
<div class="col-md-6">
<div class="p-3 rounded bg-body-tertiary border h-100 d-flex flex-column justify-content-center">
<div class="d-flex justify-content-between align-items-center mb-1">
<span class="small fw-semibold text-body">
<i class="bi bi-pie-chart me-1 text-primary"></i>Ocupación en <span id="bedeliaPctPeriodTitle">Día (Hoy)</span>:
</span>
<span class="small font-monospace text-muted" id="bedeliaPctLegendText">
<strong class="text-success" id="bedeliaPctLegendAssigned">{{ filter_stats.today.classrooms.assigned_count }} asignadas ({{ filter_stats.today.classrooms.assigned_pct }}%)</strong> · <strong class="text-warning-emphasis" id="bedeliaPctLegendUnassigned">{{ filter_stats.today.classrooms.unassigned_count }} libres ({{ filter_stats.today.classrooms.unassigned_pct }}%)</strong>
</span>
</div>
<div class="progress mb-3" style="height: 14px;">
<div id="bedeliaPctProgressBarAssigned" class="progress-bar bg-success progress-bar-striped" role="progressbar"
{{ ('style="width: ' ~ (filter_stats.today.classrooms.assigned_pct or 0) ~ '%;"') | safe }}
aria-valuenow="{{ filter_stats.today.classrooms.assigned_pct }}" aria-valuemin="0" aria-valuemax="100">
<span id="bedeliaPctBarTextAssigned">{{ filter_stats.today.classrooms.assigned_pct }}%</span>
<!-- Tarjeta 3: Comisiones Sin Asignar (Pendientes) -->
<div class="col-md-3 col-sm-6">
<a href="#bedelia-commissions-panel" class="text-decoration-none text-reset d-block h-100">
<div class="p-3 rounded bg-danger bg-opacity-10 border border-danger-subtle h-100 text-center transition-all">
<div class="d-flex justify-content-between align-items-center mb-1">
<span class="text-danger small fw-bold text-uppercase">Comisiones Sin Asignar</span>
<span class="badge bg-danger text-white font-monospace" id="bedeliaPctCommUnassignedPct">{{ filter_stats.today.commissions.unassigned_pct }}%</span>
</div>
<div id="bedeliaPctProgressBarUnassigned" class="progress-bar bg-warning" role="progressbar"
{{ ('style="width: ' ~ (filter_stats.today.classrooms.unassigned_pct or 0) ~ '%;"') | safe }}
aria-valuenow="{{ filter_stats.today.classrooms.unassigned_pct }}" aria-valuemin="0" aria-valuemax="100">
<span id="bedeliaPctBarTextUnassigned">{{ filter_stats.today.classrooms.unassigned_pct }}%</span>
<div class="d-flex align-items-baseline justify-content-center gap-2 my-2">
<h2 class="mb-0 fw-bold text-danger" id="bedeliaPctCommUnassignedCount">{{ filter_stats.today.commissions.unassigned_count }}</h2>
<span class="text-muted small">/ <span class="pctTotalCommissions">{{ filter_stats.today.commissions.total }}</span> comisiones</span>
</div>
<div class="text-danger small pt-2 border-top border-danger-subtle d-flex align-items-center justify-content-between">
<span>Pendientes de asignar</span>
<i class="bi bi-arrow-down-circle"></i>
</div>
</div>
</a>
</div>
<!-- Comparador de referencia cuatrimestral -->
<div class="d-flex justify-content-between align-items-center mb-1">
<span class="small fw-semibold text-secondary">
<i class="bi bi-calendar-range me-1"></i>Referencia Cuatrimestral Global:
</span>
<span class="small font-monospace text-muted">
{{ stats.assigned_classrooms_pct }}% asignadas · {{ stats.unassigned_classrooms_pct }}% libres
</span>
<!-- Tarjeta 4: Comisiones Asignadas (Con Aula) -->
<div class="col-md-3 col-sm-6">
<a href="#bedelia-commissions-panel" class="text-decoration-none text-reset d-block h-100">
<div class="p-3 rounded bg-primary bg-opacity-10 border border-primary-subtle h-100 text-center transition-all">
<div class="d-flex justify-content-between align-items-center mb-1">
<span class="text-primary small fw-bold text-uppercase">Comisiones Asignadas</span>
<span class="badge bg-primary text-white font-monospace" id="bedeliaPctCommAssignedPct">{{ filter_stats.today.commissions.assigned_pct }}%</span>
</div>
<div class="d-flex align-items-baseline justify-content-center gap-2 my-2">
<h2 class="mb-0 fw-bold text-primary" id="bedeliaPctCommAssignedCount">{{ filter_stats.today.commissions.assigned_count }}</h2>
<span class="text-muted small">/ <span class="pctTotalCommissions">{{ filter_stats.today.commissions.total }}</span> comisiones</span>
</div>
<div class="text-primary small pt-2 border-top border-primary-subtle d-flex align-items-center justify-content-between">
<span>Con aula asignada</span>
<i class="bi bi-check2-circle"></i>
</div>
</div>
<div class="progress" style="height: 8px;">
<div class="progress-bar bg-secondary" role="progressbar" {{ ('style="width: ' ~ (stats.assigned_classrooms_pct or 0) ~ '%;"') | safe }}></div>
<div class="progress-bar bg-secondary-subtle" role="progressbar" {{ ('style="width: ' ~ (stats.unassigned_classrooms_pct or 0) ~ '%;"') | safe }}></div>
</a>
</div>
</div>
<!-- Fila 2: Gráficos de Torta para Ocupación en Día (Hoy) -->
<div class="row g-3 mt-2">
<!-- Gráfico de Torta: Aulas Físicas -->
<div class="col-md-6">
<div class="p-3 rounded bg-body-tertiary border h-100 d-flex flex-column justify-content-between">
<div class="d-flex justify-content-between align-items-center mb-2">
<span class="small fw-bold text-body">
<i class="bi bi-pie-chart-fill text-success me-1"></i>Ocupación de Aulas: <span id="bedeliaClassPiePeriodTitle">Día (Hoy)</span>
</span>
<span class="badge bg-body text-secondary border font-monospace small" id="bedeliaClassPieTotalBadge">Total: {{ filter_stats.today.classrooms.total }} aulas</span>
</div>
<div class="position-relative d-flex justify-content-center align-items-center my-2" style="height: 180px;">
<canvas id="bedeliaClassroomsPieChart"></canvas>
</div>
<div class="d-flex justify-content-around text-center small pt-2 border-top mt-2">
<div>
<span class="d-inline-block rounded-circle me-1" style="width: 10px; height: 10px; background-color: #198754;"></span>
<span class="text-success fw-semibold" id="bedeliaClassPieLegendAssigned">Asignadas: {{ filter_stats.today.classrooms.assigned_count }} ({{ filter_stats.today.classrooms.assigned_pct }}%)</span>
</div>
<div>
<span class="d-inline-block rounded-circle me-1" style="width: 10px; height: 10px; background-color: #ffc107;"></span>
<span class="text-warning-emphasis fw-semibold" id="bedeliaClassPieLegendUnassigned">Libres: {{ filter_stats.today.classrooms.unassigned_count }} ({{ filter_stats.today.classrooms.unassigned_pct }}%)</span>
</div>
</div>
</div>
</div>
<!-- Gráfico de Torta: Comisiones -->
<div class="col-md-6">
<div class="p-3 rounded bg-body-tertiary border h-100 d-flex flex-column justify-content-between">
<div class="d-flex justify-content-between align-items-center mb-2">
<span class="small fw-bold text-body">
<i class="bi bi-pie-chart-fill text-primary me-1"></i>Asignación de Comisiones: <span id="bedeliaCommPiePeriodTitle">Día (Hoy)</span>
</span>
<span class="badge bg-body text-secondary border font-monospace small" id="bedeliaCommPieTotalBadge">Total: {{ filter_stats.today.commissions.total }} comisiones</span>
</div>
<div class="position-relative d-flex justify-content-center align-items-center my-2" style="height: 180px;">
<canvas id="bedeliaCommissionsPieChart"></canvas>
</div>
<div class="d-flex justify-content-around text-center small pt-2 border-top mt-2">
<div>
<span class="d-inline-block rounded-circle me-1" style="width: 10px; height: 10px; background-color: #0d6efd;"></span>
<span class="text-primary fw-semibold" id="bedeliaCommPieLegendAssigned">Con Aula: {{ filter_stats.today.commissions.assigned_count }} ({{ filter_stats.today.commissions.assigned_pct }}%)</span>
</div>
<div>
<span class="d-inline-block rounded-circle me-1" style="width: 10px; height: 10px; background-color: #dc3545;"></span>
<span class="text-danger fw-semibold" id="bedeliaCommPieLegendUnassigned">Sin Asignar: {{ filter_stats.today.commissions.unassigned_count }} ({{ filter_stats.today.commissions.unassigned_pct }}%)</span>
</div>
</div>
</div>
</div>
</div>
<!-- Referencia Cuatrimestral Global al pie -->
<div class="mt-3 p-2 rounded bg-body-tertiary border d-flex justify-content-between align-items-center flex-wrap gap-2">
<span class="small fw-semibold text-secondary">
<i class="bi bi-calendar-range me-1"></i>Referencia Cuatrimestral Global de Aulas:
</span>
<div class="flex-grow-1 mx-2" style="max-width: 320px; min-width: 180px;">
<div class="progress" style="height: 8px;">
<div class="progress-bar bg-success" role="progressbar" {{ ('style="width: ' ~ (stats.assigned_classrooms_pct or 0) ~ '%;"') | safe }}></div>
<div class="progress-bar bg-warning" role="progressbar" {{ ('style="width: ' ~ (stats.unassigned_classrooms_pct or 0) ~ '%;"') | safe }}></div>
</div>
</div>
<span class="small font-monospace text-muted">
{{ stats.assigned_classrooms_pct }}% asignadas · {{ stats.unassigned_classrooms_pct }}% libres
</span>
</div>
</div>
</div>
@@ -484,7 +554,7 @@
</div>
</div>
<!-- Sub-navegación: Asignadas vs Sin Asignar -->
<!-- Sub-navegación: Asignadas vs Sin Asignar + Filtro de Carrera -->
<div class="card-body border-bottom bg-body-tertiary py-2 px-3">
<div class="d-flex justify-content-between align-items-center flex-wrap gap-2">
<div class="nav nav-pills nav-fill gap-2" role="tablist" id="commStatusPills">
@@ -497,6 +567,20 @@
<span class="badge bg-success ms-1" id="commStatusBadgeAssigned">{{ filter_stats.today.commissions.assigned_count }}</span>
</button>
</div>
<!-- Filtro por Carrera -->
<div class="d-flex align-items-center gap-2">
<label for="commCareerFilter" class="small fw-semibold text-muted text-nowrap mb-0">
<i class="bi bi-mortarboard me-1"></i>Carrera:
</label>
<select id="commCareerFilter" class="form-select form-select-sm" style="min-width: 220px; max-width: 320px;" onchange="onCommCareerFilterChange(this.value)">
<option value="">Todas las carreras</option>
{% for career in careers %}
<option value="{{ career.name }}">{{ career.name }}</option>
{% endfor %}
</select>
</div>
<div class="small text-muted font-monospace" id="commStatusSummaryText">
Período activo: <strong>{{ filter_stats.today.label }}</strong>
</div>
@@ -522,13 +606,18 @@
</thead>
<tbody>
{% for comm in filter_stats.today.commissions.unassigned %}
<tr>
<tr data-career="{{ comm.career_name }}" data-career-names="{{ comm.career_names }}">
<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 %}
<div class="d-flex align-items-center gap-1 mt-1 flex-wrap">
{% if comm.subject_code %}<span class="badge bg-secondary-subtle text-body-secondary font-monospace" style="font-size: 0.72rem;">{{ comm.subject_code }}</span>{% endif %}
<span class="badge bg-primary-subtle text-primary border" style="font-size: 0.72rem;">
<i class="bi bi-mortarboard me-1"></i>{{ comm.career_name }}
</span>
</div>
</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>
@@ -544,6 +633,10 @@
</tbody>
</table>
</div>
<div class="comm-no-match-alert text-center py-4" style="display: none;">
<i class="bi bi-funnel text-muted fs-2 d-block mb-2"></i>
<span class="text-muted small">No hay comisiones para la carrera seleccionada.</span>
</div>
{% else %}
<div class="text-center py-4">
<i class="bi bi-check-circle-fill text-success fs-1 d-block mb-2"></i>
@@ -571,13 +664,18 @@
</thead>
<tbody>
{% for comm in filter_stats.today.commissions.assigned %}
<tr>
<tr data-career="{{ comm.career_name }}" data-career-names="{{ comm.career_names }}">
<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 %}
<div class="d-flex align-items-center gap-1 mt-1 flex-wrap">
{% if comm.subject_code %}<span class="badge bg-secondary-subtle text-body-secondary font-monospace" style="font-size: 0.72rem;">{{ comm.subject_code }}</span>{% endif %}
<span class="badge bg-primary-subtle text-primary border" style="font-size: 0.72rem;">
<i class="bi bi-mortarboard me-1"></i>{{ comm.career_name }}
</span>
</div>
</td>
<td>
<span class="badge bg-primary-subtle text-primary border font-monospace">
@@ -597,6 +695,10 @@
</tbody>
</table>
</div>
<div class="comm-no-match-alert text-center py-4" style="display: none;">
<i class="bi bi-funnel text-muted fs-2 d-block mb-2"></i>
<span class="text-muted small">No hay comisiones para la carrera seleccionada.</span>
</div>
{% else %}
<div class="text-center py-4">
<i class="bi bi-info-circle text-muted fs-1 d-block mb-2"></i>
@@ -624,13 +726,18 @@
</thead>
<tbody>
{% for comm in filter_stats.tomorrow.commissions.unassigned %}
<tr>
<tr data-career="{{ comm.career_name }}" data-career-names="{{ comm.career_names }}">
<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 %}
<div class="d-flex align-items-center gap-1 mt-1 flex-wrap">
{% if comm.subject_code %}<span class="badge bg-secondary-subtle text-body-secondary font-monospace" style="font-size: 0.72rem;">{{ comm.subject_code }}</span>{% endif %}
<span class="badge bg-primary-subtle text-primary border" style="font-size: 0.72rem;">
<i class="bi bi-mortarboard me-1"></i>{{ comm.career_name }}
</span>
</div>
</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>
@@ -646,6 +753,10 @@
</tbody>
</table>
</div>
<div class="comm-no-match-alert text-center py-4" style="display: none;">
<i class="bi bi-funnel text-muted fs-2 d-block mb-2"></i>
<span class="text-muted small">No hay comisiones para la carrera seleccionada.</span>
</div>
{% else %}
<div class="text-center py-4">
<i class="bi bi-check-circle-fill text-success fs-1 d-block mb-2"></i>
@@ -673,13 +784,18 @@
</thead>
<tbody>
{% for comm in filter_stats.tomorrow.commissions.assigned %}
<tr>
<tr data-career="{{ comm.career_name }}" data-career-names="{{ comm.career_names }}">
<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 %}
<div class="d-flex align-items-center gap-1 mt-1 flex-wrap">
{% if comm.subject_code %}<span class="badge bg-secondary-subtle text-body-secondary font-monospace" style="font-size: 0.72rem;">{{ comm.subject_code }}</span>{% endif %}
<span class="badge bg-primary-subtle text-primary border" style="font-size: 0.72rem;">
<i class="bi bi-mortarboard me-1"></i>{{ comm.career_name }}
</span>
</div>
</td>
<td>
<span class="badge bg-primary-subtle text-primary border font-monospace">
@@ -699,6 +815,10 @@
</tbody>
</table>
</div>
<div class="comm-no-match-alert text-center py-4" style="display: none;">
<i class="bi bi-funnel text-muted fs-2 d-block mb-2"></i>
<span class="text-muted small">No hay comisiones para la carrera seleccionada.</span>
</div>
{% else %}
<div class="text-center py-4">
<i class="bi bi-info-circle text-muted fs-1 d-block mb-2"></i>
@@ -726,13 +846,18 @@
</thead>
<tbody>
{% for comm in filter_stats.week.commissions.unassigned %}
<tr>
<tr data-career="{{ comm.career_name }}" data-career-names="{{ comm.career_names }}">
<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 %}
<div class="d-flex align-items-center gap-1 mt-1 flex-wrap">
{% if comm.subject_code %}<span class="badge bg-secondary-subtle text-body-secondary font-monospace" style="font-size: 0.72rem;">{{ comm.subject_code }}</span>{% endif %}
<span class="badge bg-primary-subtle text-primary border" style="font-size: 0.72rem;">
<i class="bi bi-mortarboard me-1"></i>{{ comm.career_name }}
</span>
</div>
</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>
@@ -748,6 +873,10 @@
</tbody>
</table>
</div>
<div class="comm-no-match-alert text-center py-4" style="display: none;">
<i class="bi bi-funnel text-muted fs-2 d-block mb-2"></i>
<span class="text-muted small">No hay comisiones para la carrera seleccionada.</span>
</div>
{% else %}
<div class="text-center py-4">
<i class="bi bi-check-circle-fill text-success fs-1 d-block mb-2"></i>
@@ -756,7 +885,7 @@
{% endif %}
</div>
<!-- 2. SEMANA: Asignadas -->
<!-- 3. SEMANA: Asignadas -->
<div id="commBlock-week-assigned" class="comm-block" style="display: none;">
{% if filter_stats.week.commissions.assigned and filter_stats.week.commissions.assigned | length > 0 %}
<div class="table-responsive">
@@ -774,13 +903,18 @@
</thead>
<tbody>
{% for comm in filter_stats.week.commissions.assigned %}
<tr>
<tr data-career="{{ comm.career_name }}" data-career-names="{{ comm.career_names }}">
<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 %}
<div class="d-flex align-items-center gap-1 mt-1 flex-wrap">
{% if comm.subject_code %}<span class="badge bg-secondary-subtle text-body-secondary font-monospace" style="font-size: 0.72rem;">{{ comm.subject_code }}</span>{% endif %}
<span class="badge bg-primary-subtle text-primary border" style="font-size: 0.72rem;">
<i class="bi bi-mortarboard me-1"></i>{{ comm.career_name }}
</span>
</div>
</td>
<td>
<span class="badge bg-primary-subtle text-primary border font-monospace">
@@ -800,6 +934,10 @@
</tbody>
</table>
</div>
<div class="comm-no-match-alert text-center py-4" style="display: none;">
<i class="bi bi-funnel text-muted fs-2 d-block mb-2"></i>
<span class="text-muted small">No hay comisiones para la carrera seleccionada.</span>
</div>
{% else %}
<div class="text-center py-4">
<i class="bi bi-info-circle text-muted fs-1 d-block mb-2"></i>
@@ -808,7 +946,7 @@
{% endif %}
</div>
<!-- 3. MES: Sin Asignar -->
<!-- 4. MES: Sin Asignar -->
<div id="commBlock-month-unassigned" class="comm-block" style="display: none;">
{% if filter_stats.month.commissions.unassigned and filter_stats.month.commissions.unassigned | length > 0 %}
<div class="table-responsive">
@@ -826,13 +964,18 @@
</thead>
<tbody>
{% for comm in filter_stats.month.commissions.unassigned %}
<tr>
<tr data-career="{{ comm.career_name }}" data-career-names="{{ comm.career_names }}">
<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 %}
<div class="d-flex align-items-center gap-1 mt-1 flex-wrap">
{% if comm.subject_code %}<span class="badge bg-secondary-subtle text-body-secondary font-monospace" style="font-size: 0.72rem;">{{ comm.subject_code }}</span>{% endif %}
<span class="badge bg-primary-subtle text-primary border" style="font-size: 0.72rem;">
<i class="bi bi-mortarboard me-1"></i>{{ comm.career_name }}
</span>
</div>
</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>
@@ -848,6 +991,10 @@
</tbody>
</table>
</div>
<div class="comm-no-match-alert text-center py-4" style="display: none;">
<i class="bi bi-funnel text-muted fs-2 d-block mb-2"></i>
<span class="text-muted small">No hay comisiones para la carrera seleccionada.</span>
</div>
{% else %}
<div class="text-center py-4">
<i class="bi bi-check-circle-fill text-success fs-1 d-block mb-2"></i>
@@ -856,7 +1003,7 @@
{% endif %}
</div>
<!-- 3. MES: Asignadas -->
<!-- 4. MES: Asignadas -->
<div id="commBlock-month-assigned" class="comm-block" style="display: none;">
{% if filter_stats.month.commissions.assigned and filter_stats.month.commissions.assigned | length > 0 %}
<div class="table-responsive">
@@ -874,13 +1021,18 @@
</thead>
<tbody>
{% for comm in filter_stats.month.commissions.assigned %}
<tr>
<tr data-career="{{ comm.career_name }}" data-career-names="{{ comm.career_names }}">
<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 %}
<div class="d-flex align-items-center gap-1 mt-1 flex-wrap">
{% if comm.subject_code %}<span class="badge bg-secondary-subtle text-body-secondary font-monospace" style="font-size: 0.72rem;">{{ comm.subject_code }}</span>{% endif %}
<span class="badge bg-primary-subtle text-primary border" style="font-size: 0.72rem;">
<i class="bi bi-mortarboard me-1"></i>{{ comm.career_name }}
</span>
</div>
</td>
<td>
<span class="badge bg-primary-subtle text-primary border font-monospace">
@@ -900,6 +1052,10 @@
</tbody>
</table>
</div>
<div class="comm-no-match-alert text-center py-4" style="display: none;">
<i class="bi bi-funnel text-muted fs-2 d-block mb-2"></i>
<span class="text-muted small">No hay comisiones para la carrera seleccionada.</span>
</div>
{% else %}
<div class="text-center py-4">
<i class="bi bi-info-circle text-muted fs-1 d-block mb-2"></i>
@@ -908,6 +1064,19 @@
{% endif %}
</div>
</div>
<!-- Barra de Paginación para Comisiones -->
<div class="card-footer bg-body-tertiary py-2 px-3 border-top" id="commPaginationContainer" style="display: none;">
<div class="d-flex justify-content-between align-items-center flex-wrap gap-2">
<div class="small text-muted font-monospace" id="commPaginationSummary">
Mostrando <strong id="commPageStart">1</strong>-<strong id="commPageEnd">10</strong> de <strong id="commPageTotal">0</strong> comisiones
</div>
<div class="d-flex align-items-center gap-2">
<ul class="pagination pagination-sm mb-0" id="commPaginationNav">
</ul>
</div>
</div>
</div>
</div>
<!-- ========================= Panel: Aulas (Asignadas vs Libres / Sin Asignar) ========================= -->