41 lines
1.3 KiB
PHP
41 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\DisciplinaryReports\Schemas;
|
|
|
|
use App\Enums\DisciplinarySeverity;
|
|
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 DisciplinaryReportForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
HrForm::employeeSelect(),
|
|
DatePicker::make('report_date')
|
|
->required()
|
|
->default(now()),
|
|
TextInput::make('title')
|
|
->required()
|
|
->maxLength(255),
|
|
Textarea::make('description')
|
|
->required()
|
|
->rows(4)
|
|
->columnSpanFull(),
|
|
Select::make('severity')
|
|
->options(DisciplinarySeverity::class)
|
|
->required()
|
|
->native(false),
|
|
HrForm::fileUpload('attachment_path')
|
|
->label('Attachment')
|
|
->acceptedFileTypes(['application/pdf', 'image/*'])
|
|
->maxSize(10240),
|
|
]);
|
|
}
|
|
}
|