@section('title', __('dashboard::audit.show_title') . ' - FuelPlus') @section('page-title', __('dashboard::audit.show_title')) @section('page-description', __('dashboard::audit.show_description') ?? 'View comprehensive event details')

{{ __('dashboard::audit.event_details') }}

{{ __('dashboard::audit.event_id') }}: #{{ $auditLog->id }}

@php $severityClass = match($auditLog->severity) { 'critical' => 'bg-red-100 text-red-800 border-red-200', 'high' => 'bg-orange-100 text-orange-800 border-orange-200', 'medium' => 'bg-yellow-100 text-yellow-800 border-yellow-200', 'low' => 'bg-blue-100 text-blue-800 border-blue-200', default => 'bg-gray-100 text-gray-800 border-gray-200' }; @endphp {{ __('dashboard::audit.severity.' . $auditLog->severity, ['default' => $auditLog->severity]) }}

{{ __('dashboard::audit.event_overview') }}

{{ $auditLog->action }}

{{ $auditLog->operation_type ?? __('dashboard::audit.not_specified') }}

@if($auditLog->status === 'success') ✅ {{ __('dashboard::audit.success') }} @elseif($auditLog->status === 'failed') ❌ {{ __('dashboard::audit.failed') }} @else ⏳ {{ __('dashboard::audit.pending') }} @endif

@if($auditLog->execution_time) {{ number_format($auditLog->execution_time * 1000, 2) }} {{ __('dashboard::audit.milliseconds') }} @else {{ __('dashboard::audit.not_specified') }} @endif

{{ __('dashboard::audit.event_description') }}

{{ $auditLog->description }}

@if($auditLog->description_ar && $auditLog->description_ar !== $auditLog->description)

{{ $auditLog->description_ar }}

@endif
@if($auditLog->request_data)

{{ __('dashboard::audit.request_data') }}

{{ json_encode($auditLog->request_data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}
@endif @if($auditLog->old_values || $auditLog->new_values)

{{ __('dashboard::audit.changes') }}

@if($auditLog->old_values)
{{ json_encode($auditLog->old_values, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}
@endif @if($auditLog->new_values)
{{ json_encode($auditLog->new_values, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}
@endif
@endif @if($auditLog->error_message)

{{ __('dashboard::audit.error_message') }}

{{ $auditLog->error_message }}

@endif @if($auditLog->metadata)

{{ __('dashboard::audit.additional_info') }}

{{ json_encode($auditLog->metadata, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}
@endif

{{ __('dashboard::audit.event_info') }}

{{ $auditLog->performed_at->format('Y/m/d H:i:s') }}

{{ $auditLog->performed_at->diffForHumans() }}

{{ $auditLog->user_name ?? __('dashboard::audit.system') }}

@if($auditLog->user_id)

{{ __('dashboard::audit.user_id') }}: {{ $auditLog->user_id }}

@endif
@if($auditLog->company_id)

{{ $auditLog->company->name ?? __('dashboard::audit.not_specified') }}

{{ __('dashboard::audit.company_id') }}: {{ $auditLog->company_id }}

@endif @if($auditLog->station_id)

{{ $auditLog->station->name ?? __('dashboard::audit.not_specified') }}

{{ __('dashboard::audit.station_id') }}: {{ $auditLog->station_id }}

@endif @if($auditLog->request_id)

{{ $auditLog->request_id }}

@endif @if($auditLog->is_sensitive)
{{ __('dashboard::audit.sensitive_operation') }}
@endif
@if($auditLog->request_id) @php $relatedEvents = \App\Models\AuditLog::where('request_id', $auditLog->request_id) ->where('id', '!=', $auditLog->id) ->orderBy('performed_at', 'desc') ->limit(5) ->get(); @endphp @if($relatedEvents->count() > 0)

{{ __('dashboard::audit.related_events') }}

@endif @endif

{{ __('dashboard::audit.actions') }}