@extends('admin.layouts.app') @section('title', __('admin.dashboard.title') . ' — ' . __('admin.brand.name')) @section('page_title', __('admin.dashboard.title')) @php $cards = [ ['key' => 'articles', 'route' => 'admin.blogs.index', 'icon' => 'doc', 'tone' => 'primary'], ['key' => 'events', 'route' => 'admin.events.index', 'icon' => 'calendar', 'tone' => 'accent'], ['key' => 'guidelines', 'route' => 'admin.announcements.index', 'icon' => 'megaphone', 'tone' => 'info'], ['key' => 'reviews', 'route' => 'admin.assessments.index', 'icon' => 'check', 'tone' => 'success'], ['key' => 'data_library', 'route' => 'admin.data-library.index', 'icon' => 'folder', 'tone' => 'primary'], ['key' => 'questions', 'route' => 'admin.questions.index', 'icon' => 'help', 'tone' => 'warning'], ['key' => 'groups', 'route' => 'admin.groups.index', 'icon' => 'group', 'tone' => 'accent'], ['key' => 'notification_templates', 'route' => 'admin.notification-templates.index', 'icon' => 'bell', 'tone' => 'info'], ]; @endphp @section('content') {{-- Active inter-admin note alerts assigned to the current admin. The partial renders nothing when there are none, so this line is a no-op for admins with an empty inbox. --}} @include('admin.partials.dashboard-note-alerts', ['alerts' => $alerts])
@foreach ($cards as $card) {{ __('admin.dashboard.stats.' . $card['key']) }} {{ number_format($stats[$card['key']]) }} @endforeach

{{ __('admin.dashboard.charts.content_activity') }}

{{ __('admin.dashboard.charts.content_activity_subtitle') }}

{{ __('admin.dashboard.charts.audience_split') }}

{{ __('admin.dashboard.charts.audience_split_subtitle') }}

{{ __('admin.dashboard.recent.title') }}

{{ __('admin.dashboard.recent.see_all') }}
@if ($recent->isEmpty())

{{ __('admin.dashboard.recent.empty') }}

@else
@foreach ($recent as $log) @endforeach
{{ __('admin.logs.fields.timestamp') }} {{ __('admin.logs.fields.admin') }} {{ __('admin.logs.fields.action') }} {{ __('admin.logs.fields.module') }} {{ __('admin.logs.fields.subject') }}
{{ optional($log->created_at)->diffForHumans() }} {{ $log->admin?->name ?? '—' }} {{ trans()->has('admin.logs.actions.' . $log->action) ? __('admin.logs.actions.' . $log->action) : $log->action }} {{ trans()->has('admin.logs.modules.' . $log->module) ? __('admin.logs.modules.' . $log->module) : $log->module }} {{ $log->description ?? '—' }}
@endif
@endsection @push('scripts') @endpush