@extends('admin.layouts.app') {{-- Inline the fully-qualified class name where it's used rather than emitting a top-level `use` via @use. Some Blade compiler / opcache combinations on shared hosts produced a "syntax error, unexpected token 'use'" with the directive even though it's legal in Laravel 11+. The FQCN sidesteps the issue with zero behavioural change. --}} @section('title', __('admin.ai.activity.title') . ' — ' . __('admin.brand.name')) @section('page_title', __('admin.ai.activity.title')) @section('content') @include('admin.ai._layout')

{{ __('admin.ai.activity.title') }} ({{ $logs->total() }})

{{ __('admin.ai.filters.reset') }}
@if ($logs->isEmpty())
{{ __('admin.ai.activity.empty') }}
@else @php $canRollback = auth('admin')->user()?->can('ai.rollback') ?? false; @endphp @if ($canRollback)@endif @foreach ($logs as $log) @php $isReversible = in_array($log->action_type, \App\Services\Ai\AiRollbackService::REVERSIBLE_ACTIONS, true); @endphp @if ($canRollback) @endif @endforeach
{{ __('admin.ai.activity.cols.when') }} {{ __('admin.ai.activity.cols.admin') }} {{ __('admin.ai.activity.cols.connector') }} {{ __('admin.ai.activity.cols.action') }} {{ __('admin.ai.activity.cols.subject') }} {{ __('admin.ai.activity.cols.session') }} {{ __('admin.ai.activity.cols.diff') }}
{{ $log->created_at?->diffForHumans() }} {{ $log->actor_user_name ?: ($log->admin?->name ?: $log->admin?->email) }} {{ $log->connector }} {{ $log->action_category }} {{ $log->action_type }} @if ($log->subject_type) {{ class_basename($log->subject_type) }}#{{ $log->subject_id }} @else — @endif @if ($log->session) #{{ $log->session->id }} @else — @endif @if (! empty($log->old_values) || ! empty($log->new_values))
{{ __('admin.ai.activity.cols.before_after') }}
{{ json_encode(['before' => $log->old_values, 'after' => $log->new_values], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}
@else — @endif
@if ($isReversible)
@csrf
@endif
{{ $logs->links() }}
@endif
@endsection