feat: add admin dashboard data adapter

This commit is contained in:
Codex
2026-09-13 21:44:58 +08:00
parent 9279359678
commit fbafe693b6
3 changed files with 256 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
export type DashboardTone = 'rose' | 'amber' | 'blue' | 'green' | 'purple' | 'red'
export interface DashboardMetric {
key: string
label: string
value: number
trendText: string
tone: DashboardTone
available: boolean
route: string
}
export interface DashboardTodo {
key: string
title: string
description: string
count: number
actionText: string
route: string
tone: DashboardTone
available: boolean
}
export interface DashboardActivity {
id: string
title: string
coverUrl: string
startAt: string
locationName: string
registered: number | null
capacity: number | null
statusText: string
}
export interface DashboardOverviewItem {
key: string
label: string
value: number
compareText: string
tone: DashboardTone
available: boolean
}
export interface DashboardEffectivenessItem {
key: string
label: string
value: number
max: number
unit: string
available: boolean
}
export interface DashboardModel {
metrics: DashboardMetric[]
todos: DashboardTodo[]
activities: DashboardActivity[]
serviceOverview: DashboardOverviewItem[]
effectiveness: DashboardEffectivenessItem[]
activitiesAvailable: boolean
notice: string
}