Dateien nach "frontend/src/tools" hochladen
This commit is contained in:
@@ -71,7 +71,7 @@ function BestellungDetail({ id, toast, onBack }) {
|
|||||||
} else {
|
} else {
|
||||||
const created = await api('/tools/bestellungen',{body:payload});
|
const created = await api('/tools/bestellungen',{body:payload});
|
||||||
toast('Bestellung angelegt');
|
toast('Bestellung angelegt');
|
||||||
onBack(created.id);
|
onBack(created.id, true);
|
||||||
}
|
}
|
||||||
} catch(e) { toast(e.message,'error'); }
|
} catch(e) { toast(e.message,'error'); }
|
||||||
};
|
};
|
||||||
@@ -150,22 +150,24 @@ function BestellungDetail({ id, toast, onBack }) {
|
|||||||
background:!!order.bezahlt?'rgba(192,132,252,0.07)':'rgba(255,255,255,0.02)',
|
background:!!order.bezahlt?'rgba(192,132,252,0.07)':'rgba(255,255,255,0.02)',
|
||||||
border:`1px solid ${!!order.bezahlt?'rgba(192,132,252,0.25)':'rgba(255,255,255,0.07)'}`,
|
border:`1px solid ${!!order.bezahlt?'rgba(192,132,252,0.25)':'rgba(255,255,255,0.07)'}`,
|
||||||
borderRadius:10}}>
|
borderRadius:10}}>
|
||||||
<button onClick={toggleBezahlt} style={{
|
<div style={{display:'flex',justifyContent:'space-between',alignItems:'center'}}>
|
||||||
background:!!order.bezahlt?BEZAHLT.bg:'rgba(255,255,255,0.05)',
|
<button onClick={toggleBezahlt} style={{
|
||||||
border:`1px solid ${!!order.bezahlt?BEZAHLT.color+'55':'rgba(255,255,255,0.12)'}`,
|
background:!!order.bezahlt?BEZAHLT.bg:'rgba(255,255,255,0.05)',
|
||||||
borderRadius:20,padding:'5px 14px',
|
border:`1px solid ${!!order.bezahlt?BEZAHLT.color+'55':'rgba(255,255,255,0.12)'}`,
|
||||||
color:!!order.bezahlt?BEZAHLT.color:'rgba(255,255,255,0.45)',
|
borderRadius:20,padding:'5px 14px',
|
||||||
fontFamily:'monospace',fontSize:11,cursor:'pointer',
|
color:!!order.bezahlt?BEZAHLT.color:'rgba(255,255,255,0.45)',
|
||||||
}}>
|
fontFamily:'monospace',fontSize:11,cursor:'pointer',
|
||||||
{!!order.bezahlt?'💜 Bezahlt':'○ Als bezahlt markieren'}
|
}}>
|
||||||
</button>
|
{!!order.bezahlt?'💜 Bezahlt':'○ Als bezahlt markieren'}
|
||||||
{!!order.bezahlt && order.bezahlt_am && (
|
</button>
|
||||||
<div style={{color:BEZAHLT.color,fontFamily:'monospace',fontSize:12,marginTop:6}}>
|
{!!order.bezahlt && order.bezahlt_am && (
|
||||||
Bezahlt am {new Date(order.bezahlt_am).toLocaleDateString('de-DE',{day:'2-digit',month:'2-digit',year:'numeric'})}
|
<span style={{color:BEZAHLT.color,fontFamily:'monospace',fontSize:11}}>
|
||||||
</div>
|
am {new Date(order.bezahlt_am).toLocaleDateString('de-DE',{day:'2-digit',month:'2-digit',year:'numeric'})}
|
||||||
)}
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
{!!order.bezahlt && (
|
{!!order.bezahlt && (
|
||||||
<div style={{color:'rgba(192,132,252,0.5)',fontFamily:'monospace',fontSize:11,marginTop:4}}>
|
<div style={{color:'rgba(192,132,252,0.5)',fontFamily:'monospace',fontSize:10,marginTop:5}}>
|
||||||
🔒 Bearbeitung gesperrt.
|
🔒 Bearbeitung gesperrt.
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -476,7 +478,7 @@ export default function Bestellungen({ toast, mobile }) {
|
|||||||
<BestellungDetail
|
<BestellungDetail
|
||||||
id={newMode ? null : openId}
|
id={newMode ? null : openId}
|
||||||
toast={toast}
|
toast={toast}
|
||||||
onBack={savedId => { setNewMode(false); if (savedId) setOpenId(savedId); else { setOpenId(null); load(); } }}
|
onBack={(savedId, jump) => { setNewMode(false); if (savedId) { setOpenId(savedId); } else { setOpenId(null); load(); } }}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user