72 lines
3.3 KiB
PHP
72 lines
3.3 KiB
PHP
@php use Illuminate\Support\Facades\Auth; @endphp
|
|
<x-layout.app>
|
|
<x-slot:page_title>Judging Dashboard</x-slot:page_title>
|
|
<x-card.card>
|
|
<x-card.heading>
|
|
{{ $audition->name }}
|
|
@if($published)
|
|
<x-slot:subheading class="text-red-500">Results are published. Scores cannot be changed.</x-slot:subheading>
|
|
@endif
|
|
</x-card.heading>
|
|
<x-table.table>
|
|
<thead>
|
|
<tr>
|
|
<x-table.th :sortable="false"><a href="{{ url()->current() }}">Entry</a></x-table.th>
|
|
@foreach($subscores as $subscore)
|
|
<x-table.th :sortable="false">{{ $subscore->name }}</x-table.th>
|
|
@endforeach
|
|
@if(auditionSetting('advanceTo') and $audition->for_advancement)
|
|
<x-table.th>{{ auditionSetting('advanceTo') }}</x-table.th>
|
|
@endif
|
|
<x-table.th :sortable="true">Timestamp</x-table.th>
|
|
</tr>
|
|
</thead>
|
|
<x-table.body>
|
|
@foreach($entries as $entry)
|
|
<tr>
|
|
<x-table.td>
|
|
@if(! $published)
|
|
<a href="{{ route('judging.entryScoreSheet',$entry) }}">
|
|
@endif
|
|
{{ $audition->name }} {{ $entry->draw_number }}
|
|
@if(! $published)
|
|
</a>
|
|
@endif
|
|
</x-table.td>
|
|
@foreach($subscores as $subscore)
|
|
<x-table.td>
|
|
@php
|
|
if( $x = Auth::user()->scoresForEntry($entry->id)) echo $x[$subscore->id]['score'];
|
|
@endphp
|
|
</x-table.td>
|
|
@endforeach
|
|
@if(auditionSetting('advanceTo') and $audition->for_advancement)
|
|
<x-table.td>
|
|
@if($votes->contains('entry_id', $entry->id))
|
|
@php
|
|
$vote = $votes->where('entry_id',$entry->id)->first();
|
|
@endphp
|
|
@switch($vote->vote)
|
|
@case('yes')
|
|
<x-icons.thumbs-up color="green"/>
|
|
@break
|
|
@case('no')
|
|
<x-icons.thumbs-down color="red"/>
|
|
@break
|
|
@case('dq')
|
|
<x-icons.circle-slash-no color="red"/>
|
|
@break
|
|
@endswitch
|
|
@endif
|
|
</x-table.td>
|
|
@endif
|
|
<x-table.td>
|
|
{{ Auth::user()->timeForEntryScores($entry->id)?->setTimezone('America/Chicago')->format('m/d/y H:i') }}
|
|
</x-table.td>
|
|
</tr>
|
|
@endforeach
|
|
</x-table.body>
|
|
</x-table.table>
|
|
</x-card.card>
|
|
</x-layout.app>
|