35 lines
1.0 KiB
PHP
35 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Explanations\Schemas;
|
|
|
|
use App\Filament\Support\HrForm;
|
|
use Filament\Forms\Components\DatePicker;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Forms\Components\Textarea;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class ExplanationForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
HrForm::employeeSelect(),
|
|
DatePicker::make('explanation_date')
|
|
->required()
|
|
->default(now()),
|
|
TextInput::make('reason')
|
|
->required()
|
|
->maxLength(255),
|
|
Textarea::make('description')
|
|
->required()
|
|
->rows(4)
|
|
->columnSpanFull(),
|
|
HrForm::fileUpload('attachment_path')
|
|
->label('Attachment')
|
|
->acceptedFileTypes(['application/pdf', 'image/*'])
|
|
->maxSize(10240),
|
|
]);
|
|
}
|
|
}
|