Files
hr/app/Filament/Resources/Shifts/Schemas/ShiftInfolist.php

50 lines
1.7 KiB
PHP

<?php
namespace App\Filament\Resources\Shifts\Schemas;
use App\Models\Shift;
use Filament\Infolists\Components\IconEntry;
use Filament\Infolists\Components\TextEntry;
use Filament\Schemas\Schema;
class ShiftInfolist
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
TextEntry::make('name')
->label(__('hr.fields.name')),
TextEntry::make('code')
->label(__('hr.fields.code')),
TextEntry::make('starts_at')
->label(__('hr.fields.starts_at'))
->time()
->placeholder('-'),
TextEntry::make('ends_at')
->label(__('hr.fields.ends_at'))
->time()
->placeholder('-'),
TextEntry::make('description')
->label(__('hr.fields.description'))
->placeholder('-')
->columnSpanFull(),
IconEntry::make('is_active')
->label(__('hr.fields.status'))
->boolean(),
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 (Shift $record): bool => $record->trashed()),
]);
}
}