This commit is contained in:
seb
2026-10-17 18:38:15 +02:00
parent 45c1067d9f
commit 7080382f56

View File

@@ -227,8 +227,8 @@ class DeliveryRow extends Component {
const unbooked = isBooked
? 0
: (delivery.ledger?.unbookedPositions != null
? Number(delivery.ledger.unbookedPositions)
: Math.max(0, totalPositions - completelyBooked));
? Number(delivery.ledger.unbookedPositions)
: Math.max(0, totalPositions - completelyBooked));
return (
<ListItemButton
@@ -267,30 +267,26 @@ class DeliveryRow extends Component {
{totalPositions === 0 ? (
<Typography variant="body2" color="text.secondary">0</Typography>
) : unbooked === 0 ? (
<Tooltip title={`Alle ${totalPositions} Positionen vollständig ins Lager gebucht`}>
<Chip
size="small"
icon={<CheckCircleOutlineOutlinedIcon sx={{ '&&': { fontSize: 16 } }} />}
label="Gebucht"
color="success"
variant="outlined"
onClick={() => onOpenBookDialog?.(delivery)}
sx={{ fontWeight: 600, cursor: 'pointer' }}
/>
) : (
<>
<Chip
size="small"
icon={<CheckCircleOutlineOutlinedIcon sx={{ '&&': { fontSize: 16 } }} />}
label="Gebucht"
color="success"
icon={<Inventory2OutlinedIcon sx={{ '&&': { fontSize: 16 } }} />}
label={String(unbooked)}
color="warning"
variant="outlined"
onClick={() => onOpenBookDialog?.(delivery)}
sx={{ fontWeight: 600, cursor: 'pointer' }}
/>
</Tooltip>
) : (
<>
<Tooltip title={`${unbooked} von ${totalPositions} Positionen noch ungebucht`}>
<Chip
size="small"
icon={<Inventory2OutlinedIcon sx={{ '&&': { fontSize: 16 } }} />}
label={String(unbooked)}
color="warning"
variant="outlined"
onClick={() => onOpenBookDialog?.(delivery)}
sx={{ fontWeight: 600, cursor: 'pointer' }}
/>
</Tooltip>
<Button
size="small"
variant="contained"
@@ -606,23 +602,21 @@ class DeliverySearchField extends PureComponent {
</Box>
{import.meta.env.DEV && (
<Tooltip title={`Chunk-Cache-Monitor öffnen (Alt+Shift+C) — ${this.state.lruChunksCount || 0}/${this.state.maxLruChunks || 50} Chunks im RAM über ${this.state.filterCachesCount || 1} Filter`}>
<Chip
size="small"
icon={<ViewModuleIcon sx={{ fontSize: 16 }} />}
label={this.state.lruChunksCount > 0 ? `Chunk-Cache (${this.state.lruChunksCount}/${this.state.maxLruChunks || 50})` : 'Chunk-Cache'}
onClick={() => window.dispatchEvent(new CustomEvent('dash:toggle-chunk-monitor', { detail: { target: 'delivery' } }))}
sx={{
cursor: 'pointer',
height: 28,
fontWeight: 600,
fontSize: '0.75rem',
bgcolor: 'background.paper',
boxShadow: 1,
'&:hover': { bgcolor: 'action.hover' },
}}
/>
</Tooltip>
<Chip
size="small"
icon={<ViewModuleIcon sx={{ fontSize: 16 }} />}
label={this.state.lruChunksCount > 0 ? `Chunk-Cache (${this.state.lruChunksCount}/${this.state.maxLruChunks || 50})` : 'Chunk-Cache'}
onClick={() => window.dispatchEvent(new CustomEvent('dash:toggle-chunk-monitor', { detail: { target: 'delivery' } }))}
sx={{
cursor: 'pointer',
height: 28,
fontWeight: 600,
fontSize: '0.75rem',
bgcolor: 'background.paper',
boxShadow: 1,
'&:hover': { bgcolor: 'action.hover' },
}}
/>
)}
</Box>
</Box>
@@ -676,7 +670,7 @@ export class DeliveryList extends PureComponent {
this.headerItem = createDummyTestDelivery();
this.forceUpdate();
});
void numberAutomat.actions.ensureLoaded().catch(() => {});
void numberAutomat.actions.ensureLoaded().catch(() => { });
void this.loadSuppliers();
}
@@ -711,7 +705,7 @@ export class DeliveryList extends PureComponent {
}
handleRetry() {
void deliveryAutomat.actions.requireChunk(0, 0, { immediate: true }).catch(() => {});
void deliveryAutomat.actions.requireChunk(0, 0, { immediate: true }).catch(() => { });
}
handleCreate() {