From 0c7baa1cc9b59d49cacc4c426c664b60a8ab3097 Mon Sep 17 00:00:00 2001 From: Matt Young Date: Sat, 24 Aug 2024 07:55:42 -0500 Subject: [PATCH] Show doubler preference on seating page Closes #69 --- .../Controllers/Tabulation/SeatAuditionFormController.php | 6 +++++- .../tabulation/auditionSeating-results-table.blade.php | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Tabulation/SeatAuditionFormController.php b/app/Http/Controllers/Tabulation/SeatAuditionFormController.php index f06c392..eb97dff 100644 --- a/app/Http/Controllers/Tabulation/SeatAuditionFormController.php +++ b/app/Http/Controllers/Tabulation/SeatAuditionFormController.php @@ -50,6 +50,7 @@ class SeatAuditionFormController extends Controller $entryData = []; $entries = $this->ranker->rank('seating', $audition); $entries->load('student.school'); + $entries->load('student.doublerRequests'); $seatable = [ 'allScored' => true, 'doublersResolved' => true, @@ -71,6 +72,7 @@ class SeatAuditionFormController extends Controller 'totalScore' => $totalScoreColumn, 'fullyScored' => $fullyScored, 'doubleData' => $doublerData, + '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') { @@ -97,7 +99,8 @@ class SeatAuditionFormController extends Controller }); } - return view('tabulation.auditionSeating', compact('entryData', 'audition', 'rightPanel', 'seatableEntries', 'requestedEnsembleAccepts')); + return view('tabulation.auditionSeating', + compact('entryData', 'audition', 'rightPanel', 'seatableEntries', 'requestedEnsembleAccepts')); } protected function pickRightPanel(Audition $audition, array $seatable) @@ -106,6 +109,7 @@ class SeatAuditionFormController extends Controller $resultsWindow = new GetAuditionSeats; $rightPanel['view'] = 'tabulation.auditionSeating-show-published-seats'; $rightPanel['data'] = $resultsWindow($audition); + return $rightPanel; } if ($seatable['allScored'] == false || $seatable['doublersResolved'] == false) { diff --git a/resources/views/tabulation/auditionSeating-results-table.blade.php b/resources/views/tabulation/auditionSeating-results-table.blade.php index 1279f96..64155d3 100644 --- a/resources/views/tabulation/auditionSeating-results-table.blade.php +++ b/resources/views/tabulation/auditionSeating-results-table.blade.php @@ -27,6 +27,9 @@ @if($entry['doubleData']) + @if($entry['doublerRequest']) +

Request: {{$entry['doublerRequest']}}

+ @endif @include('tabulation.auditionSeating-doubler-block') {{-- DOUBLER
--}} {{-- @foreach($entry['doubleData'] as $double)--}} -- 2.39.5