refactor: GenericBadge + Provider-Isolation

Teil A — GenericBadge:
- Neue src/components/shared/GenericBadge.tsx mit zwei Varianten:
  transparent (${color}18 Hintergrund, farbiger Text, opt. Border)
  solid (gefüllte Farbe, weisser Text)
- Props: label, color, variant, showBorder, bold, icon, size, tooltip, ariaLabel
- 7 Badges auf GenericBadge refactored (Config-Objekt + 1-Zeiler):
  ReviewStatusBadge, ReviewPriorityBadge, ReviewEntityTypeBadge,
  AIOutputStatusBadge, AIErrorBadge, MatchStatusBadge, ShortlistStatusBadge
- Barrel-Export in src/components/shared/index.ts

Teil B — Provider-Isolation:
- src/mock-data/propertyStore.ts als neutrales Daten-Modul erstellt
- MockupPropertyProvider: importiert aus mock-data statt selbst zu definieren
- MockupUnitProvider: importiert aus mock-data statt aus MockupPropertyProvider
- matchSyncService: importiert aus mock-data statt aus MockupPropertyProvider
- Kein Provider importiert mehr einen anderen Provider

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Sutter
2026-05-24 13:13:34 +02:00
parent 7f090a48ff
commit 8f1db31683
13 changed files with 111 additions and 107 deletions
@@ -1,4 +1,4 @@
import { Chip } from '@mui/material'
import { GenericBadge } from '../shared/GenericBadge'
import type { MatchStatus } from '../../domain/enums'
const STATUS_META: Record<string, { label: string; color: string }> = {
@@ -10,9 +10,6 @@ const STATUS_META: Record<string, { label: string; color: string }> = {
export function MatchStatusBadge({ status }: { status?: MatchStatus }) {
if (!status) return null
const meta = STATUS_META[status] ?? { label: status, color: '#64748b' }
return (
<Chip label={meta.label} size="small"
sx={{ bgcolor: meta.color, color: 'white', fontWeight: 600, fontSize: 11 }} />
)
const { label, color } = STATUS_META[status] ?? { label: status, color: '#64748b' }
return <GenericBadge label={label} color={color} variant="solid" />
}