Update DistribucionesRelationManager.php
This commit is contained in:
+6
-1
@@ -20,7 +20,12 @@ class DistribucionesRelationManager extends RelationManager
|
|||||||
Forms\Components\Select::make('bodega_id')->relationship('bodega', 'nombre')->required(),
|
Forms\Components\Select::make('bodega_id')->relationship('bodega', 'nombre')->required(),
|
||||||
Forms\Components\Select::make('color_id')->relationship('color', 'name')->nullable(),
|
Forms\Components\Select::make('color_id')->relationship('color', 'name')->nullable(),
|
||||||
Forms\Components\Select::make('size_id')->relationship('size', 'name')->nullable(),
|
Forms\Components\Select::make('size_id')->relationship('size', 'name')->nullable(),
|
||||||
Forms\Components\TextInput::make('cantidad')->numeric()->required()->minValue(1),
|
Forms\Components\TextInput::make('cantidad')
|
||||||
|
->numeric()
|
||||||
|
->required()
|
||||||
|
->minValue(1)
|
||||||
|
->default(fn() => $this->getOwnerRecord()?->cantidad_disponible ?? 0)
|
||||||
|
->maxValue(fn() => $this->getOwnerRecord()?->cantidad_disponible ?? 0),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user