@include('admin.pages.reports.print.header') @foreach($data as $audit) @php $changes = $audit['old_values'] ?? []; $newChanges = $audit['new_values'] ?? []; $rowspan = $audit['event']!='deleted'?max(1, count($newChanges)):max(1, count($changes)); $types = [ 'App\Models\StudentTransactionDetail' => 'Student Transactions', 'App\Models\TeacherTransactionDetail' => 'Teacher Transactions', 'App\Models\Finance' => 'Finances' ]; @endphp @foreach($audit['event']!='deleted'?$newChanges:$changes as $field => $newValue) @if (!$loop->first) @endif @if ($audit['event']!='deleted') @else @endif @endforeach @endforeach
{{ __('Date & Time') }} {{ __('Type') }} {{ __('User Name') }} {{ __('Event') }} {{ __('Name') }} {{ __("Changes") }}
{{ __('Field') }} {{ __('Old Value') }} {{ __('New Value') }}
{{ date('Y-m-d H:i:s', strtotime($audit['created_at'])) }} {{ __($types[$audit['auditable_type']]) }} {{ $audit['admin_name'] }} {{ __($audit['event']) }} {{$audit['custom_name']}}
{{ __($field) }} {{ !in_array($field, $audit['replacable_fields'])?($changes[$field] ?? '-'):$audit['old_status'] }}{{ !in_array($field, $audit['replacable_fields'])?(is_array($newValue) ? json_encode($newValue) : $newValue):$audit['new_status'] }}
@include('admin.pages.reports.print.footer')