Website (14 monoliths split): - compliance/page.tsx (1,519 → 9), docs/audit (1,262 → 20) - quality (1,231 → 16), alerts (1,203 → 10), docs (1,202 → 11) - i18n.ts (1,173 → 8 language files) - unity-bridge (1,094 → 12), backlog (1,087 → 6) - training (1,066 → 8), rag (1,063 → 8) - Deleted index_original.ts (4,899 LOC dead backup) Studio-v2 (5 monoliths split): - meet/page.tsx (1,481 → 9), messages (1,166 → 9) - AlertsB2BContext.tsx (1,165 → 5 modules) - alerts-b2b/page.tsx (1,019 → 6), korrektur/archiv (1,001 → 6) All existing imports preserved. Zero new TypeScript errors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
63 lines
2.5 KiB
TypeScript
63 lines
2.5 KiB
TypeScript
'use client'
|
|
|
|
import type { DatasetStats } from './types'
|
|
|
|
export function DatasetOverview({ stats }: { stats: DatasetStats }) {
|
|
const maxBundesland = Math.max(...Object.values(stats.by_bundesland))
|
|
|
|
return (
|
|
<div className="bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-700 p-6">
|
|
<h3 className="text-lg font-semibold text-gray-900 dark:text-white mb-4">
|
|
Datensatz-Übersicht
|
|
</h3>
|
|
|
|
{/* Stats Grid */}
|
|
<div className="grid grid-cols-3 gap-4 mb-6">
|
|
<div className="text-center p-4 bg-blue-50 dark:bg-blue-900/20 rounded-xl">
|
|
<p className="text-3xl font-bold text-blue-600 dark:text-blue-400">
|
|
{stats.total_documents.toLocaleString()}
|
|
</p>
|
|
<p className="text-sm text-gray-600 dark:text-gray-400">Dokumente</p>
|
|
</div>
|
|
<div className="text-center p-4 bg-emerald-50 dark:bg-emerald-900/20 rounded-xl">
|
|
<p className="text-3xl font-bold text-emerald-600 dark:text-emerald-400">
|
|
{stats.total_chunks.toLocaleString()}
|
|
</p>
|
|
<p className="text-sm text-gray-600 dark:text-gray-400">Chunks</p>
|
|
</div>
|
|
<div className="text-center p-4 bg-purple-50 dark:bg-purple-900/20 rounded-xl">
|
|
<p className="text-3xl font-bold text-purple-600 dark:text-purple-400">
|
|
{stats.training_allowed.toLocaleString()}
|
|
</p>
|
|
<p className="text-sm text-gray-600 dark:text-gray-400">Training erlaubt</p>
|
|
</div>
|
|
</div>
|
|
|
|
{/* Bundesland Distribution */}
|
|
<h4 className="text-sm font-medium text-gray-700 dark:text-gray-300 mb-3">
|
|
Verteilung nach Bundesland
|
|
</h4>
|
|
<div className="space-y-2">
|
|
{Object.entries(stats.by_bundesland)
|
|
.sort((a, b) => b[1] - a[1])
|
|
.map(([code, count]) => (
|
|
<div key={code} className="flex items-center gap-3">
|
|
<span className="w-8 text-xs font-medium text-gray-600 dark:text-gray-400 uppercase">
|
|
{code}
|
|
</span>
|
|
<div className="flex-1 h-4 bg-gray-100 dark:bg-gray-700 rounded-full overflow-hidden">
|
|
<div
|
|
className="h-full bg-gradient-to-r from-blue-500 to-blue-600 rounded-full"
|
|
style={{ width: `${(count / maxBundesland) * 100}%` }}
|
|
/>
|
|
</div>
|
|
<span className="w-10 text-sm text-right text-gray-600 dark:text-gray-400">
|
|
{count}
|
|
</span>
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|