@props([ 'battery' => null, 'entries' => [], 'variant' => 'portal', 'showCta' => true, 'headerEyebrow' => 'Top 10 participantes', 'headerTitle' => 'Ranking da bateria', 'headerSubtitle' => null, 'showAreaAndGroup' => false, 'showJobTitle' => false, ]) @php use App\Support\PortalPointsFormatter; $topThree = array_slice($entries, 0, 3); $podiumSlots = [ ['rank' => 2, 'entry' => $topThree[1] ?? null, 'medal' => 'silver'], ['rank' => 1, 'entry' => $topThree[0] ?? null, 'medal' => 'gold'], ['rank' => 3, 'entry' => $topThree[2] ?? null, 'medal' => 'bronze'], ]; $formatScore = static function (float|int|string $points): array { $display = PortalPointsFormatter::format($points); return [ 'display' => $display, 'full' => $display, 'compact' => strlen(str_replace('.', '', $display)) >= 7, ]; }; @endphp @php $rankRootClass = match ($variant) { 'game' => 'qrank qrank--game', 'management' => 'qrank qrank--management', default => 'qrank', }; $resolvedSubtitle = $headerSubtitle ?? ($battery !== null ? $battery->title : null); @endphp
{{ $headerEyebrow }}
{{ $resolvedSubtitle }}
@endif@if($variant === 'management') Nenhum participante com respostas no escopo dos filtros aplicados. @else Ainda não há participantes com respostas nesta bateria. @endif
@if($variant !== 'management')Seja o primeiro a pontuar no questionário!
@endif{{ $row['name'] }}
@if($showJobTitle && ($row['job_title'] ?? null)) @endif @if($isYou) Você @endif$slot['medal'] === 'gold', 'qrank__score-int--silver' => $slot['medal'] === 'silver', 'qrank__score-int--bronze' => $slot['medal'] === 'bronze', ])>{{ $score['display'] }}
pts{{ $row['name'] }} @if($row['is_current_user']) Você @endif
@if($showJobTitle && ($row['job_title'] ?? null)) @endif @if($showAreaAndGroup && (($row['sector_name'] ?? null) || ($row['team_name'] ?? null))) @endif @if(($row['elapsed_seconds'] ?? 0) > 0){{ sprintf('%02d:%02d', intdiv($row['elapsed_seconds'], 60), $row['elapsed_seconds'] % 60) }}
@endif{{ $listScore['display'] }}
pts