auditionadmin/resources/views/tabulation/seating-page/scored-entries-table.blade.php

85 lines
3.8 KiB
PHP

<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>
{{-- @if($audition->prelimDefinition())--}}
{{-- <x-table.th>Prelim Score</x-table.th>--}}
{{-- @endif--}}
<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.seating-page.doubler-block')
@endforeach
@endif
@endif
</x-table.td>
{{-- @if($audition->prelimDefinition())--}}
{{-- <x-table.td>{{ round($entry->prelimTotalScore(),2) }}</x-table.td>--}}
{{-- @endif--}}
<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>