Files
hr/app/Filament/Resources/Vacations/Schemas/VacationInfolist.php

66 lines
2.4 KiB
PHP

<?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(__('hr.fields.employee')),
TextEntry::make('type')
->label(__('hr.fields.type'))
->badge(),
TextEntry::make('start_date')
->label(__('hr.fields.start_date'))
->date(),
TextEntry::make('end_date')
->label(__('hr.fields.end_date'))
->date(),
TextEntry::make('return_date')
->label(__('hr.fields.return_date'))
->date()
->placeholder('-'),
TextEntry::make('days')
->label(__('hr.fields.days'))
->numeric(),
TextEntry::make('status')
->label(__('hr.fields.status'))
->badge(),
TextEntry::make('reason')
->label(__('hr.fields.reason'))
->placeholder('-')
->columnSpanFull(),
TextEntry::make('attachment_path')
->label(__('hr.fields.attachment'))
->placeholder('-'),
TextEntry::make('approved_by')
->label(__('hr.fields.approved_by'))
->numeric()
->placeholder('-'),
TextEntry::make('approved_at')
->label(__('hr.fields.approved_at'))
->dateTime()
->placeholder('-'),
TextEntry::make('created_at')
->label(__('hr.fields.created_at'))
->dateTime()
->placeholder('-'),
TextEntry::make('updated_at')
->label(__('hr.fields.updated_at'))
->dateTime()
->placeholder('-'),
TextEntry::make('deleted_at')
->label(__('hr.fields.deleted_at'))
->dateTime()
->visible(fn (Vacation $record): bool => $record->trashed()),
]);
}
}