feat(dashboard): add total-spent KPI alongside deployed value
CI / Lint · Typecheck · Test · Build (push) Successful in 48s
CI / Playwright (smoke) (push) Has been skipped
CI / Build & push images (push) Successful in 1m12s

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-17 16:27:27 -04:00
parent 52e092502b
commit 22ce6d18ee
+7 -3
View File
@@ -104,7 +104,7 @@ export default function Dashboard() {
{data && ( {data && (
<> <>
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-5"> <div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6">
<KpiCard <KpiCard
icon={<Package className="h-4 w-4" />} icon={<Package className="h-4 w-4" />}
label="Total parts" label="Total parts"
@@ -124,6 +124,10 @@ export default function Dashboard() {
.reduce((sum, s) => sum + s.totalPrice, 0), .reduce((sum, s) => sum + s.totalPrice, 0),
)} )}
/> />
<KpiCard
label="Total spent"
value={currency(data.byState.reduce((sum, s) => sum + s.totalPrice, 0))}
/>
<KpiCard <KpiCard
label="Past-EOL deployments" label="Past-EOL deployments"
value={data.deployedPastEol value={data.deployedPastEol
@@ -509,8 +513,8 @@ function EolBanner({
function DashboardSkeleton() { function DashboardSkeleton() {
return ( return (
<div className="space-y-4"> <div className="space-y-4">
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-5"> <div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6">
{Array.from({ length: 5 }).map((_, i) => ( {Array.from({ length: 6 }).map((_, i) => (
<Skeleton key={i} className="h-20" /> <Skeleton key={i} className="h-20" />
))} ))}
</div> </div>