69 lines
3.3 KiB
PHP
69 lines
3.3 KiB
PHP
<x-layout.app>
|
|
<x-slot:page_title>Nomination Ensemble Seating</x-slot:page_title>
|
|
|
|
<div class="grid grid-cols-5 gap-3">
|
|
|
|
<div id="left-ensemble-list">
|
|
<nav class="flex flex-1 flex-col" aria-label="Sidebar Ensemble List">
|
|
<p class="text-md/6 font-semibold text-gray-800 mb-3">Select Ensemble</p>
|
|
<ul role="list" class="-mx2 space-y-1">
|
|
@foreach($ensembles as $menuItem)
|
|
<a href="{{ route('nomination.admin.seating.show',[$menuItem->id]) }}"
|
|
class="group flex gap-x-3 rounded-md p-2 pl-3 text-sm/6 font-semibold text-gray-700 hover:bg-gray-50 hover:text-indigo-600">
|
|
{{ $menuItem->name }}
|
|
</a>
|
|
@endforeach
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
|
|
<div id="seating-pane" class="col-span-4">
|
|
@if($ensemble)
|
|
<x-card.card>
|
|
<x-card.heading>
|
|
{{ $ensemble->name }}
|
|
<x-slot:right_side class="flex">
|
|
@if($ensemble->data['seated'] ?? false)
|
|
<x-form.form method="POST"
|
|
action="{{ route('nomination.admin.seating.seat',[$ensemble]) }}">
|
|
<input type="hidden" name="action" value="clear">
|
|
<x-form.button>Clear Seats</x-form.button>
|
|
</x-form.form>
|
|
@else
|
|
<x-form.form method="POST"
|
|
action="{{ route('nomination.admin.seating.seat',[$ensemble]) }}">
|
|
<input type="hidden" name="action" value="seat">
|
|
<x-form.button>Seat Ensemble</x-form.button>
|
|
</x-form.form>
|
|
@endif
|
|
</x-slot:right_side>
|
|
</x-card.heading>
|
|
|
|
<x-table.table>
|
|
@foreach($ensemble->data['instruments'] as $instrument)
|
|
@php($seatOn = 1)
|
|
@continue(! $acceptedNominations->has($instrument))
|
|
<tr class="border-t-2 border b-2">
|
|
<x-table.th>{{ $instrument }}</x-table.th>
|
|
<x-table.th>Student Name</x-table.th>
|
|
<x-table.th>School (Nom Rank)</x-table.th>
|
|
</tr>
|
|
@foreach($acceptedNominations[$instrument] as $nom)
|
|
<tr>
|
|
<x-table.td>{{ $seatOn }}</x-table.td>
|
|
<x-table.td>{{ $nom->student->full_name() }}</x-table.td>
|
|
<x-table.td>{{ $nom->student->school->name }} ({{ $nom->data['rank'] }})
|
|
</x-table.td>
|
|
</tr>
|
|
@php($seatOn++)
|
|
@endforeach
|
|
@endforeach
|
|
</x-table.table>
|
|
</x-card.card>
|
|
@endif
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</x-layout.app>
|