Files
hr/app/Filament/Resources/SickLeaves/Schemas/SickLeaveForm.php

41 lines
1.3 KiB
PHP

<?php
namespace App\Filament\Resources\SickLeaves\Schemas;
use App\Filament\Support\HrForm;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Textarea;
use Filament\Schemas\Schema;
class SickLeaveForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->columns(3)
->components([
HrForm::employeeSelect(),
HrForm::leaveDatePicker('start_date', __('hr.fields.start_date'))
->native(false),
HrForm::leaveDatePicker('end_date', __('hr.fields.end_date'))
->native(false),
TextInput::make('medical_institution')
->label(__('hr.fields.institution'))
->maxLength(255)
->columnSpan(2),
HrForm::leaveDaysDisplay(),
Textarea::make('reason')
->label(__('hr.fields.reason'))
->rows(3)
->columnSpanFull(),
HrForm::fileUpload('document_path')
->label(__('hr.fields.medical_document'))
->acceptedFileTypes(['application/pdf', 'image/*'])
->maxSize(10240),
]);
}
}