Disable director results
This commit is contained in:
parent
dc4b33ab51
commit
34334595b2
|
|
@ -31,28 +31,30 @@ class DashboardController extends Controller
|
|||
GetEntrySeatingResult $resultGenerator,
|
||||
RankAuditionEntries $ranker
|
||||
) {
|
||||
$entries = Auth::user()->entries;
|
||||
$entries = $entries->filter(function ($entry) {
|
||||
return $entry->audition->hasFlag('seats_published');
|
||||
});
|
||||
$entries = $entries->sortBy(function ($entry) {
|
||||
return $entry->student->full_name(true);
|
||||
});
|
||||
$scores = [];
|
||||
$results = [];
|
||||
$ranks = [];
|
||||
foreach ($entries as $entry) {
|
||||
$results[$entry->id] = $resultGenerator->getResult($entry);
|
||||
if (! $entry->hasFlag('no_show') && ! $entry->hasFlag('failed_prelim')) {
|
||||
$scores[$entry->id] = $scoreCalc->calculate('seating', $entry);
|
||||
$auditionResults = $ranker->rank('seating', $entry->audition);
|
||||
$ranks[$entry->id] = $auditionResults->firstWhere('id', $entry->id)->raw_rank;
|
||||
}
|
||||
}
|
||||
$showRecapLink = AuditionFlag::where('flag_name', 'seats_published')->count() > 0;
|
||||
|
||||
return view('dashboard.dashboard', compact('entries', 'scores', 'results', 'ranks', 'showRecapLink'));
|
||||
//return view('dashboard.dashboard');
|
||||
// Info for director results report
|
||||
// $entries = Auth::user()->entries;
|
||||
// $entries = $entries->filter(function ($entry) {
|
||||
// return $entry->audition->hasFlag('seats_published');
|
||||
// });
|
||||
// $entries = $entries->sortBy(function ($entry) {
|
||||
// return $entry->student->full_name(true);
|
||||
// });
|
||||
// $scores = [];
|
||||
// $results = [];
|
||||
// $ranks = [];
|
||||
// foreach ($entries as $entry) {
|
||||
// $results[$entry->id] = $resultGenerator->getResult($entry);
|
||||
// if (! $entry->hasFlag('no_show') && ! $entry->hasFlag('failed_prelim')) {
|
||||
// $scores[$entry->id] = $scoreCalc->calculate('seating', $entry);
|
||||
// $auditionResults = $ranker->rank('seating', $entry->audition);
|
||||
// $ranks[$entry->id] = $auditionResults->firstWhere('id', $entry->id)->raw_rank;
|
||||
// }
|
||||
// }
|
||||
// $showRecapLink = AuditionFlag::where('flag_name', 'seats_published')->count() > 0;
|
||||
|
||||
//return view('dashboard.dashboard', compact('entries', 'scores', 'results', 'ranks', 'showRecapLink'));
|
||||
return view('dashboard.dashboard');
|
||||
}
|
||||
|
||||
public function my_school()
|
||||
|
|
|
|||
Loading…
Reference in New Issue