29 lines
1.2 KiB
PHP
29 lines
1.2 KiB
PHP
<?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(),
|
||
TextInput::make('budget')->label('Estimasi Budget (Rp)')->numeric()
|
||
->helperText('Kosongkan jika tidak ada budget. < Rp500.000: langsung | Rp500.000–2.000.000: approval ketua | > Rp2.000.000: voting'),
|
||
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'),
|
||
]);
|
||
}
|
||
}
|