Delete bonus scores when an entry is flagged as a no show
This commit is contained in:
parent
e2a41fdb9c
commit
9742cdbd76
|
|
@ -3,6 +3,7 @@
|
|||
namespace App\Http\Controllers\Tabulation;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\BonusScore;
|
||||
use App\Models\CalculatedScore;
|
||||
use App\Models\Entry;
|
||||
use App\Models\ScoreSheet;
|
||||
|
|
@ -83,6 +84,7 @@ class EntryFlagController extends Controller
|
|||
$entry->addFlag('no_show');
|
||||
ScoreSheet::where('entry_id', $entry->id)->delete();
|
||||
CalculatedScore::where('entry_id', $entry->id)->delete();
|
||||
BonusScore::where('entry_id', $entry->id)->delete();
|
||||
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');
|
||||
|
|
|
|||
Loading…
Reference in New Issue