Rohstoffe: inline creation in Lieferung form, hide nav entry, remove quantity column
Deploy / deploy (push) Successful in 17s
Deploy / deploy (push) Successful in 17s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
a85afbc93a
commit
22fb5ed09d
2 files changed
+26
-14
No files matched your search
@@ -37,10 +37,25 @@ class SpiceSupplierResource extends Resource
|
||||
->schema([
|
||||
Select::make('spice_id')
|
||||
->label('Rohstoff')
|
||||
->relationship('spice', 'name')
|
||||
->relationship('spice', 'name')
|
||||
->required()
|
||||
->preload()
|
||||
->searchable(),
|
||||
->preload()
|
||||
->searchable()
|
||||
->createOptionForm([
|
||||
TextInput::make('name')->label('Name')->required()->maxLength(255),
|
||||
Forms\Components\Select::make('unit')
|
||||
->label('Mengeneinheit')
|
||||
->native(false)
|
||||
->options([
|
||||
'grams' => '(Kilo-)Gramm',
|
||||
'pieces' => 'Stück',
|
||||
'liter' => 'Liter',
|
||||
])
|
||||
->required(),
|
||||
])
|
||||
->createOptionUsing(function (array $data) {
|
||||
return \App\Models\Spice::create($data)->id;
|
||||
}),
|
||||
Select::make('supplier_id')
|
||||
->label('Lieferant')
|
||||
->relationship('supplier', 'name')
|
||||
|
||||
Reference in new issue
Block a user