auditionadmin/resources/views/components/doubler-block.blade.php

55 lines
2.8 KiB
PHP

@props(['doublerEntryInfo'])
@php($doublerButtonClasses = 'hidden rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:block')
<ul role="list" class="">
@foreach($doublerEntryInfo as $info)
@php($isopen = $info['status'] == 'undecided')
<li class="pb-2 pt-0 px-0 my-2 rounded-xl border border-gray-200 " x-data="{ open: {{ $isopen ? 'true':'false' }} }">
<div class="flex items-start gap-x-3 bg-gray-100 px-3 py-2" x-on:click=" open = ! open ">
<p class="text-sm font-semibold leading-6 text-gray-900">
<a href="/tabulation/auditions/{{ $info['auditionID'] }}">
{{ $info['auditionName'] }} - {{ $info['status'] }}
</a>
</p>
</div>
<div class="grid grid-cols-2" x-show="open">
<div class="mt-1 px-3 text-xs leading-5 text-gray-500">
<ul>
<li class="flex items-center gap-x-2">
<p class="whitespace-nowrap">Ranked {{ $info['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">{{ $info['unscored'] }} Unscored</p>
</li>
@foreach($info['limits'] as $limit)
<li>{{ $limit->ensemble->name }} accepts {{ $limit->maximum_accepted }}</li>
@endforeach
</ul>
</div>
<div class="flex items-center gap-x-4">
@if ($info['status'] === 'undecided')
<form method="POST" action="{{ route('doubler.accept',['entry'=>$info['entryID']]) }}">
@csrf
<button class="{{ $doublerButtonClasses }}">Accept</button>
</form>
<form method="POST" action="{{ route('doubler.decline',['entry'=>$info['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>--}}