If an audition has a prelim, only show finals judges entries that have passed prelims.

This commit is contained in:
Matt Young 2025-10-14 18:20:09 -05:00
parent 982dfa46a0
commit b2d66eb1b8
1 changed files with 5 additions and 0 deletions

View File

@ -41,6 +41,11 @@ class JudgingController extends Controller
return redirect()->route('judging.index')->with('error', 'You are not assigned to judge that audition');
}
$entries = Entry::where('audition_id', '=', $audition->id)->orderBy('draw_number')->with('audition')->get();
// If there is a prelim audition, only show entries that have passed the prelim
if ($audition->prelimDefinition) {
$entries = $entries->reject(fn ($entry) => ! $entry->hasFlag('passed_prelim'));
}
$subscores = $audition->scoringGuide->subscores()->orderBy('display_order')->get();
$votes = JudgeAdvancementVote::where('user_id', Auth::id())->get();