refactor: simplify KPI to 4 metrics and update CLAUDE.md (#83)

KPI page: removed operational grid (Intäktstillväxt, Kostnadsandel,
Snittbetaltid — all usually empty or redundant). Now shows 4 cards
(Resultat, Kassa, Kundfordringar, Moms) + trend chart. Removed unused
fields from KPIReport type and simplified API route.

CLAUDE.md: documented MCP server extension, API key infrastructure,
OAuth 2.1 flow, gnubok-mcp npm package, KPI page, cookieless Supabase
client, and updated migration count (65 → 70).

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jakob Wennberg
2026-03-22 12:59:53 +01:00
committed by GitHub
co-authored by Claude Opus 4.6
parent 8cce21983f
commit 6b51d13ba7
6 changed files with 50 additions and 182 deletions
-12
View File
@@ -4,7 +4,6 @@ import { useState, useEffect } from 'react'
import { Label } from '@/components/ui/label'
import { Card, CardContent } from '@/components/ui/card'
import { KPIHeroCards } from '@/components/kpi/KPIHeroCards'
import { KPIOperationalGrid } from '@/components/kpi/KPIOperationalGrid'
import { KPITrendChart } from '@/components/kpi/KPITrendChart'
import type { FiscalPeriod, KPIReport } from '@/types'
@@ -108,7 +107,6 @@ export default function KpiPage() {
{!isLoadingReport && !error && report && (
<>
<KPIHeroCards report={report} />
<KPIOperationalGrid report={report} />
{report.months.length > 0 && <KPITrendChart months={report.months} />}
</>
)}
@@ -138,16 +136,6 @@ function LoadingSkeleton() {
</Card>
))}
</div>
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
{[1, 2, 3, 4].map((i) => (
<Card key={i}>
<CardContent className="p-5 space-y-2">
<div className="h-3 bg-muted rounded w-24 animate-pulse" />
<div className="h-6 bg-muted rounded w-20 animate-pulse" />
</CardContent>
</Card>
))}
</div>
<Card>
<CardContent className="p-5 space-y-3">
<div className="h-4 bg-muted rounded w-40 animate-pulse" />