33 lines
1.0 KiB
PHP
33 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\EmployeeDocuments\Schemas;
|
|
|
|
use App\Enums\DocumentType;
|
|
use App\Filament\Support\HrForm;
|
|
use Filament\Forms\Components\Select;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class EmployeeDocumentForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
HrForm::employeeSelect(),
|
|
Select::make('document_type')
|
|
->options(DocumentType::class)
|
|
->required()
|
|
->native(false),
|
|
TextInput::make('title')
|
|
->required()
|
|
->maxLength(255),
|
|
HrForm::fileUpload('file_path')
|
|
->label('Document')
|
|
->required()
|
|
->acceptedFileTypes(['application/pdf', 'image/*', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'])
|
|
->maxSize(15360),
|
|
]);
|
|
}
|
|
}
|