Add recipe inline create/edit and batches relation on product page
Deploy / deploy (push) Successful in 14s
Deploy / deploy (push) Successful in 14s
- Recipe select now has a create/edit modal (name + description) - Batches RelationManager shows all LOT charges for the product below the form, sorted newest first, with create/edit/delete actions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
e959faff8d
commit
6e28984278
2 files changed
+130
-1
No files matched your search
@@ -52,7 +52,21 @@ class ProductResource extends Resource {
|
||||
->native(false)
|
||||
->searchable()
|
||||
->relationship('recipe', 'name')
|
||||
->required(),
|
||||
->required()
|
||||
->createOptionForm([
|
||||
Forms\Components\TextInput::make('name')
|
||||
->label('Name')
|
||||
->required(),
|
||||
Forms\Components\Textarea::make('description')
|
||||
->label('Beschreibung'),
|
||||
])
|
||||
->editOptionForm([
|
||||
Forms\Components\TextInput::make('name')
|
||||
->label('Name')
|
||||
->required(),
|
||||
Forms\Components\Textarea::make('description')
|
||||
->label('Beschreibung'),
|
||||
]),
|
||||
Repeater::make('sizes')
|
||||
->schema([
|
||||
Select::make('packing_id')
|
||||
@@ -140,6 +154,12 @@ class ProductResource extends Resource {
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getRelations(): array {
|
||||
return [
|
||||
RelationManagers\BatchesRelationManager::class,
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array {
|
||||
return [
|
||||
'index' => Pages\ListProducts::route('/'),
|
||||
|
||||
Reference in new issue
Block a user