52 lines
2.1 KiB
PHP
52 lines
2.1 KiB
PHP
<x-layout.app>
|
|
<x-layout.page-header>{{$audition->name}} Recap</x-layout.page-header>
|
|
|
|
<x-card.card class="mt-3">
|
|
<x-table.table>
|
|
<thead>
|
|
<tr>
|
|
<x-table.th rowspan="2">#</x-table.th>
|
|
<x-table.th rowspan="2">Name</x-table.th>
|
|
@foreach($subscores as $subscore)
|
|
<x-table.th colspan="{{ $judges->count() + 1 }}">{{ $subscore->name }}</x-table.th>
|
|
@endforeach
|
|
<x-table.th rowspan="2">Total</x-table.th>
|
|
</tr>
|
|
<tr>
|
|
@foreach($subscores as $subscore)
|
|
@foreach($judges as $judge)
|
|
<x-table.th>{{ $judge->last_name }}</x-table.th>
|
|
@endforeach
|
|
<x-table.th>Tot</x-table.th>
|
|
@endforeach
|
|
</tr>
|
|
</thead>
|
|
<x-table.body>
|
|
@foreach($recapRows as $row)
|
|
<tr>
|
|
<x-table.td>{{$row['rank']}}</x-table.td>
|
|
<x-table.td>{{$row['name']}}<br>{{$row['school']}}</x-table.td>
|
|
|
|
@php ($ssOn = 1)
|
|
@foreach($subscores as $subscore)
|
|
@php ($ssTotal = 0)
|
|
@foreach($judges as $judge)
|
|
<x-table.td>
|
|
{{ $row['subscores']['judge'.$judge->id][$subscore->name] }}
|
|
</x-table.td>
|
|
@php ($ssTotal += $row['subscores']['judge'.$judge->id][$subscore->name])
|
|
@endforeach
|
|
<x-table.td>
|
|
{{ $ssTotal }}<br>
|
|
( {{ $subscoreOrdinals['entry'.$row['entryId']][$ssOn] }} )
|
|
</x-table.td>
|
|
@php($ssOn++)
|
|
@endforeach
|
|
<x-table.td>{{$row['total_score']}}</x-table.td>
|
|
</tr>
|
|
@endforeach
|
|
</x-table.body>
|
|
</x-table.table>
|
|
</x-card.card>
|
|
</x-layout.app>
|