2026-04-03 04:22:34 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Filament\Resources\Activities\Schemas;
|
|
|
|
|
|
|
|
|
|
use Filament\Forms\Components\DatePicker;
|
|
|
|
|
use Filament\Forms\Components\DateTimePicker;
|
|
|
|
|
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(),
|
2026-04-04 09:17:14 +07:00
|
|
|
DateTimePicker::make('executed_at')->label('Waktu Pelaksanaan')
|
|
|
|
|
->visible(fn ($record) => $record?->status === 'approved'),
|
|
|
|
|
Textarea::make('execution_notes')->label('Catatan Pelaksanaan')->rows(3)->columnSpanFull()
|
|
|
|
|
->visible(fn ($record) => $record?->status === 'approved'),
|
2026-04-03 04:22:34 +07:00
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
}
|