32 lines
886 B
PHP
32 lines
886 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\WorkCalendars\Schemas;
|
|
|
|
use App\Enums\WorkDayType;
|
|
use Filament\Forms\Components\DatePicker;
|
|
use Filament\Forms\Components\Select;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class WorkCalendarForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
DatePicker::make('date')
|
|
->label('Dátum')
|
|
->required()
|
|
->native(false)
|
|
->displayFormat('Y-m-d'),
|
|
Select::make('type')
|
|
->label('Típus')
|
|
->options(WorkDayType::class)
|
|
->required(),
|
|
TextInput::make('description')
|
|
->label('Leírás')
|
|
->maxLength(255),
|
|
]);
|
|
}
|
|
}
|