@extends('layouts.app') @section('content')

Welcome back, {{ $user['name'] }}!

Employee ID: {{ $user['employee_id'] }}

{{ $totalQuizzes }}
Total Quizzes
{{ $completedQuizzes }}
Completed
{{ $totalScore }}
Total Score
{{ $averageScore }}%
Average Score
@if ($activeQuiz)

Active Quiz: {{ $activeQuiz->name }}

Available until: {{ \Carbon\Carbon::parse($activeQuiz->quiz_date)->format('M d, Y') }}

Time: {{ \Carbon\Carbon::parse($activeQuiz->start_time)->format('g:i A') }} - {{ \Carbon\Carbon::parse($activeQuiz->end_time)->format('g:i A') }}

@if ($hasParticipatedInActive)
You have completed this quiz
@else
@csrf
@endif
@else

No Active Quiz

There are currently no active quizzes available.

@endif @if ($userParticipations->count() > 0)

Quiz History

@foreach ($userParticipations as $participation) @endforeach
Quiz Name Date Score Status Action
{{ $participation->quiz->name }} {{ $participation->created_at->format('M d, Y g:i A') }} @if ($participation->completed) {{ $participation->score }}/{{ $participation->employeeQuizParticipations->count() }} @else - @endif @if ($participation->completed) Completed @else In Progress @endif @if ($participation->completed) View Results @else No action available @endif
@else

No Quiz History

You haven't participated in any quizzes yet.

@if ($activeQuiz && !$hasParticipatedInActive)
@csrf
@endif
@endif
@endsection