%PDF- %PDF-
Direktori : /mnt/tnb2/git/loslex/resources/views/contests/ |
Current File : //mnt/tnb2/git/loslex/resources/views/contests/regoverview.blade.php |
@push('scripts') <script> function highlightDivisionRegistrations(id, highlight) { shooters = document.getElementsByClassName(`div${id}`); for (i = 0; i < shooters.length; i++) { if (highlight) { shooters[i].className += " bg-red-300"; } else { shooters[i].className = shooters[i].className.replace(" bg-red-300", ""); } } } </script> @endpush <div> @if ($contest->registrations->isNotEmpty()) <div class="text-sm p-2"> @foreach ($contest->divisionCounts as $div => $count) <div onmouseover="highlightDivisionRegistrations('{{$div}}', true)" onmouseout="highlightDivisionRegistrations('{{$div}}', false)" class="inline p-1 border div{{$div}}">{{$div}}: {{$count}}</div> @endforeach </div> @endif <div class="border p-2"> <div class="flex flex-row flex-wrap gap-2 justify-around"> @for ($i = 1; $i <= $contest->squads; $i++) <div class="border text-center p-2 grow basis-0"> <x-input-label class="font-bold" value="Squad {{$i}}" /> <div class="mt-1 text-xs">{{$contest->registrations->where('squad', $i)->count()}} / {{$contest->squadSize[$i]}}</div> <div class="w-full mt-2 text-sm gap-2 flex flex-row flex-wrap justify-center"> @foreach ($contest->registrations->where('squad', $i) as $reg) <div class="border select-none div{{$reg->division->bgdivision}} p-1" title="{{ $reg->division->division }}"> @auth {{$reg->user->displayname}}@if($reg->notcomp) {{__('(NC)')}}@endif @endauth @guest {{$reg->user->displayanonname}}@if($reg->notcomp) {{__('(NC)')}}@endif @endguest </div> @endforeach </div> </div> @endfor </div> <div class="mt-2 flex flex-row flex-wrap justify-around"> <div class="border text-center p-2 grow"> <x-input-label class="font-bold" value="Squad R" /> <div class="w-full mt-2 text-sm gap-2 flex flex-row flex-wrap justify-center"> @foreach ($contest->registrations->where('squad', 0) as $reg) <div class="border select-none div{{$reg->division->bgdivision}} p-1" title="{{ $reg->division->division }}"> @auth {{$reg->user->displayname}}@if($reg->notcomp) {{__('(NC)')}}@endif @endauth @guest {{$reg->user->displayanonname}}@if($reg->notcomp) {{__('(NC)')}}@endif @endguest </div> @endforeach </div> </div> </div> <x-input-error class="mt-2" :messages="$errors->get('squad')" /> </div> </div>