Dateien nach "frontend/src/tools" hochladen
This commit is contained in:
@@ -196,10 +196,10 @@ function BestellungDetail({ id, toast, onBack }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Stückzahl + Festpreis */}
|
{/* Stückzahl gesamt + Festpreis */}
|
||||||
<div style={{display:'grid',gridTemplateColumns:'1fr 1fr',gap:8,marginBottom:8}}>
|
<div style={{display:'grid',gridTemplateColumns:'1fr 1fr',gap:8,marginBottom:10}}>
|
||||||
<div>
|
<div>
|
||||||
<div style={{...S.head,marginBottom:4}}>STÜCKZAHL</div>
|
<div style={{...S.head,marginBottom:4}}>STÜCKZAHL GESAMT</div>
|
||||||
<div style={{display:'flex',alignItems:'center',background:'rgba(255,255,255,0.05)',borderRadius:7,border:'1px solid rgba(255,255,255,0.1)',overflow:'hidden'}}>
|
<div style={{display:'flex',alignItems:'center',background:'rgba(255,255,255,0.05)',borderRadius:7,border:'1px solid rgba(255,255,255,0.1)',overflow:'hidden'}}>
|
||||||
<button onClick={()=>item.stueckzahl>1&&updateItem(item.id,{stueckzahl:item.stueckzahl-1})}
|
<button onClick={()=>item.stueckzahl>1&&updateItem(item.id,{stueckzahl:item.stueckzahl-1})}
|
||||||
style={{padding:'6px 10px',background:'transparent',border:'none',color:'rgba(255,255,255,0.6)',fontSize:18,cursor:'pointer'}}>−</button>
|
style={{padding:'6px 10px',background:'transparent',border:'none',color:'rgba(255,255,255,0.6)',fontSize:18,cursor:'pointer'}}>−</button>
|
||||||
@@ -221,6 +221,40 @@ function BestellungDetail({ id, toast, onBack }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Status pro Stück */}
|
||||||
|
<div style={{marginBottom:10}}>
|
||||||
|
<div style={{...S.head,marginBottom:6}}>STATUS PRO STÜCK</div>
|
||||||
|
<div style={{display:'grid',gridTemplateColumns:'1fr 1fr 1fr',gap:6}}>
|
||||||
|
{[
|
||||||
|
['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 (
|
||||||
|
<div key={key} style={{background:`${color}10`,border:`1px solid ${color}30`,borderRadius:8,padding:'8px 6px',textAlign:'center'}}>
|
||||||
|
<div style={{color:'rgba(255,255,255,0.35)',fontSize:9,fontFamily:'monospace',marginBottom:6}}>{label.toUpperCase()}</div>
|
||||||
|
<div style={{display:'flex',alignItems:'center',justifyContent:'center',gap:4}}>
|
||||||
|
<button
|
||||||
|
onClick={()=>qty>0&&updateItem(item.id,{[`qty_${key}`]:qty-1})}
|
||||||
|
style={{width:22,height:22,borderRadius:5,background:'rgba(0,0,0,0.3)',border:'none',color:qty>0?color:'rgba(255,255,255,0.15)',fontSize:16,cursor:qty>0?'pointer':'default',lineHeight:1}}>−</button>
|
||||||
|
<span style={{color,fontFamily:"'Space Mono',monospace",fontSize:16,fontWeight:700,minWidth:20,textAlign:'center'}}>{qty}</span>
|
||||||
|
<button
|
||||||
|
onClick={()=>{const sum=(item.qty_warteliste||0)+(item.qty_in_arbeit||0)+(item.qty_fertig||0);sum<item.stueckzahl&&updateItem(item.id,{[`qty_${key}`]:qty+1})}}
|
||||||
|
style={{width:22,height:22,borderRadius:5,background:'rgba(0,0,0,0.3)',border:'none',color:color,fontSize:16,cursor:'pointer',lineHeight:1}}>+</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
{/* Verbleibend ohne Status */}
|
||||||
|
{(() => { const assigned=(item.qty_warteliste||0)+(item.qty_in_arbeit||0)+(item.qty_fertig||0); return assigned<item.stueckzahl ? (
|
||||||
|
<div style={{marginTop:6,color:'rgba(255,230,109,0.7)',fontFamily:'monospace',fontSize:10,textAlign:'center'}}>
|
||||||
|
⚠ {item.stueckzahl-assigned} Stück noch keinem Status zugewiesen
|
||||||
|
</div>
|
||||||
|
) : null; })()}
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Preiszeile */}
|
{/* Preiszeile */}
|
||||||
<div style={{display:'flex',gap:8,flexWrap:'wrap'}}>
|
<div style={{display:'flex',gap:8,flexWrap:'wrap'}}>
|
||||||
{PREISE.map(p=>(
|
{PREISE.map(p=>(
|
||||||
@@ -412,8 +446,8 @@ export default function Bestellungen({ toast, mobile }) {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{filtered.map(order => {
|
{filtered.map(order => {
|
||||||
const done = order.items_done || 0;
|
const done = order.qty_fertig_total || 0;
|
||||||
const total = order.item_count || 0;
|
const total = order.qty_total || 0;
|
||||||
const customSum = order.custom_price_sum || 0;
|
const customSum = order.custom_price_sum || 0;
|
||||||
const allDone = total > 0 && done === total;
|
const allDone = total > 0 && done === total;
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user