feat: complete workbench split admin routes

This commit is contained in:
richjohnrambo
2026-09-17 23:37:16 +08:00
parent 7099a33cde
commit 5c805c7b09
6 changed files with 334 additions and 26 deletions
+17
View File
@@ -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,