@extends('layouts.app') @section('title', 'تفاصيل سجل التدقيق') @section('content')
{{-- Page Header --}}

تفاصيل سجل التدقيق

عرض تفاصيل التغيير رقم #{{ $activity->id }}

العودة للسجل
{{-- Summary Card --}}

معلومات العملية

{{-- Date --}}
التاريخ والوقت
{{ $activity->created_at->format('Y/m/d H:i:s') }}
{{-- User --}}
المستخدم
{{ $activity->causer?->name ?? 'النظام' }}
{{-- Event --}}
نوع الحدث
@switch($activity->event) @case('created') إنشاء @break @case('updated') تعديل @break @case('deleted') حذف @break @default {{ $activity->event }} @endswitch
{{-- Model --}}
النموذج
{{ $modelLabels[$activity->subject_type] ?? class_basename($activity->subject_type ?? '') }} #{{ $activity->subject_id }}
{{-- Description --}}
الوصف
{{ $activity->description }}
{{-- Changes Diff --}} @if(!empty($oldValues) || !empty($newValues))

تفاصيل التغييرات

@if($activity->event !== 'created' && $activity->event !== 'deleted') @endif @if($activity->event === 'created') {{-- Show created values --}} @foreach($newValues as $field => $value) @endforeach @elseif($activity->event === 'deleted') {{-- Show deleted values --}} @foreach($oldValues as $field => $value) @endforeach @else {{-- Show updated values side-by-side --}} @php $allFields = array_unique(array_merge(array_keys($oldValues), array_keys($newValues))); @endphp @foreach($allFields as $field) @php $isChanged = in_array($field, $changedFields); $oldVal = $oldValues[$field] ?? '—'; $newVal = $newValues[$field] ?? '—'; @endphp @endforeach @endif
الحقل @if($activity->event === 'created') القيمة @else القيمة القديمة @endif القيمة الجديدة
{{ $field }} {{ is_array($value) ? json_encode($value, JSON_UNESCAPED_UNICODE) : $value }}
{{ $field }} {{ is_array($value) ? json_encode($value, JSON_UNESCAPED_UNICODE) : $value }}
{{ $field }} @if($isChanged) @endif
{{ is_array($oldVal) ? json_encode($oldVal, JSON_UNESCAPED_UNICODE) : $oldVal }} {{ is_array($newVal) ? json_encode($newVal, JSON_UNESCAPED_UNICODE) : $newVal }}
@else

لا توجد تفاصيل إضافية لهذا السجل

@endif
@endsection