1d0cb8b154
New components: DataQualityBadge, DataQualityPanel, DataQualityProgress, FreshnessIndicator, CriticalFieldWarning, MissingDataList, ProvenancePanel Service: calculatePropertyQuality, getMissingCriticalFields, getQualityWarnings, getRecommendedActions with field→action mapping PropertyDetailView: tab 5/6 now use DataQualityPanel + ProvenancePanel Datenpflege page: DataQualityBadge, FreshnessIndicator, filter by level, recommended action column showing highest-priority next step per property Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { Alert, Box, Chip, Typography } from '@mui/material'
|
|
|
|
interface CriticalFieldWarningProps {
|
|
fields: string[]
|
|
warnings?: string[]
|
|
}
|
|
|
|
export function CriticalFieldWarning({ fields, warnings = [] }: CriticalFieldWarningProps) {
|
|
if (fields.length === 0 && warnings.length === 0) return null
|
|
|
|
return (
|
|
<Box sx={{ mb: 2 }}>
|
|
{fields.length > 0 && (
|
|
<Alert severity="error" sx={{ mb: 1, py: 0.5, px: 1.5 }}>
|
|
<Typography variant="caption" sx={{ fontWeight: 600, display: 'block', mb: 0.5 }}>
|
|
{fields.length} Pflichtfeld{fields.length > 1 ? 'er' : ''} fehlen — Match-Qualität reduziert
|
|
</Typography>
|
|
<Box sx={{ display: 'flex', flexWrap: 'wrap', gap: 0.5 }}>
|
|
{fields.map(f => (
|
|
<Chip key={f} label={f} size="small" color="error" variant="outlined"
|
|
sx={{ height: 18, fontSize: '0.65rem' }} />
|
|
))}
|
|
</Box>
|
|
</Alert>
|
|
)}
|
|
{warnings.map((w, i) => (
|
|
<Alert key={i} severity="warning" sx={{ mb: 0.5, py: 0.25, px: 1.5, fontSize: '0.8125rem' }}>
|
|
{w}
|
|
</Alert>
|
|
))}
|
|
</Box>
|
|
)
|
|
}
|