{{-- Welcome Banner --}}

Welcome back, Super Admin

Here's what's happening on KlevaLearn today.

{{-- Summary Cards --}}
{{-- Users Card --}}

Total Users

{{ number_format($stats['total_users']) }}

{{ $stats['active_users'] }} Active {{ $stats['suspended_users'] }} Suspended
{{-- Courses Card --}}

Total Courses

{{ number_format($stats['total_courses']) }}

{{ $stats['published_courses'] }} Published {{ $stats['draft_courses'] }} Draft
{{-- Organizations Card --}}

Organizations

{{ number_format($stats['total_orgs']) }}

{{ $stats['active_orgs'] }} Active {{ $stats['suspended_orgs'] }} Suspended
{{-- Enrollments Card --}}

Enrollments

{{ number_format($stats['total_enrollments']) }}

Across all courses
{{-- Assessment & Engagement Stats --}}
{{-- Assessment Performance --}}

Assessment Overview

{{ number_format($stats['total_submissions'] ?? 0) }}

Submissions

{{ $stats['avg_score'] ?? 0 }}%

Avg Score

{{ $stats['pass_rate'] ?? 0 }}%

Pass Rate

{{-- Pass rate bar --}}
Pass Rate {{ $stats['pass_rate'] ?? 0 }}%
{{-- Engagement Metrics --}}

Engagement Metrics

Active This Week

Users who logged in

{{ $engagementStats['active_this_week'] ?? 0 }}

Completion Rate

Courses completed vs enrolled

{{ $engagementStats['completion_rate'] ?? 0 }}%

Courses Per User

Average enrollment count

{{ $engagementStats['avg_courses_per_user'] ?? 0 }}
{{-- Growth Trend --}} @if(!empty($growthData))

Growth Trend (6 Months)

@foreach($growthData as $month)
@php $maxUsers = max(array_column($growthData, 'users')) ?: 1; $maxEnroll = max(array_column($growthData, 'enrollments')) ?: 1; $uH = max(($month['users'] / $maxUsers) * 72, 4); $eH = max(($month['enrollments'] / $maxEnroll) * 72, 4); @endphp

{{ $month['month'] }}

{{ $month['users'] }}u / {{ $month['enrollments'] }}e

@endforeach
Users Enrollments
@endif {{-- Top Courses --}} @if(!empty($topCourses))

Top Courses by Enrollment

@foreach($topCourses as $index => $course)
{{ $index + 1 }}

{{ $course['title'] }}

{{ number_format($course['enrollments']) }} enrolled
@endforeach
@endif {{-- Quick Actions --}}

Quick Actions

@foreach([ ['label' => 'Manage Users', 'icon' => 'heroicon-o-users', 'color' => 'blue', 'page' => \App\Frontend\Pages\SuperAdminPanel\GlobalUsersPage::class], ['label' => 'Organizations', 'icon' => 'heroicon-o-building-office-2', 'color' => 'purple', 'page' => \App\Frontend\Pages\SuperAdminPanel\OrganizationsDirectoryPage::class], ['label' => 'Roles & Permissions', 'icon' => 'heroicon-o-shield-check', 'color' => 'amber', 'page' => \App\Frontend\Pages\SuperAdminPanel\RoleMatrixPage::class], ['label' => 'System Health', 'icon' => 'heroicon-o-server-stack', 'color' => 'green', 'page' => \App\Frontend\Pages\SuperAdminPanel\SystemHealthPage::class], ] as $action)
{{ $action['label'] }}
@endforeach
{{-- Recent Activity --}}
{{-- Recent Users --}}

Recent Users

@forelse($recentUsers as $user)

{{ $user['name'] }}

{{ $user['email'] }}

@php $uColor = match($user['status']) { 'active' => 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400', 'suspended' => 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400', 'pending' => 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400', default => 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300', }; @endphp {{ ucfirst($user['status']) }}
@empty
No users yet.
@endforelse
{{-- All Courses (Super Admin) --}}

Courses Catalog

Open full catalog
@forelse($allCourses as $course)

{{ $course['title'] }}

{{ $course['organization'] }}

@php $cColor = match($course['status']) { 'published' => 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400', 'draft' => 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400', 'archived' => 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300', default => 'bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400', }; @endphp {{ ucfirst($course['status'] ?? 'unknown') }}
@empty
No courses yet.
@endforelse
{{-- Recent Organizations --}}

Recent Organizations

@forelse($recentOrgs as $org)

{{ $org['name'] }}

{{ ucfirst($org['plan']) }}

@php $oColor = match($org['status']) { 'active' => 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400', 'suspended' => 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400', default => 'bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400', }; @endphp {{ ucfirst($org['status']) }}
@empty
No organizations yet.
@endforelse