auditionadmin/resources/views/tabulation/auditionSeating-doubler-blo...

60 lines
3.0 KiB
PHP

@php($doublerButtonClasses = 'hidden rounded-md bg-white px-2.5 py-1.5 text-xs text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:block')
<ul role="list" class="">
@foreach($entry['doubleData'] as $double)
@php($isopen = $double['status'] == 'undecided')
<li class="pb-2 pt-0 px-0 my-2 rounded-xl border border-gray-200 max-w-xs" x-data="{ open: {{ $isopen ? 'true':'false' }} }">
<div class="flex items-start gap-x-3 bg-gray-100 px-3 py-2 rounded-t-xl" >
<p class="text-sm font-semibold leading-6 text-gray-900">
{{-- TODO put in link --}}
<a href="{{ route('seating.audition', $double['audition']) }}">
{{ $double['name'] }} - {{ $double['status'] }}
</a>
</p>
<div class="w-full flex justify-end" >
<div x-on:click=" open = ! open ">
<x-icons.hamburger-menu />
</div>
</div>
</div>
<div class="grid grid-cols-4" x-show="open">
<div class="mt-1 px-3 text-xs leading-5 text-gray-500 col-span-3">
<ul>
<li class="flex items-center gap-x-2">
<p class="whitespace-nowrap">Ranked {{ $double['rank'] }}</p>
<svg viewBox="0 0 2 2" class="h-0.5 w-0.5 fill-current">
<circle cx="1" cy="1" r="1" />
</svg>
<p class="truncate">{{ $double['unscored_in_audition'] }} Unscored</p>
</li>
@foreach($double['limits'] as $limit)
<li>{{$limit['ensemble']->name}} accepts {{ $limit['limit'] }}</li>
@endforeach
</ul>
</div>
<div class="flex flex-col justify-end gap-y-1 pt-1">
@if ($double['status'] == 'undecided')
<form method="POST" action="{{ route('doubler.accept',['entry'=>$double['entryId']]) }}">
@csrf
<button class="{{ $doublerButtonClasses }}">Accept</button>
</form>
<form method="POST" action="{{ route('doubler.decline',['entry'=>$double['entryId']]) }}">
@csrf
<button class="{{ $doublerButtonClasses }}">Decline</button>
</form>
@endif
</div>
</div>
</li>
@endforeach
</ul>
{{--Complete Badge--}}
{{--<p class="mt-0.5 whitespace-nowrap rounded-md bg-green-50 px-1.5 py-0.5 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20">Complete</p>--}}
{{--In Progres Badge--}}
{{--<p class="mt-0.5 whitespace-nowrap rounded-md bg-yellow-50 px-1.5 py-0.5 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20">In Progress</p>--}}