{{-- Batch cards with clock controls. Pass ['withTeams' => true] to list each batch's teams. --}} @php $withTeams = $withTeams ?? false; @endphp

⏱ BATCHES @if ($unassigned) {{ $unassigned }} team(s) not in a batch @endif

@foreach ($batches as $b) @php $n = $b['number']; $teams = $byBatch->get($n, collect()); $cracked = $teams->where('state', 'cracked')->count(); @endphp
BATCH {{ $n }} {{ $batchLabel[$b['status']] }}
@if ($b['status'] === 'running') --:-- @elseif ($b['status'] === 'paused') {{ $fmt($b['ends_at'] - $b['paused_at']) }} @elseif ($b['status'] === 'over') 00:00 @else {{ $fmt($settings['duration_minutes'] * 60000) }} @endif
{{ $b['teams'] }} team(s) · {{ $cracked }} cracked
@if ($b['status'] === 'ready')
@csrf
@endif @if ($b['status'] === 'running')
@csrf
@endif @if ($b['status'] === 'paused')
@csrf
@endif @if (in_array($b['status'], ['running', 'paused']))
@csrf
@endif @if ($b['status'] !== 'ready')
@csrf
@csrf
@endif
@if ($withTeams)
    @forelse ($teams->sortBy('name', SORT_NATURAL | SORT_FLAG_CASE) as $r)
  • {{ $r['name'] }} @if ($r['state'] === 'cracked') {{ $fmt($r['time_taken']) }} @elseif ($r['attempts']) {{ $r['attempts'] }}/{{ $settings['max_attempts'] ?: '∞' }} @endif {!! $chips[$r['state']] !!}
  • @empty
  • No teams yet. Assign teams →
  • @endforelse
@endif
@endforeach
@if ($withTeams && $unassigned)
NOT IN A BATCH ({{ $unassigned }})
@foreach ($byBatch->get('', collect())->sortBy('name', SORT_NATURAL | SORT_FLAG_CASE) as $r) {{ $r['name'] }} @endforeach
ASSIGN ON THE TEAMS PAGE →
@endif