feat: complete workbench split admin routes
This commit is contained in:
@@ -417,6 +417,23 @@ func monthlyReportPayload(report store.MonthlyReport) map[string]any {
|
||||
return data
|
||||
}
|
||||
|
||||
func reportStatsPayload(stats *store.ReportStats) map[string]any {
|
||||
if stats == nil {
|
||||
return map[string]any{
|
||||
"expected_count": 0,
|
||||
"submitted_count": 0,
|
||||
"missing_count": 0,
|
||||
"scope": map[string]any{"department_id": ""},
|
||||
}
|
||||
}
|
||||
return map[string]any{
|
||||
"expected_count": stats.ExpectedCount,
|
||||
"submitted_count": stats.SubmittedCount,
|
||||
"missing_count": stats.MissingCount,
|
||||
"scope": map[string]any{"department_id": stats.DepartmentID},
|
||||
}
|
||||
}
|
||||
|
||||
func mailboxConfigPayload(config store.MailboxConfig) map[string]any {
|
||||
return map[string]any{
|
||||
"enabled": config.Enabled,
|
||||
|
||||
Reference in New Issue
Block a user