diff --git a/app/Http/Controllers/Tabulation/TabulationController.php b/app/Http/Controllers/Tabulation/TabulationController.php index 5d8c093..6919770 100644 --- a/app/Http/Controllers/Tabulation/TabulationController.php +++ b/app/Http/Controllers/Tabulation/TabulationController.php @@ -7,6 +7,7 @@ use App\Models\Audition; use App\Services\DoublerService; use App\Services\SeatingService; use App\Services\TabulationService; +use Illuminate\Http\Request; use function compact; @@ -32,15 +33,17 @@ class TabulationController extends Controller return view('tabulation.status', compact('auditions')); } - public function auditionSeating(Audition $audition) + public function auditionSeating(Request $request, Audition $audition) { + if ($request->method() == 'POST') { + $requestedEnsembleAccepts = $request->input('ensembleAccept'); + } else { + $requestedEnsembleAccepts = false; + } + $entries = $this->tabulationService->auditionEntries($audition->id); - $complete = true; $doublerComplete = true; foreach ($entries as $entry) { - if (! $entry->scoring_complete) { - $complete = false; - } if ($this->doublerService->studentIsDoubler($entry->student_id)) { // If this entry is a doubler if ($this->doublerService->getDoublerInfo($entry->student_id)[$entry->id]['status'] === 'undecided') { // If there is no decision for this entry @@ -57,6 +60,13 @@ class TabulationController extends Controller $seatableEntries = $this->seatingService->getSeatableEntries($audition->id); - return view('tabulation.auditionSeating', compact('audition', 'entries', 'scoringComplete', 'doublerComplete', 'auditionComplete', 'ensembleLimits', 'seatableEntries')); + return view('tabulation.auditionSeating', compact('audition', + 'entries', + 'scoringComplete', + 'doublerComplete', + 'auditionComplete', + 'ensembleLimits', + 'seatableEntries', + 'requestedEnsembleAccepts')); } } diff --git a/resources/views/tabulation/auditionSeating-doubler-block.blade.php b/resources/views/tabulation/auditionSeating-doubler-block.blade.php index 747b12a..9783156 100644 --- a/resources/views/tabulation/auditionSeating-doubler-block.blade.php +++ b/resources/views/tabulation/auditionSeating-doubler-block.blade.php @@ -5,7 +5,7 @@ @foreach($doublerEntryInfo as $info) @php($isopen = $info['status'] == 'undecided')