feat: tambah penanggung jawab divisi (leader_id) dari role pengurus

This commit is contained in:
2026-04-05 22:29:15 +07:00
parent 438fb96561
commit b77a67edbf
4 changed files with 38 additions and 1 deletions
@@ -2,6 +2,8 @@
namespace App\Filament\Resources\Divisions\Schemas;
use App\Models\User;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Schema;
@@ -13,6 +15,12 @@ class DivisionForm
return $schema->components([
TextInput::make('name')->label('Nama')->required(),
Textarea::make('description')->label('Deskripsi')->rows(3)->columnSpanFull(),
Select::make('leader_id')->label('Penanggung Jawab')
->options(
User::role('pengurus')->where('status', 'aktif')->pluck('name', 'id')
)
->searchable()
->nullable(),
]);
}
}