32 lines
1002 B
PHP
32 lines
1002 B
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
|
|
->components([
|
|
HrForm::employeeSelect(),
|
|
HrForm::leaveDatePicker('start_date', 'Start Date'),
|
|
HrForm::leaveDatePicker('end_date', 'End Date'),
|
|
HrForm::leaveDaysDisplay(),
|
|
TextInput::make('medical_institution')
|
|
->maxLength(255),
|
|
Textarea::make('reason')
|
|
->rows(3)
|
|
->columnSpanFull(),
|
|
HrForm::fileUpload('document_path')
|
|
->label('Medical Document')
|
|
->acceptedFileTypes(['application/pdf', 'image/*'])
|
|
->maxSize(10240),
|
|
]);
|
|
}
|
|
}
|