{{-- Page Header --}}

Audit Trail & Activity Log

Track system activities, record modifications, and user actions.

{{-- KPI / Statistics Row (Compact & Modern) --}}
Today's Activities

{{ number_format($totalLogsToday) }}

Transactions & actions recorded today
This Week's Activities

{{ number_format($totalLogsWeek) }}

Actions recorded in the last 7 days
Total Audit Logs

{{ number_format($totalLogsAll) }}

All logged activities stored in system
{{-- Filter & Search Card (Compact) --}}
{{-- Search --}}
{{-- Module Filter --}}
{{-- Event Filter --}}
{{-- User / Admin Filter --}}
{{-- Date Filter --}}
{{-- Reset Button --}}
{{-- Custom Date Range Fields (Conditional) --}} @if ($dateFilter === 'custom')
@endif
{{-- Activity Log Table Card --}}
Audit Trail Records
Show:
@forelse ($activities as $act) {{-- Timestamp --}} {{-- Causer / User --}} {{-- Module / Log Name --}} {{-- Event Badge --}} {{-- Description --}} {{-- Actions --}} @empty @endforelse
Date & Time Causer / User Module Action Activity Description Details
{{ $act->created_at->format('d/m/Y H:i') }}
{{ $act->created_at->diffForHumans() }}
@if ($act->causer)
{{ strtoupper(substr($act->causer->name ?? 'A', 0, 1)) }}
{{ $act->causer->name }}
{{ $act->causer->email }}
@else System / Automation @endif
@php $modLabels = [ 'season-pass' => ['name' => 'Season Pass', 'class' => 'bg-info-subtle text-info border-info-subtle'], 'season-payment' => ['name' => 'Payment', 'class' => 'bg-success-subtle text-success border-success-subtle'], 'season-bay' => ['name' => 'Season Bay', 'class' => 'bg-primary-subtle text-primary border-primary-subtle'], 'season-rate' => ['name' => 'Season Rate', 'class' => 'bg-warning-subtle text-warning border-warning-subtle'], 'staff' => ['name' => 'Staff', 'class' => 'bg-purple-subtle text-purple border-purple-subtle'], ]; $mMeta = $modLabels[$act->log_name] ?? ['name' => ucwords(str_replace('-', ' ', $act->log_name ?: 'General')), 'class' => 'bg-light text-dark border']; @endphp {{ $mMeta['name'] }} @php $eventClasses = [ 'created' => 'bg-success text-white', 'approved' => 'bg-success text-white', 'updated' => 'bg-primary text-white', 'rejected' => 'bg-danger text-white', 'terminated' => 'bg-dark text-white', 'deleted' => 'bg-danger text-white', ]; $eClass = $eventClasses[$act->event] ?? 'bg-secondary text-white'; @endphp {{ $act->event ?: 'Action' }}
{{ $act->description }}
@if ($act->subject_type)
{{ class_basename($act->subject_type) }} #{{ $act->subject_id }}
@endif
No Audit Records Found

No activity logs matched the selected filter criteria.

{{-- Pagination --}} @if ($activities->hasPages()) @endif
{{-- Detail Modal (Diff Viewer) --}} @if ($showDetailModal && $this->selectedActivity) @php $act = $this->selectedActivity; $props = $act->properties ? $act->properties->toArray() : []; $attributes = $props['attributes'] ?? []; $old = $props['old'] ?? []; @endphp @endif