feat: Dashboard 合同卡片显示有效合同数 + 总合同数

This commit is contained in:
selfrelease
2026-07-29 12:31:09 +08:00
parent 9dbd5b4c87
commit e4a60a985e
2 changed files with 14 additions and 2 deletions
@@ -11,6 +11,7 @@ interface DashboardData {
totalUsers: number
totalEmployees: number
totalContracts: number
activeContracts: number
totalPayslips: number
orgsByPlan: { plan: string; count: number }[]
recentOrgs: {
@@ -38,7 +39,7 @@ export default function PlatformDashboard() {
{ label: '企业总数', value: data.totalOrgs, icon: Building2, color: 'text-primary' },
{ label: '用户总数', value: data.totalUsers, icon: Users, color: 'text-blue-600' },
{ label: '员工总数', value: data.totalEmployees, icon: Users, color: 'text-emerald-600' },
{ label: '合同总数', value: data.totalContracts, icon: FileText, color: 'text-purple-600' },
{ label: '有效合同', value: data.activeContracts, sub: `${data.totalContracts}`, icon: FileText, color: 'text-purple-600' },
{ label: '工资条总数', value: data.totalPayslips, icon: Calculator, color: 'text-rose-600' },
]
@@ -60,6 +61,7 @@ export default function PlatformDashboard() {
<Icon className={`w-5 h-5 ${s.color}`} />
</div>
<div className="text-2xl font-bold text-gray-900">{s.value.toLocaleString()}</div>
{(s as any).sub && <div className="text-xs text-gray-400 mt-0.5">{(s as any).sub}</div>}
</div>
)
})}