271 lines
14 KiB
PHP
271 lines
14 KiB
PHP
<x-layout.app>
|
|
<x-slot:page_title>Audition Seating - {{ $audition->name }}</x-slot:page_title>
|
|
<div class="grid grid-cols-4 gap-4">
|
|
|
|
<div class="col-span-3"> {{-- Entry Ranking Table --}}
|
|
<x-card.card class="px-3"> {{-- Scored Entries --}}
|
|
<x-card.heading class="-ml-3">Scored Entries</x-card.heading>
|
|
<x-table.table>
|
|
<thead>
|
|
<tr>
|
|
<x-table.th>Rank</x-table.th>
|
|
<x-table.th>ID</x-table.th>
|
|
<x-table.th>Draw #</x-table.th>
|
|
<x-table.th>Student</x-table.th>
|
|
<x-table.th>Doubler</x-table.th>
|
|
<x-table.th>Total Score
|
|
@if($audition->bonusScore()->count() > 0)
|
|
<br>
|
|
<div class="display: flex">
|
|
<span class="text-yellow-500">No Bonus Score</span>
|
|
</div>
|
|
@endif
|
|
</x-table.th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-200">
|
|
@foreach($scored_entries as $entry)
|
|
<tr id="entry-{{ $entry->id }}">
|
|
<x-table.td class="align-top">{{ $entry->seatingRank }}</x-table.td>
|
|
<x-table.td class="align-top">{{ $entry->id }}</x-table.td>
|
|
<x-table.td class="align-top">{{ $entry->draw_number }}</x-table.td>
|
|
<x-table.td class="align-top">
|
|
<div>
|
|
<a href="{{ route('admin.students.edit',[$entry->student_id]) }}">{{ $entry->student->full_name() }}</a>
|
|
</div>
|
|
<div class="text-xs text-gray-400">{{ $entry->student->school->name }}</div>
|
|
</x-table.td>
|
|
<x-table.td class="align-top">
|
|
@php($doubler = $doublerData->get($entry->student_id))
|
|
@if($doubler)
|
|
@if($doubler->accepted_entry == $entry->id)
|
|
ACCEPTED
|
|
@elseif($entry->hasFlag('declined'))
|
|
DECLINED
|
|
@else
|
|
@if($request = $entry->student->doublerRequests()->where('event_id',$entry->audition->event_id)->first())
|
|
<div
|
|
class="border-2 border-gray-200 p-2 m-2"> {{-- Begin block seating request --}}
|
|
<div class="font-semibold mb-2">
|
|
Request
|
|
</div>
|
|
<div class="text-wrap">
|
|
<p>{{ $request->request }}</p>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
@foreach($entry->student->entriesForEvent($entry->audition->event_id) as $de)
|
|
@include('tabulation.auditionSeating-doubler-block')
|
|
@endforeach
|
|
@endif
|
|
@endif
|
|
|
|
|
|
</x-table.td>
|
|
<x-table.td class="align-top">
|
|
@if($audition->bonusScore()->count() > 0)
|
|
@if($entry->totalScore->bonus_total)
|
|
<span>{{ $entry->totalScore->seating_total_with_bonus }}</span>
|
|
@else
|
|
<span class="text-yellow-500">{{ $entry->totalScore->seating_total_with_bonus }}</span>
|
|
@endif
|
|
@else
|
|
{{ $entry->totalScore->seating_total }}
|
|
@endif
|
|
</x-table.td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</x-table.table>
|
|
</x-card.card>
|
|
|
|
<x-card.card class="mt-3"> {{-- Unscored Entries --}}
|
|
<x-card.heading class="-ml-3">Unscored Entries</x-card.heading>
|
|
<x-table.table>
|
|
<thead>
|
|
<tr>
|
|
<x-table.th>Draw #</x-table.th>
|
|
<x-table.th>ID</x-table.th>
|
|
<x-table.th>Student</x-table.th>
|
|
<x-table.th>Judges<br>Scored</x-table.th>
|
|
<x-table.th></x-table.th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($unscored_entries as $entry)
|
|
<tr>
|
|
<x-table.td>{{ $entry->draw_number }}</x-table.td>
|
|
<x-table.td>{{ $entry->id }}</x-table.td>
|
|
<x-table.td class="flex flex-col">
|
|
<span>{{ $entry->student->full_name() }}</span>
|
|
<span class="text-xs text-gray-400">{{ $entry->student->school->name }}</span>
|
|
</x-table.td>
|
|
<x-table.td>
|
|
{{ $entry->score_sheets_count }}
|
|
</x-table.td>
|
|
<x-table.td>
|
|
<x-form.form method="POST"
|
|
action="{{ route('seating.audition.noshow',[$audition, $entry]) }}">
|
|
<x-form.button>Record No Show</x-form.button>
|
|
</x-form.form>
|
|
</x-table.td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</x-table.table>
|
|
</x-card.card>
|
|
|
|
<x-card.card class="mt-3"> {{-- No Show Entries --}}
|
|
<x-card.heading class="-ml-3">No Show Entries</x-card.heading>
|
|
<x-table.table>
|
|
<thead>
|
|
<tr>
|
|
<x-table.th>Draw #</x-table.th>
|
|
<x-table.th>ID</x-table.th>
|
|
<x-table.th>Student</x-table.th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($noshow_entries as $entry)
|
|
<tr>
|
|
<x-table.td>{{ $entry->draw_number }}</x-table.td>
|
|
<x-table.td>{{ $entry->id }}</x-table.td>
|
|
<x-table.td class="flex flex-col">
|
|
<span>{{ $entry->student->full_name() }}</span>
|
|
<span class="text-xs text-gray-400">{{ $entry->student->school->name }}</span>
|
|
</x-table.td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</x-table.table>
|
|
</x-card.card>
|
|
|
|
<x-card.card class="mt-3"> {{-- Failed Prelim Entries --}}
|
|
<x-card.heading class="-ml-3">Failed Prelim Entries</x-card.heading>
|
|
<x-table.table>
|
|
<thead>
|
|
<tr>
|
|
<x-table.th>Draw #</x-table.th>
|
|
<x-table.th>ID</x-table.th>
|
|
<x-table.th>Student</x-table.th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($failed_prelim_entries as $entry)
|
|
<tr>
|
|
<x-table.td>{{ $entry->draw_number }}</x-table.td>
|
|
<x-table.td>{{ $entry->id }}</x-table.td>
|
|
<x-table.td class="flex flex-col">
|
|
<span>{{ $entry->student->full_name() }}</span>
|
|
<span class="text-xs text-gray-400">{{ $entry->student->school->name }}</span>
|
|
</x-table.td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</x-table.table>
|
|
</x-card.card>
|
|
|
|
|
|
</div>
|
|
|
|
<div> {{-- Right Column Wrapper --}}
|
|
@if($audition->hasFlag('seats_published'))
|
|
<x-card.card>
|
|
<x-card.heading>Published Results</x-card.heading>
|
|
<x-card.list.body>
|
|
@php($previousEnsemble = '')
|
|
@foreach($publishedSeats as $seat)
|
|
@if($previousEnsemble !== $seat->ensemble->name)
|
|
@php($previousEnsemble = $seat->ensemble->name)
|
|
<x-card.list.row class="font-semibold">{{ $seat->ensemble->name }}</x-card.list.row>
|
|
@endif
|
|
<x-card.list.row>
|
|
<div>
|
|
<p>{{ $seat->seat }}. {{ $seat->student->full_name() }}</p>
|
|
<p class="ml-5 text-xs">{{ $seat->student->school->name }}</p>
|
|
</div>
|
|
</x-card.list.row>
|
|
@endforeach
|
|
</x-card.list.body>
|
|
</x-card.card>
|
|
|
|
<x-form.form method="POST" action="{{ route('seating.audition.unpublishSeats',[$audition]) }}">
|
|
<x-form.button class="mt-3">Unpublish Results</x-form.button>
|
|
</x-form.form>
|
|
@else
|
|
@if($canSeat)
|
|
@if($seatingProposal)
|
|
<x-card.card>
|
|
<x-card.heading>
|
|
Seating Proposal
|
|
<x-slot:subheading>Results are not yet published</x-slot:subheading>
|
|
</x-card.heading>
|
|
@foreach($seatingProposal as $proposedEnsemble)
|
|
<h3 class="m-3 font-semibold">{{ $proposedEnsemble['ensemble_name'] }}</h3>
|
|
<x-card.list.body>
|
|
@if(isset($proposedEnsemble['seats']))
|
|
@foreach($proposedEnsemble['seats'] as $seat)
|
|
<x-card.list.row>{{ $seat['seat'] }}
|
|
. {{ $seat['entry_name'] }}</x-card.list.row>
|
|
@endforeach
|
|
@endif
|
|
</x-card.list.body>
|
|
@endforeach
|
|
<x-form.form method="POST" action="{{ route('seating.audition.clearDraft',[$audition]) }}">
|
|
<x-form.button class="mb-3">Clear Draft</x-form.button>
|
|
</x-form.form>
|
|
<x-form.form method="POST"
|
|
action="{{ route('seating.audition.publishSeats',[$audition]) }}">
|
|
<x-form.button class="mb-3">Publish</x-form.button>
|
|
</x-form.form>
|
|
</x-card.card>
|
|
@else
|
|
<x-card.card class="p-3">
|
|
<x-form.form metohd="POST" action="{{ route('seating.audition.draftSeats',[$audition]) }}">
|
|
<x-card.heading class="-ml-5">Seat Audition
|
|
<x-slot:subheading>Choose how many entries to seat in each ensemble
|
|
</x-slot:subheading>
|
|
</x-card.heading>
|
|
@foreach($audition->SeatingLimits()->where('maximum_accepted','>',0)->get() as $limit)
|
|
<x-form.select name="ensemble[{{ $limit->ensemble_id }}]">
|
|
<x-slot:label>{{$limit->ensemble->name}}</x-slot:label>
|
|
@for($n = 0; $n< $limit->maximum_accepted; $n++)
|
|
<option value="{{$n}}">{{$n}}</option>
|
|
@endfor
|
|
<option value="{{$n}}" SELECTED>{{$n}}</option>
|
|
</x-form.select>
|
|
@endforeach
|
|
<x-form.button class="mt-3">Draft Seats</x-form.button>
|
|
</x-form.form>
|
|
</x-card.card>
|
|
@endif
|
|
@else
|
|
<div class="ml-4">
|
|
@if($unscored_entries->count() > 0)
|
|
<x-card.card class="p-3 text-red-500 mb-3">
|
|
Cannot seat the audition while entries are unscored.
|
|
</x-card.card>
|
|
@endif
|
|
|
|
@if($auditionHasUnresolvedDoublers)
|
|
<x-card.card class="p-3">
|
|
<p class="text-red-500">Cannot seat the audition while there are unresolved doublers.</p>
|
|
<x-form.form method="POST" action="{{ route('seating.audition.mass_decline',[$audition]) }}">
|
|
<x-form.field type="number" name="decline-below" label_text="Decline doubler ranked lower than:" />
|
|
<x-form.button>Decline</x-form.button>
|
|
</x-form.form>
|
|
</x-card.card>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
@endif
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</x-layout.app>
|