28 lines
862 B
PHP
28 lines
862 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Filament\Resources\Approvals\Schemas;
|
||
|
|
|
||
|
|
use Filament\Forms\Components\Select;
|
||
|
|
use Filament\Forms\Components\TextInput;
|
||
|
|
use Filament\Schemas\Schema;
|
||
|
|
|
||
|
|
class ApprovalForm
|
||
|
|
{
|
||
|
|
public static function configure(Schema $schema): Schema
|
||
|
|
{
|
||
|
|
return $schema->components([
|
||
|
|
TextInput::make('model_type')->label('Tipe Model')->required(),
|
||
|
|
TextInput::make('model_id')->label('ID Model')->numeric()->required(),
|
||
|
|
TextInput::make('required_approvals')->label('Jumlah Persetujuan')->numeric()->default(1),
|
||
|
|
Select::make('status')
|
||
|
|
->options([
|
||
|
|
'pending' => 'Pending',
|
||
|
|
'approved' => 'Disetujui',
|
||
|
|
'rejected' => 'Ditolak',
|
||
|
|
])
|
||
|
|
->default('pending')
|
||
|
|
->required(),
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
}
|