tabulationService = $tabulationService; $this->doublerService = $doublerService; $this->seatingService = $seatingService; } public function status() { $auditions = $this->tabulationService->getAuditionsWithStatus(); return view('tabulation.status', compact('auditions')); } public function auditionSeating(Audition $audition) { $entries = $this->tabulationService->auditionEntries($audition->id); $complete = true; $doublerComplete = true; foreach ($entries as $entry) { if (! $entry->scoring_complete) { $complete = false; } if ($this->doublerService->studentIsDoubler($entry->student_id)) { // If this entry is a doubler if ($this->doublerService->getDoublerInfo($entry->student_id)[$entry->id]['status'] === 'undecided') { // If there is no decision for this entry $doublerComplete = false; } } } $scoringComplete = $entries->every(function ($entry) { return $entry->scoring_complete; }); $ensembleLimits = $this->seatingService->getLimitForAudition($audition->id); $auditionComplete = $scoringComplete && $doublerComplete; $seatableEntries = $this->seatingService->getSeatableEntries($audition->id); return view('tabulation.auditionSeating', compact('audition', 'entries', 'scoringComplete', 'doublerComplete', 'auditionComplete', 'ensembleLimits', 'seatableEntries')); } }