@extends('layouts.app')
@section('title','Audit Event') @section('page_title','Audit Event')
@section('content')<div class="page-header"><div><h1>{{ ucfirst($audit->action) }} · {{ $audit->module }}</h1><p class="muted">{{ $audit->occurred_at?->format('d M Y H:i:s') }} by {{ $audit->user?->name }}</p></div><a class="btn btn-secondary" href="{{ route('audit.index') }}">Back</a></div><div class="grid grid-2"><div class="card"><div class="card-header"><h3>Event Details</h3></div><div class="card-body"><dl class="detail-list"><dt>User</dt><dd>{{ $audit->user?->name }} ({{ $audit->user?->email }})</dd><dt>Action</dt><dd>{{ $audit->action }}</dd><dt>Module</dt><dd>{{ $audit->module }}</dd><dt>Record</dt><dd>{{ $audit->record_type }} #{{ $audit->record_id }}</dd><dt>Reason</dt><dd>{{ $audit->reason ?: '—' }}</dd><dt>IP</dt><dd>{{ $audit->ip_address }}</dd><dt>User Agent</dt><dd>{{ $audit->user_agent }}</dd></dl></div></div><div><div class="card"><div class="card-header"><h3>Previous Values</h3></div><div class="card-body"><pre class="json-view">{{ json_encode($audit->old_values,JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES) }}</pre></div></div><div class="card" style="margin-top:20px"><div class="card-header"><h3>New Values</h3></div><div class="card-body"><pre class="json-view">{{ json_encode($audit->new_values,JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES) }}</pre></div></div></div></div>@endsection
