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,45 @@
<?php
declare(strict_types=1);
namespace App\Filament\Resources\ActivityLogs\Schemas;
use Filament\Infolists\Components\KeyValueEntry;
use Filament\Infolists\Components\TextEntry;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Schema;
class ActivityLogInfolist
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
Section::make('Activity Details')
->schema([
TextEntry::make('created_at')
->label('Date')
->dateTime(),
TextEntry::make('description'),
TextEntry::make('event')
->badge(),
TextEntry::make('log_name')
->label('Log Name'),
TextEntry::make('subject_type')
->label('Subject Type')
->formatStateUsing(fn (?string $state): string => $state ? class_basename($state) : '—'),
TextEntry::make('subject_id')
->label('Subject ID'),
TextEntry::make('causer.name')
->label('Causer'),
KeyValueEntry::make('properties.attributes')
->label('Changes')
->visible(fn ($record): bool => filled($record->properties['attributes'] ?? null)),
KeyValueEntry::make('properties.old')
->label('Previous Values')
->visible(fn ($record): bool => filled($record->properties['old'] ?? null)),
])
->columns(2),
]);
}
}