34 lines
1.2 KiB
PHP
34 lines
1.2 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Filament\Resources\Activities\Schemas;
|
||
|
|
|
||
|
|
use App\Models\User;
|
||
|
|
use Filament\Forms\Components\DatePicker;
|
||
|
|
use Filament\Forms\Components\DateTimePicker;
|
||
|
|
use Filament\Forms\Components\Select;
|
||
|
|
use Filament\Forms\Components\Textarea;
|
||
|
|
use Filament\Forms\Components\TextInput;
|
||
|
|
use Filament\Schemas\Schema;
|
||
|
|
|
||
|
|
class ActivityForm
|
||
|
|
{
|
||
|
|
public static function configure(Schema $schema): Schema
|
||
|
|
{
|
||
|
|
return $schema->components([
|
||
|
|
TextInput::make('title')->label('Judul')->required(),
|
||
|
|
Textarea::make('description')->label('Deskripsi')->rows(3)->columnSpanFull(),
|
||
|
|
DatePicker::make('start_date')->label('Mulai')->required(),
|
||
|
|
DatePicker::make('end_date')->label('Selesai')->required(),
|
||
|
|
Select::make('participants')
|
||
|
|
->label('Peserta')
|
||
|
|
->relationship('participants', 'name')
|
||
|
|
->multiple()
|
||
|
|
->preload()
|
||
|
|
->searchable()
|
||
|
|
->columnSpanFull(),
|
||
|
|
DateTimePicker::make('executed_at')->label('Waktu Pelaksanaan'),
|
||
|
|
Textarea::make('execution_notes')->label('Catatan Pelaksanaan')->rows(3)->columnSpanFull(),
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
}
|