@extends('layouts.dashboard') @section('title', 'Live Dashboard — ' . $election->title) @push('styles') @endpush @section('content')

Live Dashboard

{{ $election->title }}

Full Report
Total Voters
{{ number_format($totalVoters) }}
Voted
{{ number_format($votedVoters) }}
Pending
{{ number_format($notVoted) }}
Turnout
{{ $turnout }}%
Voter Turnout
Votes by Position
@foreach($positions as $position)
{{ $position->name }}
{{ $position->votes_count }} vote(s)
@if($position->candidates->isEmpty())

No candidates.

@else @foreach($position->candidates as $candidate) @php $pct = $position->votes_count > 0 ? round(($candidate->votes_count / $position->votes_count) * 100, 1) : 0; $isLeader = $loop->first && $position->votes_count > 0; @endphp
@if($isLeader)@endif {{ $candidate->name }} {{ $candidate->votes_count }} votes   ({{ $pct }}%)
{{ $pct > 5 ? $pct . '%' : '' }}
@endforeach @endif
@endforeach @endsection @push('scripts') @endpush