This commit is contained in:
seb
2026-10-17 04:18:43 +02:00
parent bd16df64a1
commit bea427f3df
2 changed files with 13 additions and 50 deletions

View File

@@ -264,7 +264,7 @@ export default class OrderShipmentDialog extends PureComponent {
</Typography>
{orderNumber ? (
<Typography variant="caption" color="text.secondary">
Zu Auftrag / Bestellung: <strong>{orderNumber}</strong>
Zu: <strong>{orderNumber}</strong>
</Typography>
) : null}
</Box>
@@ -307,8 +307,7 @@ export default class OrderShipmentDialog extends PureComponent {
/>
<TextField
size="small"
label="Lieferschein-Nr. / Externe Referenz (optional)"
placeholder="z.B. LS-2026-0042"
label="Referenz"
value={externalNumber}
disabled={saving}
onChange={(e) => this.setState({ externalNumber: e.target.value })}
@@ -316,24 +315,6 @@ export default class OrderShipmentDialog extends PureComponent {
/>
</Stack>
{/* Items selection section */}
<Box sx={{ mb: 1, display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<Typography variant="subtitle2" sx={{ fontWeight: 700 }}>
Zu liefernde Artikel ({selectedCount} von {openItems.length} ausgewählt)
</Typography>
{openItems.length > 0 && (
<Button
size="small"
variant="text"
disabled={saving}
onClick={() => this.handleToggleAll(openItems)}
sx={{ textTransform: 'none', fontWeight: 600, fontSize: '0.8rem' }}
>
{isAllSelected ? 'Auswahl aufheben' : 'Alle offenen auswählen'}
</Button>
)}
</Box>
<TableContainer sx={{ border: '1px solid', borderColor: 'divider', borderRadius: 1 }}>
<Table size="small">
<TableHead sx={{ bgcolor: 'action.hover' }}>
@@ -430,34 +411,17 @@ export default class OrderShipmentDialog extends PureComponent {
</TableContainer>
</DialogContent>
<DialogActions sx={{ p: 2, justifyContent: 'space-between' }}>
<Button variant="outlined" onClick={onClose} disabled={saving}>
Abbrechen
<DialogActions sx={{ p: 2, justifyContent: 'flex-end' }}>
<Button
variant="contained"
color="primary"
disabled={saving || allShipped || selectedCount === 0}
startIcon={saving ? <CircularProgress size={16} color="inherit" /> : <LocalShippingOutlinedIcon />}
onClick={this.handleSubmit}
sx={{ textTransform: 'none', fontWeight: 700 }}
>
{saving ? 'Wird erstellt…' : 'Lieferschein erstellen'}
</Button>
<Stack direction="row" spacing={1.5}>
{!allShipped && openItems.length > 0 && (
<Button
variant="outlined"
color="secondary"
disabled={saving}
onClick={this.handleShipAll}
sx={{ textTransform: 'none', fontWeight: 600 }}
>
Alles liefern
</Button>
)}
<Button
variant="contained"
color="primary"
disabled={saving || allShipped || selectedCount === 0}
startIcon={saving ? <CircularProgress size={16} color="inherit" /> : <LocalShippingOutlinedIcon />}
onClick={this.handleSubmit}
sx={{ textTransform: 'none', fontWeight: 700 }}
>
{saving ? 'Wird erstellt…' : 'Lieferschein erstellen'}
</Button>
</Stack>
</DialogActions>
</AppDialog>
);

View File

@@ -209,9 +209,8 @@ class NewShipmentModal extends PureComponent {
sx={{ width: 180 }}
/>
<TextField
label="Externe Referenz / Lieferschein-Nr."
label="Referenz"
size="small"
placeholder="z.B. LS-2026-99"
value={externalNumber}
onChange={(e) => this.setState({ externalNumber: e.target.value })}
sx={{ flex: 1 }}