41 lines
1.2 KiB
PHP
41 lines
1.2 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'),
|
|
TextEntry::make('code'),
|
|
TextEntry::make('starts_at')
|
|
->time()
|
|
->placeholder('-'),
|
|
TextEntry::make('ends_at')
|
|
->time()
|
|
->placeholder('-'),
|
|
TextEntry::make('description')
|
|
->placeholder('-')
|
|
->columnSpanFull(),
|
|
IconEntry::make('is_active')
|
|
->boolean(),
|
|
TextEntry::make('created_at')
|
|
->dateTime()
|
|
->placeholder('-'),
|
|
TextEntry::make('updated_at')
|
|
->dateTime()
|
|
->placeholder('-'),
|
|
TextEntry::make('deleted_at')
|
|
->dateTime()
|
|
->visible(fn (Shift $record): bool => $record->trashed()),
|
|
]);
|
|
}
|
|
}
|