[split-required] Split website + studio-v2 monoliths (Phase 3 continued)

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>
This commit is contained in:
Benjamin Admin
2026-04-24 17:52:36 +02:00
parent b681ddb131
commit 0b37c5e692
143 changed files with 15822 additions and 15889 deletions

View File

@@ -0,0 +1,79 @@
import { TrendData } from '../types'
export function TrendChart({ data }: { data: TrendData }) {
if (!data || data.dates.length === 0) {
return (
<div className="h-48 flex items-center justify-center text-slate-400">
Keine Trend-Daten verfuegbar
</div>
)
}
const maxScore = Math.max(...data.scores, 5)
const minScore = Math.min(...data.scores, 0)
const range = maxScore - minScore || 1
return (
<div className="h-48 relative">
{/* Y-Axis Labels */}
<div className="absolute left-0 top-0 bottom-4 w-8 flex flex-col justify-between text-xs text-slate-400">
<span>{maxScore.toFixed(1)}</span>
<span>{((maxScore + minScore) / 2).toFixed(1)}</span>
<span>{minScore.toFixed(1)}</span>
</div>
{/* Chart Area */}
<div className="ml-10 h-full pr-4">
<svg className="w-full h-full" viewBox="0 0 100 100" preserveAspectRatio="none">
{/* Grid Lines */}
<line x1="0" y1="0" x2="100" y2="0" stroke="#e2e8f0" strokeWidth="0.5" />
<line x1="0" y1="50" x2="100" y2="50" stroke="#e2e8f0" strokeWidth="0.5" />
<line x1="0" y1="100" x2="100" y2="100" stroke="#e2e8f0" strokeWidth="0.5" />
{/* Line Chart */}
<polyline
fill="none"
stroke="#0ea5e9"
strokeWidth="2"
points={data.scores
.map((score, i) => {
const x = (i / (data.scores.length - 1 || 1)) * 100
const y = 100 - ((score - minScore) / range) * 100
return `${x},${y}`
})
.join(' ')}
/>
{/* Data Points */}
{data.scores.map((score, i) => {
const x = (i / (data.scores.length - 1 || 1)) * 100
const y = 100 - ((score - minScore) / range) * 100
return <circle key={i} cx={x} cy={y} r="2" fill="#0ea5e9" />
})}
</svg>
</div>
{/* X-Axis Labels */}
<div className="ml-10 flex justify-between text-xs text-slate-400 mt-1">
{data.dates.slice(0, 5).map((date, i) => (
<span key={i}>{new Date(date).toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit' })}</span>
))}
</div>
{/* Trend Indicator */}
<div className="absolute top-2 right-2">
<span
className={`px-2 py-1 rounded text-xs font-medium ${
data.trend === 'improving'
? 'bg-emerald-100 text-emerald-700'
: data.trend === 'declining'
? 'bg-red-100 text-red-700'
: 'bg-slate-100 text-slate-700'
}`}
>
{data.trend === 'improving' ? 'Verbessernd' : data.trend === 'declining' ? 'Verschlechternd' : 'Stabil'}
</span>
</div>
</div>
)
}