Fix error in admin EntryController related to updates in scoring.
This commit is contained in:
parent
4faeb63c95
commit
3319438c0d
|
|
@ -4,7 +4,6 @@ namespace App\Http\Controllers\Admin;
|
|||
|
||||
use App\Actions\Entries\CreateEntry;
|
||||
use App\Actions\Entries\UpdateEntry;
|
||||
use App\Actions\Tabulation\CalculateScoreSheetTotal;
|
||||
use App\Exceptions\ManageEntryException;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Audition;
|
||||
|
|
@ -143,7 +142,7 @@ class EntryController extends Controller
|
|||
return redirect(route('admin.entries.index'))->with('success', 'The entry has been added.');
|
||||
}
|
||||
|
||||
public function edit(Entry $entry, CalculateScoreSheetTotal $calculator, ScoreService $scoreService)
|
||||
public function edit(Entry $entry, ScoreService $scoreService)
|
||||
{
|
||||
if ($entry->audition->hasFlag('seats_published')) {
|
||||
return to_route('admin.entries.index')->with('error',
|
||||
|
|
@ -161,8 +160,8 @@ class EntryController extends Controller
|
|||
foreach ($scores as $score) {
|
||||
$score->entry = $entry;
|
||||
$score->valid = $scoreService->isScoreSheetValid($score);
|
||||
$score->seating_total_score = $calculator('seating', $entry, $score->judge)[0];
|
||||
$score->advancement_total_score = $calculator('advancement', $entry, $score->judge)[0];
|
||||
$score->seating_total_score = $score->seating_total ?? 0;
|
||||
$score->advancement_total_score = $score->advancement_total ?? 0;
|
||||
}
|
||||
|
||||
return view('admin.entries.edit', compact('entry', 'students', 'auditions', 'scores'));
|
||||
|
|
|
|||
Loading…
Reference in New Issue