From fb8562db7ab8a02151930fd716d55f8cd90cbcac Mon Sep 17 00:00:00 2001 From: Dicken Date: Thu, 28 May 2026 13:16:52 +0200 Subject: [PATCH] =?UTF-8?q?Bestellungen:=20Preiskategorie=20pro=20Position?= =?UTF-8?q?=20als=20Festpreis=20=C3=BCbernehmen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/tools/bestellungen.jsx | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/frontend/src/tools/bestellungen.jsx b/frontend/src/tools/bestellungen.jsx index 13c1d0a..2f5b2c1 100644 --- a/frontend/src/tools/bestellungen.jsx +++ b/frontend/src/tools/bestellungen.jsx @@ -348,15 +348,26 @@ function BestellungDetail({ id, toast, onBack }) { {/* Preiszeile */} -
- {PREISE.map(p=>( -
-
{p.emoji}
-
- {(item[`preis_${p.key}`]*item.stueckzahl).toFixed(2)}€ +
+ {PREISE.map(p=>{ + const canSelect = !order.bezahlt && item.custom_price == null; + return ( +
canSelect && updateItem(item.id, {custom_price: item[`preis_${p.key}`]})} + title={canSelect ? `${p.label}-Preis als Festpreis/Stk. übernehmen` : undefined} + style={{textAlign:'center',minWidth:60,padding:'4px 6px',borderRadius:7, + cursor:canSelect?'pointer':'default', + background:canSelect?`${p.c}08`:'transparent', + border:`1px solid ${canSelect?p.c+'20':'transparent'}`, + transition:'background 0.15s'}}> +
{p.emoji}
+
+ {(item[`preis_${p.key}`]*item.stueckzahl).toFixed(2)}€ +
+ {canSelect &&
↑ übernehmen
}
-
- ))} + ); + })} {item.custom_price!=null && (
FEST