feat: widget icons, dark theme tables, breadcrumb removal, bookkeeping rework, personal equipment pages, PDF/order improvements
This commit is contained in:
@@ -413,10 +413,16 @@ async function getRequestById(id: number) {
|
||||
linkedBestellungen = bestellungen.rows;
|
||||
} catch { /* table may not exist */ }
|
||||
|
||||
// Determine im_haus: true if any linked bestellung has status lieferung_pruefen or abgeschlossen
|
||||
const imHaus = (linkedBestellungen as { status: string }[]).some(
|
||||
(b) => b.status === 'lieferung_pruefen' || b.status === 'abgeschlossen',
|
||||
);
|
||||
|
||||
return {
|
||||
anfrage: reqResult.rows[0],
|
||||
positionen: positionenWithEigenschaften,
|
||||
linked_bestellungen: linkedBestellungen,
|
||||
im_haus: imHaus,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user