From b3051953b08ee84a9ba986ca9bd7630987381a47 Mon Sep 17 00:00:00 2001 From: seb Date: Sat, 17 Oct 2026 04:51:09 +0200 Subject: [PATCH] u --- .../manifest/ShipmentDetailDialog.jsx | 114 +++++++----------- 1 file changed, 41 insertions(+), 73 deletions(-) diff --git a/src/components/manifest/ShipmentDetailDialog.jsx b/src/components/manifest/ShipmentDetailDialog.jsx index 954b9ed..bb26f4f 100644 --- a/src/components/manifest/ShipmentDetailDialog.jsx +++ b/src/components/manifest/ShipmentDetailDialog.jsx @@ -24,8 +24,6 @@ import AddIcon from '@mui/icons-material/Add'; import DeleteOutlinedIcon from '@mui/icons-material/DeleteOutlined'; import CheckCircleOutlineOutlinedIcon from '@mui/icons-material/CheckCircleOutlineOutlined'; import ContentCopyIcon from '@mui/icons-material/ContentCopy'; -import OpenInNewIcon from '@mui/icons-material/OpenInNew'; -import Inventory2Icon from '@mui/icons-material/Inventory2'; import { enqueueSnackbar } from 'notistack'; import AppDialog from '../AppDialog'; import { shipment as shipmentApi, shipping as shippingApi } from '../../api'; @@ -174,7 +172,6 @@ export default class ShipmentDetailDialog extends PureComponent { this.handleDeletePackage = this.handleDeletePackage.bind(this); this.handleMarkPackageShipped = this.handleMarkPackageShipped.bind(this); this.handleStateChange = this.handleStateChange.bind(this); - this.handleNavigateFull = this.handleNavigateFull.bind(this); } componentDidMount() { @@ -260,7 +257,7 @@ export default class ShipmentDetailDialog extends PureComponent { this.setState((prev) => ({ shipment: { ...prev.shipment, state: newState }, })); - const label = newState === 'delivered' ? 'Geliefert' : newState === 'returned' ? 'Retoure' : 'Neu'; + const label = newState === 'delivered' ? 'Versendet' : newState === 'returned' ? 'Retoure' : 'Neu'; enqueueSnackbar(`Lieferstatus geändert: ${label}`, { variant: 'success' }); await Promise.all([ orderAutomat.actions.reload(), @@ -274,14 +271,6 @@ export default class ShipmentDetailDialog extends PureComponent { } } - handleNavigateFull() { - const { shipment, onClose, onNavigate } = this.props; - onClose?.(); - if (onNavigate && shipment?.id) { - onNavigate(`/auftrag/ausliefern?shipmentId=${shipment.id}`); - } - } - render() { const { open, onClose } = this.props; const { shipment, loading, error, addPackageDialogOpen, busyAction } = this.state; @@ -290,7 +279,6 @@ export default class ShipmentDetailDialog extends PureComponent { const shLines = Array.isArray(shipment.lines) ? shipment.lines : []; const shPackages = Array.isArray(shipment.shippings) ? shipment.shippings : []; - const hasShippedPackages = shPackages.some((p) => p.state === 'shipped'); return ( @@ -298,46 +286,23 @@ export default class ShipmentDetailDialog extends PureComponent { - - - {shipment.number || 'Lieferschein'} - - - + + {shipment.number || 'Lieferschein'} + {shipment.date ? `Datum: ${formatDate(shipment.date)}` : ''} {shipment.externalNumber ? ` • Ref: ${shipment.externalNumber}` : ''} - - this.handleStateChange(e.target.value)} - disabled={busyAction} - sx={{ minWidth: 130 }} - > - Neu - Geliefert - Retoure - - theme.palette.grey[500] }} - > - - - + theme.palette.grey[500] }} + > + + @@ -349,9 +314,6 @@ export default class ShipmentDetailDialog extends PureComponent { {/* Shipped Article Positions */} - - Gelieferte Artikel-Positionen ({shLines.length}) - @@ -386,10 +348,7 @@ export default class ShipmentDetailDialog extends PureComponent { {/* Shipping Packages / Tracking */} - - - Pakete & Sendungsverfolgung ({shPackages.length}) - + 0 ? 1 : 0 }}> - - {this.props.onNavigate && ( + + {(!shipment.state || shipment.state === 'new') && ( )} + {shipment.state === 'delivered' && ( + + )} + {shipment.state === 'returned' && ( + + )} {addPackageDialogOpen && (