fix(dashboard): expose filter_stats and tomorrow fallback in api and bff
This commit is contained in:
@@ -573,6 +573,8 @@ def get_stats():
|
|||||||
'week_schedule_list': week_schedule_list,
|
'week_schedule_list': week_schedule_list,
|
||||||
'upcoming_reservations': upcoming_reservations,
|
'upcoming_reservations': upcoming_reservations,
|
||||||
'milestones': milestones,
|
'milestones': milestones,
|
||||||
|
'filter_stats': filter_stats if 'filter_stats' in locals() else {},
|
||||||
|
'date_labels': date_labels if 'date_labels' in locals() else {},
|
||||||
'ui': {
|
'ui': {
|
||||||
'show_role_banner': SystemSetting.get_value('dashboard_role_banner_enabled', 'true') in ['true', 'True', '1', True]
|
'show_role_banner': SystemSetting.get_value('dashboard_role_banner_enabled', 'true') in ['true', 'True', '1', True]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -74,10 +74,12 @@ router.get('/', async (req, res) => {
|
|||||||
const filter_stats = apiData.filter_stats || backendStats.filter_stats || bedeliaData.filter_stats || {
|
const filter_stats = apiData.filter_stats || backendStats.filter_stats || bedeliaData.filter_stats || {
|
||||||
date_labels: {
|
date_labels: {
|
||||||
today: 'Hoy',
|
today: 'Hoy',
|
||||||
|
tomorrow: 'Mañana',
|
||||||
week: 'Esta Semana',
|
week: 'Esta Semana',
|
||||||
month: 'Este Mes'
|
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 } },
|
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 } },
|
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 } }
|
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 } }
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user