From 580d908f937a01aa46f16fb312941cef73a46609 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Wed, 4 Feb 2026 16:50:25 -0500 Subject: [PATCH] Update OjalPresillaResource.php --- app/Filament/Resources/OjalPresillaResource.php | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) 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'),