diff --git a/app/Filament/Resources/OjalPresillaResource.php b/app/Filament/Resources/OjalPresillaResource.php index 83a3a71..0156d6a 100644 --- a/app/Filament/Resources/OjalPresillaResource.php +++ b/app/Filament/Resources/OjalPresillaResource.php @@ -153,24 +153,9 @@ class OjalPresillaResource extends Resource Select::make('proveedor_id') ->label('Proveedor/Usuario Principal') - ->relationship('proveedor', 'nombre', fn(\Illuminate\Database\Eloquent\Builder $q) => $q->where('categoria', 'empleado')) + ->options(fn() => \App\Models\Proveedor::where('categoria', 'empleado')->pluck('nombre', 'id')) ->searchable() ->preload() - ->createOptionForm([ - Forms\Components\TextInput::make('nombre') - ->required() - ->maxLength(255), - Forms\Components\TextInput::make('contacto') - ->maxLength(255), - Forms\Components\TextInput::make('telefono') - ->maxLength(50), - Forms\Components\Select::make('categoria') - ->options([ - 'empleado' => 'Empleado', - ]) - ->default('empleado') - ->required(), - ]) ->required() ->helperText('Selecciona el empleado responsable del proceso'),