Remove depricated action GetEntrySeatingResult
This commit is contained in:
parent
5ff3785f9f
commit
2f3c46973f
|
|
@ -1,44 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Actions\Entries;
|
|
||||||
|
|
||||||
use App\Models\Entry;
|
|
||||||
use App\Models\Seat;
|
|
||||||
|
|
||||||
class GetEntrySeatingResult
|
|
||||||
{
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public function __invoke(Entry $entry): string
|
|
||||||
{
|
|
||||||
return $this->getResult($entry);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getResult(Entry $entry): string
|
|
||||||
{
|
|
||||||
if ($entry->hasFlag('failed_prelim')) {
|
|
||||||
return 'Failed Prelim';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($entry->hasFlag('no_show')) {
|
|
||||||
return 'No Show';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($entry->hasFlag('declined')) {
|
|
||||||
return 'Declined';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($entry->hasFlag('failed_prelim')) {
|
|
||||||
return 'Did not pass prelim';
|
|
||||||
}
|
|
||||||
|
|
||||||
$seat = Seat::where('entry_id', $entry->id)->first();
|
|
||||||
if ($seat) {
|
|
||||||
return $seat->ensemble->name.' '.$seat->seat;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 'Entry not seated';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue