base commit

This commit is contained in:
Mekan1206
2026-07-30 17:24:40 +05:00
commit a794dacd39
345 changed files with 29597 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace App\Filament\Resources\Vacations\Schemas;
use App\Enums\VacationType;
use App\Filament\Support\HrForm;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Textarea;
use Filament\Schemas\Schema;
class VacationForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
HrForm::employeeSelect(),
Select::make('type')
->options(VacationType::class)
->required()
->native(false),
HrForm::leaveDatePicker('start_date', 'Start Date'),
HrForm::leaveDatePicker('end_date', 'End Date'),
DatePicker::make('return_date')
->label('Return Date'),
HrForm::leaveDaysDisplay(),
Textarea::make('reason')
->rows(3)
->columnSpanFull(),
HrForm::fileUpload('attachment_path')
->label('Attachment')
->acceptedFileTypes(['application/pdf', 'image/*'])
->maxSize(10240),
]);
}
}

View File

@@ -0,0 +1,52 @@
<?php
namespace App\Filament\Resources\Vacations\Schemas;
use App\Models\Vacation;
use Filament\Infolists\Components\TextEntry;
use Filament\Schemas\Schema;
class VacationInfolist
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
TextEntry::make('employee.id')
->label('Employee'),
TextEntry::make('type')
->badge(),
TextEntry::make('start_date')
->date(),
TextEntry::make('end_date')
->date(),
TextEntry::make('return_date')
->date()
->placeholder('-'),
TextEntry::make('days')
->numeric(),
TextEntry::make('status')
->badge(),
TextEntry::make('reason')
->placeholder('-')
->columnSpanFull(),
TextEntry::make('attachment_path')
->placeholder('-'),
TextEntry::make('approved_by')
->numeric()
->placeholder('-'),
TextEntry::make('approved_at')
->dateTime()
->placeholder('-'),
TextEntry::make('created_at')
->dateTime()
->placeholder('-'),
TextEntry::make('updated_at')
->dateTime()
->placeholder('-'),
TextEntry::make('deleted_at')
->dateTime()
->visible(fn (Vacation $record): bool => $record->trashed()),
]);
}
}