33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Audits\Schemas;
|
|
|
|
use App\Models\User;
|
|
use Filament\Forms\Components\Select;
|
|
use Filament\Forms\Components\Textarea;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class AuditForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema->components([
|
|
Select::make('auditor_id')->label('Auditor')
|
|
->options(User::pluck('name', 'id'))
|
|
->searchable()
|
|
->required(),
|
|
TextInput::make('model_type')->label('Tipe Model')->required(),
|
|
TextInput::make('model_id')->label('ID Model')->numeric()->required(),
|
|
Select::make('issue_type')->label('Jenis Temuan')
|
|
->options(['warning' => 'Peringatan', 'critical' => 'Kritis'])
|
|
->required(),
|
|
Textarea::make('description')->label('Deskripsi')->rows(3)->required()->columnSpanFull(),
|
|
Select::make('status')
|
|
->options(['open' => 'Terbuka', 'resolved' => 'Selesai'])
|
|
->default('open')
|
|
->required(),
|
|
]);
|
|
}
|
|
}
|