Show failed prelim result on seating form

Addresses #45
This commit is contained in:
Matt Young 2024-10-31 19:40:56 -05:00
parent 5af85ae589
commit fb9efa0564
3 changed files with 10 additions and 3 deletions

View File

@ -150,6 +150,10 @@ class AllowForOlympicScoring implements CalculateEntryScore
protected function isEntryANoShow(Entry $entry): void
{
if ($entry->hasFlag('failed_prelim')) {
throw new TabulationException('Failed Prelim');
}
if ($entry->hasFlag('no_show')) {
throw new TabulationException('No Show');
}

View File

@ -72,12 +72,12 @@ class RankAuditionEntries
$entry->raw_rank = $rawRank;
// We don't really get a rank for seating if we have certain flags
if ($mode === 'seating') {
if ($entry->hasFlag('declined')) {
if ($entry->hasFlag('failed_prelim')) {
$entry->rank = 'Failed Prelim';
} elseif ($entry->hasFlag('declined')) {
$entry->rank = 'Declined';
} elseif ($entry->hasFlag('no_show')) {
$entry->rank = 'No Show';
} elseif ($entry->hasFlag('failed_prelim')) {
$entry->rank = 'Failed Prelim';
}
}

View File

@ -139,6 +139,9 @@ class SeatAuditionFormController extends Controller
if ($entry->hasFlag('no_show')) {
return true;
}
if ($entry->hasFlag('failed_prelim')) {
return true;
}
return false;
});