@extends('layouts.admin') @section('title', 'Dashboard') @section('page-title', 'Dashboard') @section('content')

{{ $totalQuizzes ?? 0 }}

Total Quizzes

{{ $totalQuestions ?? 0 }}

Total Questions

{{ $totalParticipants ?? 0 }}

Participants

{{ $activeQuizzes ?? 0 }}

Active Quizzes

{{ number_format($performanceStats['stats']->avg_score ?? 0, 1) }}%

Average Score

{{ $performanceStats['stats']->max_score ?? 0 }}%

Highest Score

{{ $completedParticipations ?? 0 }}

Completed Quizzes

{{ $totalParticipations > 0 ? round(($completedParticipations / $totalParticipations) * 100, 1) : 0 }}%

Completion Rate

All-Time Top Scorers
@if (isset($allTimeTopScorers) && $allTimeTopScorers->count() > 0)
@foreach ($allTimeTopScorers as $index => $scorer) @endforeach
Rank Employee Avg Score Quizzes
@if ($index === 0) 🥇 @elseif ($index === 1) 🥈 @elseif ($index === 2) 🥉 @else #{{ $index + 1 }} @endif {{ $scorer->name }} {{ number_format($scorer->average_score, 1) }}% {{ $scorer->total_quizzes }}
@else
No Top Scorers Yet

Employees need to complete at least 2 quizzes

@endif
All-Time Winners
@if (isset($allTimeWinners) && $allTimeWinners->count() > 0)
@foreach ($allTimeWinners as $index => $winner) @endforeach
Rank Employee Best Score Quizzes
@if ($index === 0) 🥇 @elseif ($index === 1) 🥈 @elseif ($index === 2) 🥉 @else #{{ $index + 1 }} @endif {{ $winner->name }} {{ $winner->highest_score }}% {{ $winner->total_quizzes }}
@else
No Winners Yet

No completed quizzes found

@endif
Recent Top Performers (30 days)
@if (isset($recentTopPerformers) && $recentTopPerformers->count() > 0)
@foreach ($recentTopPerformers as $index => $performer)
@if ($index === 0) 🥇 @elseif ($index === 1) 🥈 @elseif ($index === 2) 🥉 @else #{{ $index + 1 }} @endif {{ $performer->name }}
{{ $performer->quiz->name ?? 'Unknown Quiz' }}
{{ $performer->score }}%
@endforeach
@else
No Recent Activity

No quiz completions in the last 30 days

@endif
Quiz Champions
@if (isset($quizWinners) && $quizWinners->count() > 0)
@foreach ($quizWinners as $index => $winner)
{{ Str::limit($winner['quiz_name'], 20) }} {{ $winner['winner_name'] }}
{{ $winner['winner_score'] }}%
{{ $winner['total_participants'] }} participants
@endforeach
@else
No Quiz Winners

No completed quizzes found

@endif
Score Distribution
@if (isset($performanceStats['scoreDistribution']) && $performanceStats['scoreDistribution']->count() > 0) @foreach ($performanceStats['scoreDistribution'] as $distribution)
{{ $distribution->score_range }} {{ $distribution->count }}
@php $percentage = $performanceStats['stats']->total_completed > 0 ? ($distribution->count / $performanceStats['stats']->total_completed) * 100 : 0; @endphp
@endforeach @else
No Data Available

No completed quizzes to analyze

@endif
Recent Quizzes
@if (isset($recentQuizzes) && $recentQuizzes->count() > 0)
@foreach ($recentQuizzes as $quiz) @endforeach
Quiz Name Status Created Actions
{{ $quiz->name }} @if ($quiz->is_active) Active @endif @if ($quiz->is_active) Active @else Inactive @endif {{ $quiz->created_at->format('M d, Y') }} Edit View
@else
No Quizzes Yet

Create your first quiz to get started!

Create Quiz
@endif
System Status
Database Online
HRIS API Connected
Last Updated {{ now()->format('M d, Y g:i A') }}

Welcome to Quiz Management System

Manage your employee quizzes efficiently and track performance with ease.

Create Quizzes

Design engaging quizzes for your employees

Track Results

Monitor performance and analyze data

Manage Users

Handle employee participation and access

@endsection