Rewrite tabulation #14

Merged
okorpheus merged 43 commits from rewrite-tabulation into master 2024-07-14 05:36:29 +00:00
2 changed files with 5 additions and 4 deletions
Showing only changes of commit 7728707f5d - Show all commits

View File

@ -7,6 +7,7 @@ use App\Http\Controllers\Controller;
use App\Models\Audition;
use App\Models\Entry;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
class AdvancementController extends Controller
{
@ -57,7 +58,7 @@ class AdvancementController extends Controller
$entries->load('advancementVotes');
$scoringComplete = $entries->every(function ($entry) {
return $entry->scoring_complete;
return $entry->score_totals[0] >= 0;
});
return view('tabulation.advancement.ranking', compact('audition', 'entries', 'scoringComplete'));
@ -72,7 +73,7 @@ class AdvancementController extends Controller
foreach ($entries as $entry) {
$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');
}
@ -83,7 +84,7 @@ class AdvancementController extends Controller
foreach ($audition->entries as $entry) {
$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');
}

View File

@ -32,7 +32,7 @@
<span class="text-xs text-gray-400">{{ $entry->student->school->name }}</span>
</x-table.td>
<x-table.td>{{ $score }}</x-table.td>
<x-table.td class="flex space-x-1">
@foreach($entry->advancementVotes as $vote)
<div x-data="{ showJudgeName: false, timeout: null }"