feat: remove Administration workspace — keep only Verwaltung + Suche
- Delete all ops page components (ReviewQueue, AIMonitoring, Governance, SourceMonitoring, ActivityTimeline, SignalPipeline) - Remove OPERATIONS workspace from AppShell config, nav order, path detection - Remove all /ops/* routes from App.tsx - Remove WorkspaceType.OPERATIONS from allowedWorkspaces in authService, sessionStore, permissions - Keep MarketIntelligence page (already moved to /supply/market-intelligence) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import { Chip } from '@mui/material'
|
||||
import { CheckCircle2, AlertTriangle, XCircle } from 'lucide-react'
|
||||
import type { DataQualityLevel } from '../../domain/enums'
|
||||
import { DS_COLORS, scoreToDataQualityLevel } from '../../lib/ds'
|
||||
import { DATA_QUALITY_LABELS } from '../../lib/constants'
|
||||
|
||||
interface DataQualityBadgeProps {
|
||||
level?: DataQualityLevel
|
||||
score?: number
|
||||
showScore?: boolean
|
||||
size?: 'small' | 'medium'
|
||||
}
|
||||
|
||||
const ICONS: Record<DataQualityLevel, React.ElementType> = {
|
||||
HIGH: CheckCircle2,
|
||||
MEDIUM: AlertTriangle,
|
||||
LOW: XCircle,
|
||||
INCOMPLETE: XCircle,
|
||||
}
|
||||
|
||||
export function DataQualityBadge({ level, score, showScore = false, size = 'small' }: DataQualityBadgeProps) {
|
||||
const resolved: DataQualityLevel =
|
||||
level ?? (score !== undefined ? scoreToDataQualityLevel(score) : 'LOW')
|
||||
const { bg, fg } = DS_COLORS.dataQuality[resolved]
|
||||
const Icon = ICONS[resolved]
|
||||
const scoreLabel = showScore && score !== undefined ? ` ${Math.round(score * 100)}%` : ''
|
||||
const label = `${DATA_QUALITY_LABELS[resolved] ?? resolved}${scoreLabel}`
|
||||
return (
|
||||
<Chip
|
||||
size={size}
|
||||
label={label}
|
||||
icon={<Icon size={11} color={fg} />}
|
||||
aria-label={`Datenqualität: ${label}`}
|
||||
sx={{
|
||||
bgcolor: bg,
|
||||
color: fg,
|
||||
border: 'none',
|
||||
fontWeight: 600,
|
||||
fontSize: '0.7rem',
|
||||
'& .MuiChip-icon': { ml: 0.5 },
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user