%PDF- %PDF-
Direktori : /www/loslex/test/resources/views/contests/partials/ |
Current File : //www/loslex/test/resources/views/contests/partials/contest-row.blade.php |
<div wire:key="{{ $contest->id }}" @class(['w-full md:w-4/5 border hover:border-sky-600 dark:border-gray-500 rounded-md mx-auto mb-1 p-2 grid grid-cols-contest md:grid-cols-contestmd gap-2', 'bg-gray-100 dark:bg-gray-700' => $contest->published != \App\Enums\ContestPublicationStatusEnum::PUBLISHED])> <div class="uppercase text-center whitespace-nowrap"> <div class="font-semibold hidden md:block">{{ $contest->date->isoFormat('LL') }}</div> <div class="text-xs hidden md:block">{{ $contest->dateDow }}</div> <div class="font-semibold text-xl block md:hidden">{{ $contest->dateDay }}</div> <div class="font-semibold text-sm block md:hidden">{{ $contest->dateMth }}</div> <div class="text-xs block md:hidden">{{ $contest->dateDow }}</div> </div> <div> <div class="items-baseline gap-x-4"> @if ($contest->results_published)<span class="text-amber-400 fa-solid fa-medal" title="{{ __('Results') }}"></span>@endif <a @class(['min-w-max font-semibold uppercase', 'italic' => $contest->isAfterContest]) href="{{ route('contest.show', $contest->id) }}">{{ $contest->contestname}}</a> @if ($contest->published != \App\Enums\ContestPublicationStatusEnum::PUBLISHED) <div class="min-w-max text-xs">({{ __('contest.' . $contest->published->name) }})</div> @endif </div> <div class="flex flex-row flex-wrap gap-x-2"> <div><span class="text-xs text-gray-600 dark:text-gray-400 fa-solid fa-people-group"></span> {{ $contest->organizer_group->name }}</div> <div><span class="text-xs text-gray-600 dark:text-gray-400 fa-solid fa-location-crosshairs"></span> {{ $contest->range->name }}</div> @if ($contest->range->region)<div>{{ __('region.' . \App\Enums\RangeRegionEnum::from($contest->range->region)->name) }}</div>@endif </div> <div class="flex flex-row flex-wrap gap-2 text-sm"> <div>{{ __('contest.' . $contest->contest_level?->name) }} @if (!is_null($contest->contest_category)), {{ __('contest.' . $contest->contest_category?->name) }}@endif</div> @if ($contest->registration_type == \App\Enums\ContestRegistrationEnum::ONLINE && ($contest->isRegActive || $contest->isAfterReg) && !$contest->results_published) <div title="{{ __('Registered shooters') }}" class="whitespace-nowrap {{ $contest->registrations->where('squad', '>', 0)->count() <= round(0.8 * $contest->capacity) ? 'text-green-500' : ($contest->registrations->where('squad', '>', 0)->count() < $contest->capacity ? 'text-amber-500' : 'text-red-600') }}"> {{ $contest->registrations->where('squad', '>', 0)->count() }} / {{ $contest->capacity }} @if ($contest->isRegActive)<div class="fa-solid fa-user-pen text-xs text-gray-600 dark:text-gray-400" title="{{ __('Registration in progress') }}"></div>@endif </div> @else <div class="text-green-500">{{ $contest->capacity }}</div> @endif </div> </div> </div>