From bf0e5cc8bb1c82562f1679e8bfe749774e7dc024 Mon Sep 17 00:00:00 2001 From: Matt Young Date: Thu, 31 Oct 2024 19:26:49 -0500 Subject: [PATCH] Allow for tabulators marking a failed prelim Addresses #45 --- .../Tabulation/EntryFlagController.php | 7 ++++++- .../tabulation/no_show_confirm.blade.php | 19 +++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/Tabulation/EntryFlagController.php b/app/Http/Controllers/Tabulation/EntryFlagController.php index 611aef1..7f2b860 100644 --- a/app/Http/Controllers/Tabulation/EntryFlagController.php +++ b/app/Http/Controllers/Tabulation/EntryFlagController.php @@ -83,7 +83,12 @@ class EntryFlagController extends Controller $entry->addFlag('no_show'); ScoreSheet::where('entry_id', $entry->id)->delete(); CalculatedScore::where('entry_id', $entry->id)->delete(); - $msg = 'No Show has been entered for '.$entry->audition->name.' #'.$entry->draw_number.' (ID: '.$entry->id.').'; + if (request()->input('noshow-type') == 'failprelim') { + $msg = 'Failed prelim has been entered for '.$entry->audition->name.' #'.$entry->draw_number.' (ID: '.$entry->id.').'; + $entry->addFlag('failed_prelim'); + } else { + $msg = 'No Show has been entered for '.$entry->audition->name.' #'.$entry->draw_number.' (ID: '.$entry->id.').'; + } return to_route('entry-flags.noShowSelect')->with('success', $msg); } diff --git a/resources/views/tabulation/no_show_confirm.blade.php b/resources/views/tabulation/no_show_confirm.blade.php index 0608e60..72084cb 100644 --- a/resources/views/tabulation/no_show_confirm.blade.php +++ b/resources/views/tabulation/no_show_confirm.blade.php @@ -20,7 +20,9 @@ @endforeach
- I understand that marking this entry as a no-show will delete existing scores. The scores cannot be recovered. + + I understand that marking this entry as a no-show will delete existing scores. The scores cannot be + recovered.
@endif @@ -35,10 +37,15 @@ {{ $entry->audition->name }} #{{ $entry->draw_number ?? ' no draw number' }} - - - {{ $buttonName }} - - + + + @if($buttonName == "Confirm No Show") + + + @endif + + {{ $buttonName }} + +