clean installation flat view

This commit is contained in:
Yinyin Liu 2026-06-05 09:33:12 +02:00
parent 8c01912947
commit ec0e8258b2
1 changed files with 9 additions and 39 deletions

View File

@ -371,45 +371,15 @@ const FlatInstallationView = (props: FlatInstallationViewProps) => {
)} )}
{showAnomalyColumn && ( {showAnomalyColumn && (
<TableCell> <TableCell>
{(() => { {anomalyMap.has(installation.id) && (
const a = anomalyMap.get(installation.id); <WarningAmberIcon
if (!a) { style={{
return ( width: '20px',
<Typography height: '20px',
variant="body2" color: '#f7b34d'
color="text.secondary" }}
sx={{ fontSize: 'small' }} />
> )}
</Typography>
);
}
return (
<div
style={{
display: 'flex',
alignItems: 'center',
gap: '6px'
}}
>
<WarningAmberIcon
style={{
width: '20px',
height: '20px',
color: '#f7b34d'
}}
/>
<Typography
variant="body2"
color="text.primary"
noWrap
sx={{ fontSize: 'small' }}
>
{a.lastDetectedAt} · {a.lastVoltage.toFixed(2)} V
</Typography>
</div>
);
})()}
</TableCell> </TableCell>
)} )}
</HoverableTableRow> </HoverableTableRow>