{{ __('messages.clear') }}
@forelse ($activities as $activity) @empty @endforelse
# {{ __('messages.date') }} {{ __('messages.time') }} {{ __('messages.user') }} {{ __('messages.event_type') }} {{ __('messages.description') }} {{ __('messages.actions') }}
{{ ($activities->perPage() * ($activities->currentPage() - 1)) + $loop->iteration }} {{ $activity->created_at?->format('Y-m-d') ?? '-' }} {{ $activity->created_at?->format('H:i') ?? '-' }} {{ $activity->causer?->name ?? __('messages.system') }} $activity->event === 'created', 'bg-warning/10 text-warning' => $activity->event === 'updated', 'bg-danger/10 text-danger' => $activity->event === 'deleted', 'bg-muted text-muted-foreground' => ! in_array($activity->event, ['created', 'updated', 'deleted'], true), ]) > {{ $activity->event ?? '-' }} {{ $activity->description }} @php($oldValues = $activity->properties['old'] ?? []) @php($newValues = $activity->properties['attributes'] ?? []) @if ($activity->event === 'updated' && $oldValues !== [])

{{ __('messages.change_details') }}

@foreach ($oldValues as $key => $value) @endforeach
{{ __('messages.field') }} {{ __('messages.previous_value') }} {{ __('messages.new_value') }}
{{ $key }} {{ is_scalar($value) ? $value : json_encode($value, JSON_UNESCAPED_UNICODE) }} {{ array_key_exists($key, $newValues) ? (is_scalar($newValues[$key]) ? $newValues[$key] : json_encode($newValues[$key], JSON_UNESCAPED_UNICODE)) : '-' }}
@else {{ __('messages.no_changes') }} @endif
{{ __('messages.no_matching_results') }}
{{ $activities->links() }}