Bestellungen: Preiskategorie pro Position als Festpreis übernehmen
This commit is contained in:
@@ -348,15 +348,26 @@ function BestellungDetail({ id, toast, onBack }) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Preiszeile */}
|
{/* Preiszeile */}
|
||||||
<div style={{display:'flex',gap:8,flexWrap:'wrap'}}>
|
<div style={{display:'flex',gap:8,flexWrap:'wrap',alignItems:'center'}}>
|
||||||
{PREISE.map(p=>(
|
{PREISE.map(p=>{
|
||||||
<div key={p.key} style={{textAlign:'center',minWidth:60}}>
|
const canSelect = !order.bezahlt && item.custom_price == null;
|
||||||
<div style={{fontSize:10}}>{p.emoji}</div>
|
return (
|
||||||
<div style={{color:p.c,fontFamily:"'Space Mono',monospace",fontSize:11,fontWeight:700}}>
|
<div key={p.key}
|
||||||
{(item[`preis_${p.key}`]*item.stueckzahl).toFixed(2)}€
|
onClick={() => 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'}}>
|
||||||
|
<div style={{fontSize:10}}>{p.emoji}</div>
|
||||||
|
<div style={{color:p.c,fontFamily:"'Space Mono',monospace",fontSize:11,fontWeight:700}}>
|
||||||
|
{(item[`preis_${p.key}`]*item.stueckzahl).toFixed(2)}€
|
||||||
|
</div>
|
||||||
|
{canSelect && <div style={{color:`${p.c}70`,fontSize:7,fontFamily:'monospace',marginTop:1}}>↑ übernehmen</div>}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
);
|
||||||
))}
|
})}
|
||||||
{item.custom_price!=null && (
|
{item.custom_price!=null && (
|
||||||
<div style={{textAlign:'center',minWidth:60,marginLeft:'auto'}}>
|
<div style={{textAlign:'center',minWidth:60,marginLeft:'auto'}}>
|
||||||
<div style={{color:'rgba(255,255,255,0.6)',fontSize:9,fontFamily:'monospace'}}>FEST</div>
|
<div style={{color:'rgba(255,255,255,0.6)',fontSize:9,fontFamily:'monospace'}}>FEST</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user