2026-04-03 04:22:34 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Filament\Resources\Divisions\Schemas;
|
|
|
|
|
|
2026-04-05 22:29:15 +07:00
|
|
|
use App\Models\User;
|
|
|
|
|
use Filament\Forms\Components\Select;
|
2026-04-03 04:22:34 +07:00
|
|
|
use Filament\Forms\Components\Textarea;
|
|
|
|
|
use Filament\Forms\Components\TextInput;
|
|
|
|
|
use Filament\Schemas\Schema;
|
|
|
|
|
|
|
|
|
|
class DivisionForm
|
|
|
|
|
{
|
|
|
|
|
public static function configure(Schema $schema): Schema
|
|
|
|
|
{
|
|
|
|
|
return $schema->components([
|
|
|
|
|
TextInput::make('name')->label('Nama')->required(),
|
|
|
|
|
Textarea::make('description')->label('Deskripsi')->rows(3)->columnSpanFull(),
|
2026-04-05 22:29:15 +07:00
|
|
|
Select::make('leader_id')->label('Penanggung Jawab')
|
|
|
|
|
->options(
|
|
|
|
|
User::role('pengurus')->where('status', 'aktif')->pluck('name', 'id')
|
|
|
|
|
)
|
|
|
|
|
->searchable()
|
|
|
|
|
->nullable(),
|
2026-04-03 04:22:34 +07:00
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
}
|