%PDF- %PDF-
Direktori : /www/loslex/test/resources/views/contests/ |
Current File : //www/loslex/test/resources/views/contests/regoverview.blade.php |
<div x-data="{ @foreach ($contest->divisionCounts as $div => $count)highlight{{$div}}: false, @endforeach hlpaid: sessionStorage.getItem('hlpaid') == 'true'}" x-init="$watch('hlpaid', (val) => { sessionStorage.setItem('hlpaid', val)})"> @if ($contest->registrations->isNotEmpty() && $contest->contest_category) <div class="p-1 text-sm flex flex-row"> <div class="inline w-full flex flex-wrap gap-1"> @foreach ($contest->divisionCounts as $div => $count) <div @click="highlight{{$div}} = !highlight{{$div}}" class="whitespace-nowrap cursor-pointer inline p-1 border rounded select-none" :class="highlight{{$div}} ? 'division-active' : ''">{{$div}}: {{$count}}</div> @endforeach </div> @can('update', $contest) <div> <div @click="hlpaid = !hlpaid" class="text-sm whitespace-nowrap cursor-pointer p-1 border rounded select-none" :class="hlpaid ? 'registration-paid' : ''">{{ __('Paid') }}</div> </div> @endcan </div> @endif <div class="border rounded p-2"> <div class="flex flex-row flex-wrap gap-2 justify-around"> @for ($i = 1; $i <= $contest->squads; $i++) <div class="border rounded 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)->sortBy('user.lastname') as $reg) <div @class(['whitespace-nowrap p-1 border rounded select-none', 'registration-own' => isset($registration) && $reg->id == $registration->id ]) :class="highlight{{$reg->division?->bgdivision}} ? 'division-active' :@can('update', $contest) hlpaid && {{$reg->paid}} ? 'registration-paid' :@endcan ''" title="{{ $reg->division?->division }}"> @auth {{$reg->user->displayname}}@if($reg->notcomp) {{__('(NC)')}}@endif <div class="text-xxs italic">{{ $reg->user->username}}</div>@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 rounded 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)->sortBy('user.lastname') as $reg) <div @class(['whitespace-nowrap p-1 border rounded select-none', 'registration-own' => isset($registration) && $reg->id == $registration->id ]) :class="highlight{{$reg->division?->bgdivision}} ? 'division-active' :@can('update', $contest) hlpaid && {{$reg->paid}} ? 'registration-paid' :@endcan ''" title="{{ $reg->division?->division }}"> @auth {{$reg->user->displayname}}@if($reg->notcomp) {{__('(NC)')}}@endif <div class="text-xxs italic">{{ $reg->user->username}}</div>@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>