Block entry of a prelim score for an entry with any finals scores.

This commit is contained in:
Matt Young 2025-10-20 01:11:04 -05:00
parent 30cbaf69f8
commit 0307fbc595
1 changed files with 5 additions and 0 deletions

View File

@ -38,6 +38,11 @@ class EnterPrelimScore
}
$prelimDefinition = PrelimDefinition::where('audition_id', $entry->audition->id)->first();
// Don't allow changes to prelims scores if the entry has a finals score
if ($entry->scoreSheets()->count() > 0) {
throw new AuditionAdminException('Cannot change prelims scores for an entry that has finals scores');
}
// Check that the specified user is assigned to judge this entry in prelims
$check = DB::table('room_user')
->where('user_id', $user->id)