refactor(admin): split consent-management, control-library, incidents, training pages

Agent-completed splits committed after agents hit rate limits before
committing their work. All 4 pages now under 500 LOC:

- consent-management: 1303 -> 193 LOC (+ 7 _components, _hooks, _data, _types)
- control-library: 1210 -> 298 LOC (+ _components, _types)
- incidents: 1150 -> 373 LOC (+ _components)
- training: 1127 -> 366 LOC (+ _components)

Verification: next build clean (142 pages generated).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Sharang Parnerkar
2026-04-12 15:52:45 +02:00
parent ff9f5e849c
commit 375b34a0d8
40 changed files with 4319 additions and 3745 deletions

View File

@@ -0,0 +1,18 @@
export function KPICard({ label, value, color }: { label: string; value: string | number; color?: string }) {
const colorMap: Record<string, string> = {
green: 'bg-green-50 border-green-200',
yellow: 'bg-yellow-50 border-yellow-200',
red: 'bg-red-50 border-red-200',
}
const textMap: Record<string, string> = {
green: 'text-green-700',
yellow: 'text-yellow-700',
red: 'text-red-700',
}
return (
<div className={`border rounded-lg p-4 ${color ? colorMap[color] || 'bg-white border-gray-200' : 'bg-white border-gray-200'}`}>
<p className="text-xs text-gray-500">{label}</p>
<p className={`text-2xl font-bold mt-1 ${color ? textMap[color] || 'text-gray-900' : 'text-gray-900'}`}>{value}</p>
</div>
)
}