Allow for marking no-shows en-masse
This commit is contained in:
parent
bed3e13e01
commit
77c868e209
|
|
@ -47,6 +47,17 @@ class SeatAuditionFormController extends Controller
|
|||
$requestedEnsembleAccepts = false;
|
||||
}
|
||||
|
||||
// Deal with a mass no-show request
|
||||
if ($request->input('mass-no-show')) {
|
||||
$entries = $audition->entries()->forSeating()->withCount('scoreSheets')->with('flags')->get();
|
||||
foreach ($entries as $entry) {
|
||||
if ($entry->scoreSheets_count == 0 && ! $entry->hasFlag('no_show')) {
|
||||
$entry->addFlag('no_show');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$entryData = [];
|
||||
$entries = $this->ranker->rank('seating', $audition);
|
||||
$entries->load('student.school');
|
||||
|
|
@ -76,7 +87,8 @@ class SeatAuditionFormController extends Controller
|
|||
'totalScore' => $totalScoreColumn,
|
||||
'fullyScored' => $fullyScored,
|
||||
'doubleData' => $doublerData,
|
||||
'doublerRequest' => $entry->student->doublerRequests()->where('event_id', $audition->event_id)->first()?->request,
|
||||
'doublerRequest' => $entry->student->doublerRequests()->where('event_id',
|
||||
$audition->event_id)->first()?->request,
|
||||
];
|
||||
// If this entries double decision isn't made, block seating
|
||||
if ($doublerData && $doublerData[$entry->id]['status'] == 'undecided') {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,14 @@
|
|||
<x-card.heading>Unable to seat this audition</x-card.heading>
|
||||
@if(! $rightPanel['data']['allScored'])
|
||||
<p class="text-sm px-5 py-2">The audition cannot be seated while it has unscored entries.</p>
|
||||
<div class="p-3">
|
||||
<x-form.button href="{{ url()->current() }}?mass-no-show=1" class="mb-3" onclick="return confirm('Do you really want to mark unscored entries as no-shows?');">Unscored entries are No-Shows</x-form.button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(! $rightPanel['data']['allScored'] && ! $rightPanel['data']['doublersResolved'])
|
||||
<hr>
|
||||
@endif
|
||||
@if(! $rightPanel['data']['doublersResolved'])
|
||||
<p class="text-sm px-5 py-2">The audition cannot be seated while it has unresolved doublers.</p>
|
||||
@endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue