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); $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; } } } $complete = $entries->every(function ($entry) { return $entry->scoring_complete; }); return view('tabulation.auditionSeating', compact('audition', 'entries', 'complete', 'doublerComplete')); } }