All checks were successful
Build and Push Docker Image / build (push) Successful in 8m55s
- Restructure dashboard: score distribution + recently reviewed stacked in left column, full-width map at bottom, activity feed in middle row - Show all jurors in scrollable workload list (not just top 5) - Filter recently reviewed to exclude rejected/not-reviewed projects - Filter transition audit logs from activity feed - Remove completion progress bar from stat tile for equal card heights - Fix all Tremor charts: switch hex colors to named palette (cyan/teal/emerald/amber/rose) to fix black bar rendering - Fix transparent chart tooltips with global CSS overrides - Remove tilted text labels from cross-round comparison charts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
51 lines
1.2 KiB
TypeScript
51 lines
1.2 KiB
TypeScript
'use client'
|
|
|
|
import { DonutChart } from '@tremor/react'
|
|
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
|
import { formatStatus, getStatusColor } from './chart-theme'
|
|
|
|
interface StatusDataPoint {
|
|
status: string
|
|
count: number
|
|
}
|
|
|
|
interface StatusBreakdownProps {
|
|
data: StatusDataPoint[]
|
|
}
|
|
|
|
export function StatusBreakdownChart({ data }: StatusBreakdownProps) {
|
|
if (!data?.length) return null
|
|
|
|
const total = data.reduce((sum, item) => sum + item.count, 0)
|
|
|
|
const chartData = data.map((d) => ({
|
|
name: formatStatus(d.status),
|
|
value: d.count,
|
|
}))
|
|
|
|
const colors = data.map((d) => getStatusColor(d.status))
|
|
|
|
return (
|
|
<Card>
|
|
<CardHeader>
|
|
<CardTitle className="flex items-center justify-between">
|
|
<span>Project Status Distribution</span>
|
|
<span className="text-sm font-normal text-muted-foreground">
|
|
{total} projects
|
|
</span>
|
|
</CardTitle>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<DonutChart
|
|
data={chartData}
|
|
category="value"
|
|
index="name"
|
|
colors={colors}
|
|
showLabel={true}
|
|
className="h-[300px]"
|
|
/>
|
|
</CardContent>
|
|
</Card>
|
|
)
|
|
}
|