Auditoría del registro

Últimos movimientos sobre este documento.
@if(auth()->user()?->hasPermission('auditoria.view')) Ir a auditoría @endif
@if($auditLogs->isEmpty())
No hay eventos de auditoría registrados para este documento.
@else
@foreach($auditLogs as $log)
{{ strtoupper($log->accion) }}
{{ optional($log->user)->name ?? optional($log->user)->email ?? 'Sistema' }} · {{ $log->modulo }}
{{ optional($log->created_at)->format('Y-m-d H:i') }}
@if($log->valor_anterior_json || $log->valor_nuevo_json)
Detalle {{ json_encode(['antes' => $log->valor_anterior_json, 'despues' => $log->valor_nuevo_json], JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT) }}
@endif
@endforeach
@endif