auditionadmin/resources/views/monitor/index.blade.php

73 lines
4.1 KiB
PHP

<x-layout.app>
<x-slot:page_title>Monitor Dashboard</x-slot:page_title>
{{-- PRELIM AUDITION STATUS CARD --}}
<x-card.card class="max-w-md mx-auto">
<x-card.heading>
Prelim Auditions
<x-slot:right_side>
<x-form.select name="prelim_id" onchange="if (this.value) window.location.href = this.value">
<option value="" disabled hidden @if(! $prelimDefinition) selected @endif>Choose Prelim...</option>
@foreach ($prelims as $prelim)
<option @if($prelimDefinition && $prelimDefinition->id === $prelim->id) selected @endif
value="{{ route('monitor.prelimStatus', $prelim) }}">{{$prelim->audition->name}}</option>
@endforeach
</x-form.select>
</x-slot:right_side>
</x-card.heading>
@if($prelimDefinition)
<x-table.table>
<thead>
<tr>
<x-table.th>Entry</x-table.th>
<x-table.th> </x-table.th>
</tr>
</thead>
<tbody>
@foreach($entries as $entry)
<tr>
<x-table.td>
{{ $prelimDefinition->audition->name }} {{ $entry->draw_number }}
@if($entry->hasFlag('no_show'))
<span class="inline-flex items-center rounded-full bg-red-100 px-2 py-1 text-xs font-medium text-red-700 dark:bg-red-400/10 dark:text-red-400">No-Show</span>
@elseif($entry->hasFlag('failed_prelim'))
<span class="inline-flex items-center rounded-full bg-red-100 px-2 py-1 text-xs font-medium text-red-700 dark:bg-red-400/10 dark:text-red-400">Failed</span>
@elseif($entry->hasFlag('passed_prelim'))
<span class="inline-flex items-center rounded-full bg-green-100 px-2 py-1 text-xs font-medium text-green-700 dark:bg-green-400/10 dark:text-green-400">Passed</span>
@else
<span class="inline-flex items-center rounded-full bg-yellow-100 px-2 py-1 text-xs font-medium text-yellow-800 dark:bg-yellow-400/10 dark:text-yellow-300">
Pending
</span>
@endif
</x-table.td>
<x-table.td>
@if($entry->prelimScoreSheets()->count() < 1 && ! $entry->hasFlag('no_show'))
<x-modal>
<x-slot:button_text>
<x-form.button href="#">Mark No-Show</x-form.button>
</x-slot:button_text>
<x-slot:title>Mark {{ $prelimDefinition->audition->name }} {{ $entry->draw_number }} as a no-show</x-slot:title>
Confirm that you would like to mark this entry as a no-show<br>
{{ $prelimDefinition->audition->name }} {{ $entry->draw_number }}<br>
Entry ID: {{ $entry->id }}<br>
Name: {{ $entry->student->full_name() }}<br>
School: {{ $entry->student->school->name }}
<hr class="mt-3">
<x-form.form method="POST" action="{{ route('monitor.toggleNoShow', $entry) }}">
<x-form.button class="mt-3" type="submit">Confirm No-Show<br>{{ $prelimDefinition->audition->name }} {{ $entry->draw_number }}</x-form.button>
</x-form.form>
</x-modal>
@endif
</x-table.td>
</tr>
@endforeach
</tbody>
</x-table.table>
@endif
</x-card.card>
{{-- FINAL AUDITION STATUS CARD --}}
</x-layout.app>