auditionadmin/resources/views/tabulation/auditionSeating.blade.php

57 lines
2.1 KiB
PHP

@inject('doublerService','App\Services\DoublerService')
@php
$blockSeating = []
@endphp
<x-layout.app>
<x-slot:page_title>Audition Seating - {{ $audition->name }}</x-slot:page_title>
<div class="grid grid-cols-4"></div>
<div class="grid grid-cols-4">
<div class="col-span-3">
@include('tabulation.audition-results-table')
</div>
<div class="ml-4">
@if(! $auditionComplete)
<x-card.card>
<x-card.heading>Unable to seat this audition</x-card.heading>
@if(! $scoringComplete)
<p class="text-sm px-5 py-2">The audition cannot be seated while it has unscored entries.</p>
@endif
@if(! $doublerComplete)
<p class="text-sm px-5 py-2">The audition cannot be seated while it has unresolved doublers.</p>
@endif
</x-card.card>
@endif
@if($auditionComplete)
@php
$entriesToSeat = $entries->reject(function ($entry) {
return $entry->hasFlag('declined');
});
@endphp
@foreach($ensembleLimits as $ensembleLimit)
<x-card.card class="mb-3">
<x-card.heading>{{ $ensembleLimit->ensemble->name }}</x-card.heading>
<x-card.list.body>
@for($n=1; $n <= $ensembleLimit->maximum_accepted; $n++)
@php
$entry = $entriesToSeat->shift();
if (is_null($entry)) continue;
@endphp
<x-card.list.row class="!py-2">
{{ $n }} - {{ $entry->student->full_name() }}
</x-card.list.row>
@endfor
</x-card.list.body>
</x-card.card>
@endforeach
@endif
</div>
</div>
</x-layout.app>