@extends('layouts.app') @section('title', 'سجل التدقيق - '.config('app.name')) @section('breadcrumb') الرئيسية سجل التدقيق @endsection @push('styles') @endpush @section('content') @php $userOptions = collect($users)->map(fn ($u) => ['value' => $u->id, 'label' => trim($u->name.' — '.$u->email)])->values()->all(); $moduleOptions = ($source === 'control' ? collect($controlModules)->map(fn ($label, $value) => ['value' => $value, 'label' => $label]) : collect($trailModules)->map(fn ($label, $value) => ['value' => $value, 'label' => $label]) )->values()->all(); $actionOptions = ($source === 'control' ? collect($controlActions)->map(fn ($label, $value) => ['value' => $value, 'label' => $label]) : collect($trailActions)->map(fn ($label, $value) => ['value' => $value, 'label' => $label]) )->values()->all(); @endphp

سجل التدقيق

تتبع تغييرات البيانات وأحداث التحكم المالي — مع فلاتر حسب المستخدم، الموديول، نوع العملية، والفترة.

لوحة الأدمن
مسح
@forelse($logs as $log) @if($source === 'control') @php $moduleKey = \App\Support\AuditModuleCatalog::controlModuleForAction((string) $log->action); $moduleLabel = \App\Support\AuditModuleCatalog::controlModuleLabel($moduleKey); $actionLabel = \App\Support\AuditModuleCatalog::controlActionLabel((string) $log->action); @endphp @else @php $actionClass = match($log->action) { 'create' => 'audit-pill-create', 'delete' => 'audit-pill-delete', 'complete' => 'audit-pill-complete', default => 'audit-pill-update', }; @endphp @endif @empty @endforelse
التاريخ المستخدم الموديول العملية السجل التفاصيل
{{ $log->logged_at?->format('Y-m-d H:i') ?? $log->created_at->format('Y-m-d H:i') }}
{{ $log->actor?->name ?? '—' }}
{{ $log->actor?->email }}
{{ $moduleLabel }} {{ $actionLabel }} @if($log->targetUser && (int) $log->target_user_id !== (int) $log->actor_id) مستهدف: {{ $log->targetUser->name }} @elseif($log->subject_id) #{{ $log->subject_id }} @else — @endif @if(is_array($log->meta) && count($log->meta) > 0)
عرض البيانات
{{ json_encode($log->meta, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) }}
@elseif($log->old_role || $log->new_role) {{ $log->old_role ?? '—' }} → {{ $log->new_role ?? '—' }} @else @endif
{{ $log->created_at->format('Y-m-d H:i') }}
{{ $log->user?->name ?? '—' }}
{{ $log->user?->email }}
{{ \App\Support\AuditModuleCatalog::trailModuleLabel((string) $log->table_name) }} {{ \App\Support\AuditModuleCatalog::trailActionLabel((string) $log->action) }} #{{ $log->record_id ?? '—' }}
لا توجد سجلات مطابقة للفلاتر المحددة.
@if($logs->hasPages())
{{ $logs->links() }}
@endif
@endsection