fix: resolve all MUI v9 TypeScript build errors

- Move system props (fontWeight, lineHeight, display, alignItems, etc.) into sx
- Fix Lucide icon color prop (no sx support)
- Merge duplicate sx attributes
- Remove unused variables (location, _needId, v)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Sutter
2026-05-15 10:37:07 +02:00
parent 67e4baf860
commit e20e0e9a2e
12 changed files with 164 additions and 183 deletions
+18 -20
View File
@@ -76,7 +76,7 @@ export default function DataQuality() {
<Box>
{/* Page Header */}
<Box sx={{ bgcolor: 'white', borderBottom: '1px solid', borderColor: 'divider', px: 3, py: 2 }}>
<Typography variant="h5" fontWeight={700} color="text.primary">Datenqualität</Typography>
<Typography variant="h5" sx={{ fontWeight: 700 }} color="text.primary">Datenqualität</Typography>
<Typography variant="body2" color="text.secondary">Vollständigkeit und Aktualität der Objektdaten</Typography>
</Box>
@@ -87,8 +87,8 @@ export default function DataQuality() {
<Box className="grid grid-cols-3 gap-4">
{/* Avg Quality Score */}
<Card sx={{ elevation: 1, p: 2.5 }}>
<Typography variant="overline" color="text.secondary" display="block">Ø Qualitätsscore</Typography>
<Typography variant="h4" fontWeight={700} sx={{ color: avgScore >= 0.8 ? '#1a7a4a' : avgScore >= 0.6 ? '#d97706' : '#c0392b' }}>
<Typography variant="overline" color="text.secondary" sx={{ display: 'block' }}>Ø Qualitätsscore</Typography>
<Typography variant="h4" sx={{ fontWeight: 700, color: avgScore >= 0.8 ? '#1a7a4a' : avgScore >= 0.6 ? '#d97706' : '#c0392b' }}>
{Math.round(avgScore * 100)}%
</Typography>
<Box sx={{ mt: 1 }}>
@@ -103,11 +103,10 @@ export default function DataQuality() {
{/* Critical Issues */}
<Card sx={{ elevation: 1, p: 2.5 }}>
<Typography variant="overline" color="text.secondary" display="block">Kritische Felder fehlen</Typography>
<Typography variant="overline" color="text.secondary" sx={{ display: 'block' }}>Kritische Felder fehlen</Typography>
<Typography
variant="h4"
fontWeight={700}
sx={{ color: criticalIssues.length > 2 ? '#c0392b' : criticalIssues.length > 0 ? '#d97706' : '#1a7a4a' }}
sx={{ fontWeight: 700, color: criticalIssues.length > 2 ? '#c0392b' : criticalIssues.length > 0 ? '#d97706' : '#1a7a4a' }}
>
{criticalIssues.length}
</Typography>
@@ -118,11 +117,10 @@ export default function DataQuality() {
{/* Stale Data */}
<Card sx={{ elevation: 1, p: 2.5 }}>
<Typography variant="overline" color="text.secondary" display="block">Veraltete Daten</Typography>
<Typography variant="overline" color="text.secondary" sx={{ display: 'block' }}>Veraltete Daten</Typography>
<Typography
variant="h4"
fontWeight={700}
sx={{ color: staleData.length > 2 ? '#c0392b' : staleData.length > 0 ? '#d97706' : '#1a7a4a' }}
sx={{ fontWeight: 700, color: staleData.length > 2 ? '#c0392b' : staleData.length > 0 ? '#d97706' : '#1a7a4a' }}
>
{staleData.length}
</Typography>
@@ -196,13 +194,13 @@ export default function DataQuality() {
<Table size="small">
<TableHead>
<TableRow sx={{ bgcolor: 'grey.50' }}>
<TableCell><Typography variant="caption" fontWeight={600}>Objekt</Typography></TableCell>
<TableCell><Typography variant="caption" fontWeight={600}>Quelle</Typography></TableCell>
<TableCell><Typography variant="caption" fontWeight={600}>Score</Typography></TableCell>
<TableCell><Typography variant="caption" fontWeight={600}>Kritische Felder</Typography></TableCell>
<TableCell><Typography variant="caption" fontWeight={600}>Optionale Felder</Typography></TableCell>
<TableCell><Typography variant="caption" fontWeight={600}>Aktualität</Typography></TableCell>
<TableCell><Typography variant="caption" fontWeight={600}>Warnungen</Typography></TableCell>
<TableCell><Typography variant="caption" sx={{ fontWeight: 600 }}>Objekt</Typography></TableCell>
<TableCell><Typography variant="caption" sx={{ fontWeight: 600 }}>Quelle</Typography></TableCell>
<TableCell><Typography variant="caption" sx={{ fontWeight: 600 }}>Score</Typography></TableCell>
<TableCell><Typography variant="caption" sx={{ fontWeight: 600 }}>Kritische Felder</Typography></TableCell>
<TableCell><Typography variant="caption" sx={{ fontWeight: 600 }}>Optionale Felder</Typography></TableCell>
<TableCell><Typography variant="caption" sx={{ fontWeight: 600 }}>Aktualität</Typography></TableCell>
<TableCell><Typography variant="caption" sx={{ fontWeight: 600 }}>Warnungen</Typography></TableCell>
</TableRow>
</TableHead>
<TableBody>
@@ -220,7 +218,7 @@ export default function DataQuality() {
>
{/* Objekt */}
<TableCell>
<Typography variant="body2" fontWeight={500}>{property.title}</Typography>
<Typography variant="body2" sx={{ fontWeight: 500 }}>{property.title}</Typography>
</TableCell>
{/* Quelle */}
@@ -234,7 +232,7 @@ export default function DataQuality() {
<TableCell>
<Box sx={{ width: 100 }}>
<Box className="flex items-center justify-between mb-1">
<Typography variant="caption" fontWeight={700} sx={{ color: score >= 0.8 ? '#1a7a4a' : score >= 0.6 ? '#d97706' : '#c0392b' }}>
<Typography variant="caption" sx={{ fontWeight: 700, color: score >= 0.8 ? '#1a7a4a' : score >= 0.6 ? '#d97706' : '#c0392b' }}>
{Math.round(score * 100)}%
</Typography>
</Box>
@@ -257,7 +255,7 @@ export default function DataQuality() {
<Chip key={f} label={f} color="error" size="small" variant="outlined" />
))}
{missingCritical.length > 2 && (
<Typography variant="caption" color="error.main" fontWeight={600}>
<Typography variant="caption" sx={{ fontWeight: 600 }} color="error.main">
+{missingCritical.length - 2} weitere
</Typography>
)}
@@ -280,7 +278,7 @@ export default function DataQuality() {
<TableCell>
<Chip
label={getFreshnessLabel(property.dataQuality.freshness)}
color={getFreshnessColor(property.dataQuality.freshness)}
sx={{ color: getFreshnessColor(property.dataQuality.freshness) }}
size="small"
/>
</TableCell>