feat(bestellungen): add optional "Für Mitglied" field, auto-populated from internal request submitter
This commit is contained in:
@@ -23,7 +23,7 @@ import { ausruestungsanfrageApi } from '../services/ausruestungsanfrage';
|
||||
import type { BestellungFormData, BestellpositionFormData, LieferantFormData, Lieferant } from '../types/bestellung.types';
|
||||
import type { AusruestungArtikel } from '../types/ausruestungsanfrage.types';
|
||||
|
||||
const emptyOrderForm: BestellungFormData = { bezeichnung: '', lieferant_id: undefined, besteller_id: '', notizen: '', positionen: [] };
|
||||
const emptyOrderForm: BestellungFormData = { bezeichnung: '', lieferant_id: undefined, besteller_id: '', mitglied_id: undefined, notizen: '', positionen: [] };
|
||||
const emptyVendorForm: LieferantFormData = { name: '', kontakt_name: '', email: '', telefon: '', adresse: '', website: '', notizen: '' };
|
||||
const emptyPosition: BestellpositionFormData = { bezeichnung: '', menge: 1, einheit: 'Stk' };
|
||||
|
||||
@@ -150,6 +150,14 @@ export default function BestellungNeu() {
|
||||
renderInput={(params) => <TextField {...params} label="Besteller" />}
|
||||
/>
|
||||
|
||||
<Autocomplete
|
||||
options={orderUsers}
|
||||
getOptionLabel={(o) => o.name}
|
||||
value={orderUsers.find((u) => u.id === orderForm.mitglied_id) || null}
|
||||
onChange={(_e, v) => setOrderForm((f) => ({ ...f, mitglied_id: v?.id || '' }))}
|
||||
renderInput={(params) => <TextField {...params} label="Für Mitglied" />}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
label="Notizen"
|
||||
multiline
|
||||
|
||||
Reference in New Issue
Block a user