From fe8f74372bc3122d9480668d78478ef46708a84b Mon Sep 17 00:00:00 2001 From: Matt Young Date: Thu, 7 Nov 2024 16:26:39 -0600 Subject: [PATCH] Fix bug in advancement No shows would not be seen as scored and would block the advancement. --- app/Http/Controllers/Tabulation/AdvancementController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Tabulation/AdvancementController.php b/app/Http/Controllers/Tabulation/AdvancementController.php index b5499fc..d759c79 100644 --- a/app/Http/Controllers/Tabulation/AdvancementController.php +++ b/app/Http/Controllers/Tabulation/AdvancementController.php @@ -12,6 +12,7 @@ use Illuminate\Support\Facades\Cache; class AdvancementController extends Controller { protected RankAuditionEntries $ranker; + public function __construct(RankAuditionEntries $ranker) { $this->ranker = $ranker; @@ -58,7 +59,7 @@ class AdvancementController extends Controller $entries->load('advancementVotes'); $scoringComplete = $entries->every(function ($entry) { - return $entry->score_totals[0] >= 0; + return $entry->score_totals[0] >= 0 || $entry->hasFlag('no_show'); }); return view('tabulation.advancement.ranking', compact('audition', 'entries', 'scoringComplete')); @@ -74,6 +75,7 @@ class AdvancementController extends Controller $entry->addFlag('will_advance'); } Cache::forget('audition'.$audition->id.'advancement'); + return redirect()->route('advancement.ranking', ['audition' => $audition->id])->with('success', 'Passers have been set successfully'); } @@ -85,6 +87,7 @@ class AdvancementController extends Controller $entry->removeFlag('will_advance'); } Cache::forget('audition'.$audition->id.'advancement'); + return redirect()->route('advancement.ranking', ['audition' => $audition->id])->with('success', 'Passers have been cleared successfully'); }