8f1db31683
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>
16 lines
686 B
TypeScript
16 lines
686 B
TypeScript
import { GenericBadge } from '../shared/GenericBadge'
|
|
import type { ReviewStatus } from '../../domain/enums'
|
|
|
|
const CONFIG: Record<ReviewStatus, { label: string; color: string }> = {
|
|
UNREVIEWED: { label: 'Ungeprüft', color: '#94a3b8' },
|
|
IN_REVIEW: { label: 'In Prüfung', color: '#d97706' },
|
|
APPROVED: { label: 'Genehmigt', color: '#1a7a4a' },
|
|
REJECTED: { label: 'Abgelehnt', color: '#c0392b' },
|
|
FLAGGED: { label: 'Markiert', color: '#ea580c' },
|
|
}
|
|
|
|
export function AIOutputStatusBadge({ status }: { status: ReviewStatus }) {
|
|
const { label, color } = CONFIG[status] ?? { label: status, color: '#64748b' }
|
|
return <GenericBadge label={label} color={color} />
|
|
}
|