Winner Details

Entry #{{ $record->entry->entry_no }}

Participant

Name: {{ $record->participant->full_name }}
Email: {{ $record->participant->email }}
Phone: {{ $record->participant->phone }}

Contest

@php $contestType = match($record->entry->contest->type ?? null) { 'match_predictor' => 'Match Prediction', 'trivia_quiz' => 'Trivia Quiz', 'quiz' => 'Quiz', 'generic' => 'Generic Contest', default => ucwords(str_replace('_', ' ', $record->entry->contest->type ?? '-')), }; @endphp
Title: {{ $record->entry->contest->title ?? '-' }}
Type: {{ $contestType }}

Entry

Rank: #{{ $record->rank_position }}

Prize

Prize: {{ $record->prize->title ?? '-' }}
Draw: #{{ $record->draw->id ?? '-' }}

Timeline

Selected
{{ $record->selected_at ?? '-' }}
Contacted
{{ $record->contacted_at ?? '-' }}
Claimed
{{ $record->claimed_at ?? '-' }}
@if($record->entry->contest->type === 'trivia_quiz' || $record->entry->contest->type === 'quiz') @if($record->entry->quizAnswers->count())

Quiz Answers

@foreach($record->entry->quizAnswers as $a) @php $correct = $a->question->options->where('is_correct', true)->first(); @endphp
{{ $a->question->question_text }}
Your Answer
{{ $a->option->option_text ?? '-' }}
Correct Answer
{{ $correct?->option_text }}
@if($a->is_correct) Correct @else Wrong @endif
@endforeach
@endif @endif @if($record->entry->contest->type === 'match_predictor') @if($record->entry->predictions->count())

Predictions

@foreach($record->entry->predictions as $p) @php $predicted = match($p->prediction) { 'home_win' => 'Home Win', 'draw' => 'Draw', 'away_win' => 'Away Win', default => '-', }; $actualValue = $p->match?->matchResult?->result_type; $actual = match($actualValue) { 'home_win' => 'Home Win', 'draw' => 'Draw', 'away_win' => 'Away Win', default => '-', }; $isCorrect = $p->prediction === $actualValue; @endphp
{{ $p->match?->homeTeam?->team_name }} vs {{ $p->match?->awayTeam?->team_name }}
Predicted
{{ $predicted }}
Actual
{{ $actual }}
@if($isCorrect) Correct @else Wrong @endif
@endforeach
@endif @endif