feat(dashboard): add tomorrow filter to period switchers and schedule view v3.4.4

This commit is contained in:
2026-10-07 23:13:16 -03:00
parent 22c545e2df
commit f95711d77b
15 changed files with 625 additions and 27 deletions
+7 -5
View File
@@ -172,8 +172,10 @@ document.querySelectorAll('[data-color]').forEach(function(el) {
// Bedelía: Switcher para Cartelera y Agenda de Clases
function switchBedeliaScheduleView(view) {
const todayEl = document.getElementById('bedeliaScheduleToday');
const tomorrowEl = document.getElementById('bedeliaScheduleTomorrow');
const weekEl = document.getElementById('bedeliaScheduleWeek');
if (todayEl) todayEl.style.display = view === 'today' ? 'block' : 'none';
if (tomorrowEl) tomorrowEl.style.display = view === 'tomorrow' ? 'block' : 'none';
if (weekEl) weekEl.style.display = view === 'week' ? 'block' : 'none';
document.querySelectorAll('#bedeliaScheduleSwitcher button').forEach(function(btn) {
btn.classList.toggle('active', btn.getAttribute('data-view') === view);
@@ -197,7 +199,7 @@ let currentCommStatus = 'unassigned';
let currentClassPeriod = 'today';
let currentClassStatus = 'unassigned';
// Bedelía: Switcher de Percentiles de Aulas (Día / Semana / Mes)
// Bedelía: Switcher de Percentiles de Aulas (Día / Mañana / Semana / Mes)
function switchBedeliaPercentiles(period) {
if (!FILTER_STATS_DATA || !FILTER_STATS_DATA[period]) return;
const periodData = FILTER_STATS_DATA[period];
@@ -208,7 +210,7 @@ function switchBedeliaPercentiles(period) {
const periodTitle = document.getElementById('bedeliaPctPeriodTitle');
if (periodTitle) {
periodTitle.innerText = period === 'today' ? 'Día (Hoy)' : (period === 'week' ? 'Semana' : 'Mes');
periodTitle.innerText = period === 'today' ? 'Día (Hoy)' : (period === 'tomorrow' ? 'Mañana' : (period === 'week' ? 'Semana' : 'Mes'));
}
const assignedCount = document.getElementById('bedeliaPctAssignedCount');
@@ -222,7 +224,7 @@ function switchBedeliaPercentiles(period) {
if (unassignedCount) unassignedCount.innerText = classData.unassigned_count ?? 0;
if (unassignedPct) unassignedPct.innerText = (classData.unassigned_pct ?? 0) + '%';
if (assignedLabel) {
assignedLabel.innerText = period === 'today' ? 'Con cursada activa hoy' : (period === 'week' ? 'Con cursada activa esta semana' : 'Con cursada activa este mes');
assignedLabel.innerText = period === 'today' ? 'Con cursada activa hoy' : (period === 'tomorrow' ? 'Con cursada activa mañana' : (period === 'week' ? 'Con cursada activa esta semana' : 'Con cursada activa este mes'));
}
// Actualizar leyendas y barras
@@ -254,7 +256,7 @@ function switchBedeliaPercentiles(period) {
});
}
// Admin: Switcher de Percentiles de Aulas (Día / Semana / Mes)
// Admin: Switcher de Percentiles de Aulas (Día / Mañana / Semana / Mes)
function switchAdminPercentiles(period) {
if (!FILTER_STATS_DATA || !FILTER_STATS_DATA[period]) return;
const periodData = FILTER_STATS_DATA[period];
@@ -265,7 +267,7 @@ function switchAdminPercentiles(period) {
const periodTitle = document.getElementById('adminPctPeriodTitle');
if (periodTitle) {
periodTitle.innerText = period === 'today' ? 'Día (Hoy)' : (period === 'week' ? 'Semana' : 'Mes');
periodTitle.innerText = period === 'today' ? 'Día (Hoy)' : (period === 'tomorrow' ? 'Mañana' : (period === 'week' ? 'Semana' : 'Mes'));
}
const assignedCount = document.getElementById('adminPctAssignedCount');