fix(bestellungen): automate delivery status transitions, enable received-qty input for creators, and add im_haus tracking to positionen

This commit is contained in:
Matthias Hochmeister
2026-04-17 11:42:12 +02:00
parent 7d2ea57c17
commit fcca04cc39
11 changed files with 367 additions and 108 deletions

View File

@@ -109,9 +109,11 @@ function MeineAnfragenTab() {
<TableCell>{r.bezeichnung || '-'}</TableCell>
<TableCell><Chip label={AUSRUESTUNG_STATUS_LABELS[r.status]} color={AUSRUESTUNG_STATUS_COLORS[r.status]} size="small" /></TableCell>
<TableCell>
{r.im_haus && r.geliefert_count != null && r.positionen_count != null && r.geliefert_count < r.positionen_count
{r.im_haus_count != null && r.positionen_count != null && r.im_haus_count > 0 && r.im_haus_count < r.positionen_count
? <Chip label="Teilweise im Haus" color="warning" size="small" />
: r.im_haus ? <Chip label="Im Haus" color="success" size="small" /> : null}
: r.im_haus_count != null && r.positionen_count != null && r.im_haus_count > 0 && r.im_haus_count >= r.positionen_count
? <Chip label="Im Haus" color="success" size="small" />
: r.im_haus ? <Chip label="Im Haus" color="success" size="small" /> : null}
</TableCell>
<TableCell>{r.positionen_count ?? r.items_count ?? '-'}</TableCell>
<TableCell>
@@ -224,9 +226,11 @@ function AlleAnfragenTab() {
<TableCell>{r.fuer_benutzer_name || r.anfrager_name || r.anfrager_id}</TableCell>
<TableCell><Chip label={AUSRUESTUNG_STATUS_LABELS[r.status]} color={AUSRUESTUNG_STATUS_COLORS[r.status]} size="small" /></TableCell>
<TableCell>
{r.im_haus && r.geliefert_count != null && r.positionen_count != null && r.geliefert_count < r.positionen_count
{r.im_haus_count != null && r.positionen_count != null && r.im_haus_count > 0 && r.im_haus_count < r.positionen_count
? <Chip label="Teilweise im Haus" color="warning" size="small" />
: r.im_haus ? <Chip label="Im Haus" color="success" size="small" /> : null}
: r.im_haus_count != null && r.positionen_count != null && r.im_haus_count > 0 && r.im_haus_count >= r.positionen_count
? <Chip label="Im Haus" color="success" size="small" />
: r.im_haus ? <Chip label="Im Haus" color="success" size="small" /> : null}
</TableCell>
<TableCell>{r.positionen_count ?? r.items_count ?? '-'}</TableCell>
<TableCell>