feat: tambah Filament 5 resources dengan schemas dan tables
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?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(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user