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