This commit is contained in:
seb
2026-10-16 19:36:08 +02:00
parent 4a7a02a0a4
commit 7ad8a3a301
5 changed files with 167 additions and 95 deletions

View File

@@ -1234,6 +1234,8 @@ class LieferungNeuPage extends PureComponent {
}
allEntries.sort((a, b) => String(b.created_at || '').localeCompare(String(a.created_at || '')));
if (!ledgerSummary.hasTrackStock && allEntries.length === 0) return null;
return (
<PanelTile
wide={4}
@@ -1328,25 +1330,27 @@ class LieferungNeuPage extends PureComponent {
)}
</Box>
<Button
variant={status === 'booked' ? 'outlined' : 'contained'}
color={status === 'booked' ? 'success' : status === 'partial' ? 'warning' : 'primary'}
startIcon={
status === 'booked' ? (
<CheckCircleOutlineOutlinedIcon />
) : (
<Inventory2OutlinedIcon />
)
}
onClick={this.handleOpenBookDialog}
sx={{ fontWeight: 600, textTransform: 'none' }}
>
{status === 'booked'
? 'Buchungsdetails anzeigen'
: status === 'partial'
? 'Restliche Mengen einbuchen'
: 'Ins Lager buchen'}
</Button>
{ledgerSummary.hasTrackStock && (
<Button
variant={status === 'booked' ? 'outlined' : 'contained'}
color={status === 'booked' ? 'success' : status === 'partial' ? 'warning' : 'primary'}
startIcon={
status === 'booked' ? (
<CheckCircleOutlineOutlinedIcon />
) : (
<Inventory2OutlinedIcon />
)
}
onClick={this.handleOpenBookDialog}
sx={{ fontWeight: 600, textTransform: 'none' }}
>
{status === 'booked'
? 'Buchungsdetails anzeigen'
: status === 'partial'
? 'Restliche Mengen einbuchen'
: 'Ins Lager buchen'}
</Button>
)}
</Box>
{allEntries.length > 0 && (