@extends('layouts.app') @section('title', 'Hasil Event - ' . $event->name) @section('page-style') @endsection @section('content')

Hasil / {{ $event->name }} {{ $event->status === 'active' ? 'Berlangsung' : ($event->status === 'closed' ? 'Selesai' : $event->status) }}

Ekspor CSV Kembali
Total DPT

{{ $totalVoters }}

Pemilih terdaftar
Total Suara Masuk

{{ $totalVotes }}

{{ $votersVoted }} pemilih ({{ $totalVoters > 0 ? round(($votersVoted / $totalVoters) * 100, 2) : 0 }}% Partisipasi)
Belum Memilih

{{ $votersNotVoted }} ({{ $totalVoters > 0 ? round(($votersNotVoted / $totalVoters) * 100, 2) : 0 }}%)

Belum menyalurkan suara
Terunggul Sementara
{{ $leadingCandidate ? $leadingCandidate->name : 'Belum Ada' }}
@if($leadingCandidate) {{ $leadingCandidate->votes_count }} Suara ({{ $leadingCandidate->percentage }}%) @else Menunggu suara masuk @endif
@if($event->max_choices > 1) @endif
Visualisasi Data Suara
@if(count($timelineData['labels']) > 0)
@else
Belum Ada Data Tren

Grafik tren akan muncul secara otomatis setelah suara masuk mulai terekam.

@endif
Hasil Perolehan Suara
@php $rank = 1; @endphp @forelse($rankedCandidates as $candidate)
@if($rank == 1) @elseif($rank == 2) 2 @elseif($rank == 3) 3 @else {{ $rank }} @endif
@if($candidate->photo_path) Candidate @else @endif
{{ $candidate->name }}
No. Urut {{ $candidate->sort_order }} | ID: {{ $candidate->id }}
{{ $candidate->votes_count }} {{ $candidate->percentage }}%
@php $barColorClass = 'bg-primary'; if ($rank == 1) $barColorClass = 'bg-warning'; elseif ($rank == 2) $barColorClass = 'bg-secondary'; elseif ($rank == 3) $barColorClass = ''; @endphp
@php $rank++; @endphp @empty

Tidak ada kandidat terdaftar.

@endforelse
@endsection @push('scripts') @endpush