fix(dashboard): total_companies returns 1 in single-company scope; KPI labels adapt
This commit is contained in:
@@ -45,15 +45,15 @@ export default function InvestorDashboardPage() {
|
||||
|
||||
const kpis = [
|
||||
{
|
||||
label: "被投企业",
|
||||
value: summary?.total_companies ?? 0,
|
||||
label: companyName ? "当前企业" : "被投企业",
|
||||
value: companyName ?? (summary?.total_companies ?? 0),
|
||||
icon: Building2,
|
||||
href: "/companies",
|
||||
color: "text-[var(--investor-primary)]",
|
||||
bg: "bg-[var(--investor-primary)]/10",
|
||||
},
|
||||
{
|
||||
label: "平均健康度",
|
||||
label: "健康度",
|
||||
value: summary?.avg_health_score?.toFixed(1) ?? "0.0",
|
||||
icon: Heart,
|
||||
href: "/companies",
|
||||
|
||||
Reference in New Issue
Block a user