46 lines
1.2 KiB
PHP
46 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Tabulation;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\Audition;
|
|
use App\Models\Entry;
|
|
use App\Models\ScoreSheet;
|
|
use App\Services\DoublerService;
|
|
use App\Services\TabulationService;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Session;
|
|
use function compact;
|
|
use function dd;
|
|
use function dump;
|
|
use function redirect;
|
|
|
|
class TabulationController extends Controller
|
|
{
|
|
protected $tabulationService;
|
|
protected $doublerService;
|
|
|
|
public function __construct(TabulationService $tabulationService, DoublerService $doublerService)
|
|
{
|
|
$this->tabulationService = $tabulationService;
|
|
$this->doublerService = $doublerService;
|
|
}
|
|
|
|
|
|
public function status()
|
|
{
|
|
$auditions = $this->tabulationService->getAuditionsWithStatus();
|
|
return view('tabulation.status',compact('auditions'));
|
|
}
|
|
|
|
public function auditionSeating(Audition $audition)
|
|
{
|
|
$entries = $this->tabulationService->auditionEntries($audition->id);
|
|
foreach ($entries as $entry) {
|
|
$entry->is_doubler = $this->doublerService->entryIsDoubler($entry);
|
|
}
|
|
return view('tabulation.auditionSeating',compact('audition','entries'));
|
|
}
|
|
|
|
}
|