From 39f8b0db4fc6e4f09693abd2bb242b748307e1d2 Mon Sep 17 00:00:00 2001 From: Dicken Date: Tue, 26 May 2026 00:38:22 +0200 Subject: [PATCH] Dateien nach "frontend/src/tools" hochladen --- frontend/src/tools/bestellungen.jsx | 44 +++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/frontend/src/tools/bestellungen.jsx b/frontend/src/tools/bestellungen.jsx index 688e900..ae68405 100644 --- a/frontend/src/tools/bestellungen.jsx +++ b/frontend/src/tools/bestellungen.jsx @@ -196,10 +196,10 @@ function BestellungDetail({ id, toast, onBack }) { - {/* Stückzahl + Festpreis */} -
+ {/* Stückzahl gesamt + Festpreis */} +
-
STÜCKZAHL
+
STÜCKZAHL GESAMT
@@ -221,6 +221,40 @@ function BestellungDetail({ id, toast, onBack }) {
+ {/* Status pro Stück */} +
+
STATUS PRO STÜCK
+
+ {[ + ['warteliste','Warteliste','#ffe66d', item.qty_warteliste||0], + ['in_arbeit', 'In Arbeit', '#4ecdc4', item.qty_in_arbeit||0], + ['fertig', 'Fertig', '#6bcb77', item.qty_fertig||0], + ].map(([key, label, color, qty]) => { + const others = item.stueckzahl - qty; + return ( +
+
{label.toUpperCase()}
+
+ + {qty} + +
+
+ ); + })} +
+ {/* Verbleibend ohne Status */} + {(() => { const assigned=(item.qty_warteliste||0)+(item.qty_in_arbeit||0)+(item.qty_fertig||0); return assigned + ⚠ {item.stueckzahl-assigned} Stück noch keinem Status zugewiesen +
+ ) : null; })()} +
+ {/* Preiszeile */}
{PREISE.map(p=>( @@ -412,8 +446,8 @@ export default function Bestellungen({ toast, mobile }) { )} {filtered.map(order => { - const done = order.items_done || 0; - const total = order.item_count || 0; + const done = order.qty_fertig_total || 0; + const total = order.qty_total || 0; const customSum = order.custom_price_sum || 0; const allDone = total > 0 && done === total; return (