up
This commit is contained in:
@@ -74,6 +74,39 @@ class InventarioPrendaResource extends Resource
|
||||
->required(),
|
||||
])
|
||||
->columns(2),
|
||||
|
||||
Section::make('Distribución')
|
||||
->schema([
|
||||
\Filament\Forms\Components\Repeater::make('distribuciones')
|
||||
->label('Distribuciones por bodega / color / talla')
|
||||
->schema([
|
||||
Select::make('bodega_id')
|
||||
->label('Bodega')
|
||||
->relationship('bodega', 'nombre')
|
||||
->required(),
|
||||
|
||||
Select::make('color_id')
|
||||
->label('Color')
|
||||
->relationship('color', 'nombre')
|
||||
->nullable(),
|
||||
|
||||
Select::make('size_id')
|
||||
->label('Talla')
|
||||
->relationship('size', 'nombre')
|
||||
->nullable(),
|
||||
|
||||
TextInput::make('cantidad')
|
||||
->label('Cantidad')
|
||||
->numeric()
|
||||
->required()
|
||||
->minValue(1),
|
||||
])
|
||||
->columns(1)
|
||||
->dehydrated(false)
|
||||
->minItems(0)
|
||||
->helpMessage('Agrega una o varias filas para distribuir la cantidad terminada entre bodegas/variantes.'),
|
||||
])
|
||||
->columns(1),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -118,7 +151,7 @@ class InventarioPrendaResource extends Resource
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
RelationManagers\DistribucionesRelationManager::class,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user