%PDF- %PDF-
Direktori : /www/loslex/test/resources/views/contests/results/ |
Current File : //www/loslex/test/resources/views/contests/results/szclassification.blade.php |
@php $first = true; @endphp <div class="text-lg text-center font-bold" id="anresults">{{__('Results')}}</div> <div class="mb-11 w-fit m-auto" id="resultsTabContents"> <!--Tabs navigation--> <ul class="w-full flex flex-wrap text-sm font-medium text-center text-gray-500 border-b border-gray-200 dark:border-gray-700 dark:text-gray-400" data-tabs-toggle="#resultsTabContents" role="tablist"> @foreach($divisions as $division) <li class="mr-2" role="presentation"> <button class="inline-block text-gray-500 hover:text-gray-600 hover:border-gray-300 hover:dark:border-gray-600 rounded-t-lg py-4 px-4 text-sm font-medium text-center border-transparent border-b-2 dark:text-gray-400 dark:hover:text-gray-300" id="division-{{ $division->name }}-tab" data-tabs-target="#division-{{ $division->name }}" type="button" role="tab" aria-controls="division-{{ $division->name }}" aria-selected="false">{{ __("contest." . $division->name) }}</button> </li> @endforeach </ul> <!--Tabs content--> @foreach($divisions as $division) <div class="hidden p-4 rounded-lg" id="division-{{ $division->name }}" role="tabpanel" aria-labelledby="division-{{ $division->name }}-tab"> <table> <thead> <tr class="border-b border-gray-400"> <th class="text-center text-sm result-header"><span class="fa-solid fa-trophy"></th> @if($division->name == "All") <th class="result-header">{{ __("Division") }}</th> @endif <th class="result-header whitespace-nowrap">{{ __("Name") }}</th> <th class="result-header">{{ __("Total %") }}</th> <th class="result-header">{{ __("Time") }}</th> <th class="result-header">{{ __("Hit") }}</th> <th class="result-header">{{ __("Miss") }}</th> <th class="result-header">{{ __("Proc") }}</th> <th class="result-header">{{ __("N-S") }}</th> <th class="result-header">{{ __("Total time") }}</th> <th class="result-header">{{ __("Result") }}</th> </tr> </thead> <tbody> @php $no = 1; @endphp @foreach($division->shooters as $sh) <tr> @php $passed = ($sh->stages[1]->total_time < 40.0 && $sh->stages[1]->noshoot == 0) @endphp <td class="text-center result-header">{{ !($sh->notcomp || $sh->dq) ? $no++ : ($sh->dq ? __("DQ") : __("NC")) }}</td> @if($division->name == "All") <td class="result-header">{{ $sh->origDivision }}</td> @endif <td class="whitespace-nowrap result-header">@auth{{ $sh->name }}@else{{ $sh->anonname }}@endauth</td> <td @class(['result-header', 'text-center', 'result-best' => ($sh->percent == 100)])>{{ $sh->percent }}%</td> <td @class(['text-center', 'result-even'])>{{ $sh->stages[1]->time }}</td> <td @class(['text-center', 'result-even'])>{{ ($sh->stages[1]->alpha + $sh->stages[1]->charlie + $sh->stages[1]->delta + $sh->stages[1]->popper) }}</td> <td @class(['text-center', 'result-even'])>{{ ($sh->stages[1]->miss + $sh->stages[1]->misspopper) }}</td> <td @class(['text-center', 'result-even'])>{{ $sh->stages[1]->proc }}</td> <td @class(['text-center', 'result-even'])>{{ $sh->stages[1]->noshoot }}</td> <td @class(['text-center', 'result-even'])>{{ $sh->stages[1]->total_time }}</td> <td @class(['text-center', 'result-even', 'status-pass' => $passed, 'status-fail' => !$passed])>{{ $passed ? __("Pass") : __("Fail") }}</td> </tr> @endforeach </tbody> </table> </div> @endforeach @auth <div class="w-fit m-auto flex flex-row flex-wrap gap-4 justify-items-center"> <a href="{{route('contest.overview-results', $contest->id)}}?print" target="_blank"><x-primary-button>{{ __('Download PDF') }}</x-primary-button></a> @if (auth()->user()?->is_organizer_member($contest->organizer_group_id) || auth()->user()?->is_admin) <a href="{{route('contest.publish-results', $contest->id)}}"> @if (!$contest->results_published) <x-danger-button>{{__('Publish results')}}</x-danger-button> @else <x-danger-button>{{__('Unpublish results')}}</x-danger-button> @endif </a> @endif </div> @endauth </div>