fix(dashboard): expose filter_stats and tomorrow fallback in api and bff

This commit is contained in:
2026-10-07 23:20:48 -03:00
parent f95711d77b
commit f2d0179154
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -573,6 +573,8 @@ def get_stats():
'week_schedule_list': week_schedule_list,
'upcoming_reservations': upcoming_reservations,
'milestones': milestones,
'filter_stats': filter_stats if 'filter_stats' in locals() else {},
'date_labels': date_labels if 'date_labels' in locals() else {},
'ui': {
'show_role_banner': SystemSetting.get_value('dashboard_role_banner_enabled', 'true') in ['true', 'True', '1', True]
},
+2
View File
@@ -74,10 +74,12 @@ router.get('/', async (req, res) => {
const filter_stats = apiData.filter_stats || backendStats.filter_stats || bedeliaData.filter_stats || {
date_labels: {
today: 'Hoy',
tomorrow: 'Mañana',
week: 'Esta Semana',
month: 'Este Mes'
},
today: { label: 'Hoy', classrooms: { assigned: [], unassigned: [], assigned_count: 0, unassigned_count: 0, assigned_pct: 0, unassigned_pct: 0, total: 0 }, commissions: { assigned: [], unassigned: [], assigned_count: 0, unassigned_count: 0, assigned_pct: 0, unassigned_pct: 0, total: 0 } },
tomorrow: { label: 'Mañana', classrooms: { assigned: [], unassigned: [], assigned_count: 0, unassigned_count: 0, assigned_pct: 0, unassigned_pct: 0, total: 0 }, commissions: { assigned: [], unassigned: [], assigned_count: 0, unassigned_count: 0, assigned_pct: 0, unassigned_pct: 0, total: 0 } },
week: { label: 'Esta Semana', classrooms: { assigned: [], unassigned: [], assigned_count: 0, unassigned_count: 0, assigned_pct: 0, unassigned_pct: 0, total: 0 }, commissions: { assigned: [], unassigned: [], assigned_count: 0, unassigned_count: 0, assigned_pct: 0, unassigned_pct: 0, total: 0 } },
month: { label: 'Este Mes', classrooms: { assigned: [], unassigned: [], assigned_count: 0, unassigned_count: 0, assigned_pct: 0, unassigned_pct: 0, total: 0 }, commissions: { assigned: [], unassigned: [], assigned_count: 0, unassigned_count: 0, assigned_pct: 0, unassigned_pct: 0, total: 0 } }
};