Auditionadmin 68 #85

Merged
okorpheus merged 11 commits from auditionadmin-68 into master 2024-10-31 17:22:49 +00:00
1 changed files with 2 additions and 0 deletions
Showing only changes of commit 653305c938 - Show all commits

View File

@ -7,6 +7,7 @@
namespace App\Actions\Tabulation; namespace App\Actions\Tabulation;
use App\Exceptions\ScoreEntryException; use App\Exceptions\ScoreEntryException;
use App\Models\CalculatedScore;
use App\Models\Entry; use App\Models\Entry;
use App\Models\ScoreSheet; use App\Models\ScoreSheet;
use App\Models\User; use App\Models\User;
@ -24,6 +25,7 @@ class EnterScore
*/ */
public function __invoke(User $user, Entry $entry, array $scores, ScoreSheet|false $scoreSheet = false): ScoreSheet public function __invoke(User $user, Entry $entry, array $scores, ScoreSheet|false $scoreSheet = false): ScoreSheet
{ {
CalculatedScore::where('entry_id', $entry->id)->delete();
$scores = collect($scores); $scores = collect($scores);
$this->basicChecks($user, $entry, $scores); $this->basicChecks($user, $entry, $scores);
$this->checkJudgeAssignment($user, $entry); $this->checkJudgeAssignment($user, $entry);