Minimize information shown on monitor screen. Allow monitors to enter no-shows for prelim auditions.
This commit is contained in:
parent
3e3b99c56c
commit
b978966c98
|
|
@ -24,7 +24,6 @@ class MonitorController extends Controller
|
|||
$prelimDefinition = null;
|
||||
|
||||
return view('monitor.index', compact('prelims', 'prelimDefinition'));
|
||||
|
||||
}
|
||||
|
||||
public function prelimStatus(PrelimDefinition $prelimDefinition)
|
||||
|
|
@ -41,6 +40,18 @@ class MonitorController extends Controller
|
|||
return view('monitor.index', compact('prelims', 'prelimDefinition', 'entries'));
|
||||
}
|
||||
|
||||
public function toggleNoShow(Entry $entry)
|
||||
{
|
||||
if ($entry->hasFlag('no_show')) {
|
||||
$entry->removeFlag('no_show');
|
||||
|
||||
return;
|
||||
}
|
||||
$entry->addFlag('no_show');
|
||||
|
||||
return redirect()->back()->with('success', 'No Show Entered');
|
||||
}
|
||||
|
||||
public function flagForm()
|
||||
{
|
||||
if (! auth()->user()->hasFlag('monitor')) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<x-slot:page_title>Monitor Dashboard</x-slot:page_title>
|
||||
|
||||
{{-- PRELIM AUDITION STATUS CARD --}}
|
||||
<x-card.card>
|
||||
<x-card.card class="max-w-md mx-auto">
|
||||
<x-card.heading>
|
||||
Prelim Auditions
|
||||
<x-slot:right_side>
|
||||
|
|
@ -20,7 +20,6 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<x-table.th>Entry</x-table.th>
|
||||
<x-table.th>Name</x-table.th>
|
||||
<x-table.th> </x-table.th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -29,7 +28,9 @@
|
|||
<tr>
|
||||
<x-table.td>
|
||||
{{ $prelimDefinition->audition->name }} {{ $entry->draw_number }}
|
||||
@if($entry->hasFlag('failed_prelim'))
|
||||
@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'))
|
||||
|
|
@ -41,10 +42,23 @@
|
|||
</span>
|
||||
@endif
|
||||
</x-table.td>
|
||||
<x-table.td>{{ $entry->student->full_name() }}<br>{{ $entry->student->school->name }}</x-table.td>
|
||||
<x-table.td>
|
||||
@if($entry->prelimScoreSheets()->count() < 1)
|
||||
Mark No Show Button
|
||||
@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>
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ Route::prefix('filters')->middleware(['auth', 'verified'])->controller(FilterCon
|
|||
Route::prefix('monitor')->middleware(['auth', 'verified'])->controller(MonitorController::class)->group(function () {
|
||||
Route::get('/', 'index')->name('monitor.index');
|
||||
Route::get('/prelim/{prelimDefinition}', 'prelimStatus')->name('monitor.prelimStatus');
|
||||
Route::post('/toggleNoShow/{entry}', 'toggleNoShow')->name('monitor.toggleNoShow');
|
||||
|
||||
Route::post('/enter_flag', 'flagForm')->name('monitor.enterFlag');
|
||||
Route::post('enter_flag/{entry}', 'storeFlag')->name('monitor.storeFlag');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue