Bestellungen: Festpreis pro Position zurücksetzen

This commit is contained in:
2026-05-28 13:22:40 +02:00
parent fb8562db7a
commit 188f121cda

View File

@@ -282,6 +282,7 @@ function BestellungDetail({ id, toast, onBack }) {
</div> </div>
<div> <div>
<div style={{...S.head,marginBottom:4}}>FESTPREIS/STK ()</div> <div style={{...S.head,marginBottom:4}}>FESTPREIS/STK ()</div>
<div style={{display:'flex',gap:6,alignItems:'stretch'}}>
<input type="number" step="0.01" min="0" <input type="number" step="0.01" min="0"
defaultValue={item.custom_price??''} defaultValue={item.custom_price??''}
placeholder="" placeholder=""
@@ -291,9 +292,16 @@ function BestellungDetail({ id, toast, onBack }) {
const v = e.target.value==='' ? null : parseFloat(e.target.value); const v = e.target.value==='' ? null : parseFloat(e.target.value);
updateItem(item.id, {custom_price:v}); updateItem(item.id, {custom_price:v});
}} }}
style={{...S.inp,fontSize:14,padding:'8px 10px', style={{...S.inp,fontSize:14,padding:'8px 10px',flex:1,
opacity:!!order.bezahlt?0.5:1, opacity:!!order.bezahlt?0.5:1,
cursor:!!order.bezahlt?'not-allowed':'text'}}/> cursor:!!order.bezahlt?'not-allowed':'text'}}/>
{item.custom_price!=null && !order.bezahlt && (
<button
onClick={()=>updateItem(item.id,{custom_price:null})}
title="Festpreis zurücksetzen"
style={{...S.btn('#ff6b9d',true),padding:'0 10px',flexShrink:0,fontSize:14}}></button>
)}
</div>
</div> </div>
</div> </div>