@extends('layouts.admin') @section('title', 'Chi tiết Admin Log #{{ $log->id }} - MU Admin Panel') @section('styles') @endsection @section('content')
@if($log->reason)

💬 Lý do thực hiện

{{ $log->reason }}
@endif

ℹ️ Thông tin cơ bản

Hành động:
@php $actionClass = 'action-create'; if (str_contains($log->action, 'edit') || str_contains($log->action, 'update')) { $actionClass = 'action-edit'; } elseif (str_contains($log->action, 'delete') || str_contains($log->action, 'destroy')) { $actionClass = 'action-delete'; } elseif (str_contains($log->action, 'ban') || str_contains($log->action, 'block')) { $actionClass = 'action-ban'; } @endphp {{ ucfirst(str_replace('_', ' ', $log->action)) }}
Target:
{{ ucfirst($log->target_type) }}
{{ $log->target_name }}
Target ID:
{{ $log->target_id }}
Thời gian:
{{ date('d/m/Y H:i:s', strtotime($log->created_at)) }}

👤 Thông tin Admin

Admin:
{{ strtoupper(substr($log->admin_username, 0, 2)) }}
{{ $log->admin_username }}
@if($log->admin_email)
{{ $log->admin_email }}
@endif
IP Address:
{{ $log->ip_address }}
User Agent:
{{ $log->user_agent }}
@if($log->old_data || $log->new_data)

🔄 So sánh dữ liệu

📤 Dữ liệu cũ

@if($log->old_data) {{ json_encode($log->old_data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }} @else
Không có dữ liệu cũ
@endif

📥 Dữ liệu mới

@if($log->new_data) {{ json_encode($log->new_data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }} @else
Không có dữ liệu mới
@endif
@endif
@endsection