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