38 lines
1.1 KiB
PHP
38 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Bonuses\Schemas;
|
|
|
|
use App\Models\Bonus;
|
|
use Filament\Infolists\Components\TextEntry;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class BonusInfolist
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
TextEntry::make('employee.id')
|
|
->label(__('hr.fields.employee')),
|
|
TextEntry::make('bonus_date')
|
|
->date(),
|
|
TextEntry::make('bonus_type')
|
|
->badge(),
|
|
TextEntry::make('amount')
|
|
->numeric(),
|
|
TextEntry::make('reason')
|
|
->placeholder('-')
|
|
->columnSpanFull(),
|
|
TextEntry::make('created_at')
|
|
->dateTime()
|
|
->placeholder('-'),
|
|
TextEntry::make('updated_at')
|
|
->dateTime()
|
|
->placeholder('-'),
|
|
TextEntry::make('deleted_at')
|
|
->dateTime()
|
|
->visible(fn (Bonus $record): bool => $record->trashed()),
|
|
]);
|
|
}
|
|
}
|