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:
18
admin-compliance/app/sdk/training/_components/KPICard.tsx
Normal file
18
admin-compliance/app/sdk/training/_components/KPICard.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user