39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Bonuses\Schemas;
|
|
|
|
use App\Enums\BonusType;
|
|
use App\Filament\Support\HrForm;
|
|
use Filament\Forms\Components\DatePicker;
|
|
use Filament\Forms\Components\Select;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Forms\Components\Textarea;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class BonusForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
HrForm::employeeSelect(),
|
|
DatePicker::make('bonus_date')
|
|
->required()
|
|
->default(now()),
|
|
Select::make('bonus_type')
|
|
->options(BonusType::class)
|
|
->required()
|
|
->native(false),
|
|
TextInput::make('amount')
|
|
->required()
|
|
->numeric()
|
|
->prefix('TMT')
|
|
->minValue(0)
|
|
->step(0.01),
|
|
Textarea::make('reason')
|
|
->rows(3)
|
|
->columnSpanFull(),
|
|
]);
|
|
}
|
|
}
|