{{ __('admin.activity_log_title') }}

{{-- Filter --}}
{{ __('admin.log_reset') }}
{{-- Tabelle --}}
@forelse ($logs as $log) @php $actionColors = [ 'login' => 'bg-green-100 text-green-800', 'logout' => 'bg-gray-100 text-gray-800', 'login_failed' => 'bg-red-100 text-red-800', 'registered' => 'bg-blue-100 text-blue-800', 'created' => 'bg-blue-100 text-blue-800', 'updated' => 'bg-yellow-100 text-yellow-800', 'deleted' => 'bg-red-100 text-red-800', 'restored' => 'bg-green-100 text-green-800', 'toggled_active' => 'bg-yellow-100 text-yellow-800', 'role_changed' => 'bg-purple-100 text-purple-800', 'password_reset' => 'bg-orange-100 text-orange-800', 'parent_assigned' => 'bg-blue-100 text-blue-800', 'parent_removed' => 'bg-red-100 text-red-800', 'participant_status_changed' => 'bg-yellow-100 text-yellow-800', 'status_changed' => 'bg-yellow-100 text-yellow-800', 'uploaded' => 'bg-blue-100 text-blue-800', 'reverted' => 'bg-orange-100 text-orange-800', 'bot_blocked' => 'bg-red-100 text-red-800', 'dsgvo_consent_uploaded' => 'bg-blue-100 text-blue-800', 'dsgvo_consent_confirmed' => 'bg-green-100 text-green-800', 'dsgvo_consent_revoked' => 'bg-yellow-100 text-yellow-800', 'dsgvo_consent_removed' => 'bg-orange-100 text-orange-800', 'dsgvo_consent_rejected' => 'bg-red-100 text-red-800', 'account_self_deleted' => 'bg-red-100 text-red-800', 'child_auto_deactivated' => 'bg-red-100 text-red-800', ]; $color = $actionColors[$log->action] ?? 'bg-gray-100 text-gray-800'; $hasDetails = !empty($log->properties); @endphp @empty @endforelse
{{ __('admin.log_time') }} {{ __('admin.log_user') }} {{ __('admin.log_action') }} {{ __('admin.log_description') }} {{ __('admin.log_ip') }}
{{ $log->created_at->format('d.m.Y H:i') }} {{ $log->user?->name ?? __('admin.log_system') }} {{ $log->action }}
{{ $log->description }}
@if ($hasDetails)
@php $oldData = $log->properties['old'] ?? []; $newData = $log->properties['new'] ?? []; $allKeys = array_unique(array_merge(array_keys($oldData), array_keys($newData))); @endphp @if (count($allKeys) > 0) @foreach ($allKeys as $key) @endforeach
{{ __('admin.log_field') }} {{ __('admin.log_old_value') }} {{ __('admin.log_new_value') }}
{{ $key }} {{ $oldData[$key] ?? '–' }} {{ $newData[$key] ?? '–' }}
@endif
@endif
{{ $log->ip_address }} @php $revertableActions = ['deleted', 'toggled_active', 'role_changed', 'status_changed', 'participant_status_changed']; $canRevert = in_array($log->action, $revertableActions) && $log->model_id; @endphp @if ($canRevert)
@csrf
@endif
{{ __('admin.log_empty') }}
{{ $logs->links() }}