diff --git a/app/Http/Controllers/Tabulation/TabulationController.php b/app/Http/Controllers/Tabulation/TabulationController.php index 88b8d07..b00b271 100644 --- a/app/Http/Controllers/Tabulation/TabulationController.php +++ b/app/Http/Controllers/Tabulation/TabulationController.php @@ -82,7 +82,7 @@ class TabulationController extends Controller public function status() { - $auditions = Audition::with('entries.scoreSheets')->with('room.judges')->orderBy('score_order')->get(); + $auditions = Audition::with(['entries.scoreSheets','room.judges'])->orderBy('score_order')->get(); return view('tabulation.status',compact('auditions')); } @@ -93,7 +93,7 @@ class TabulationController extends Controller // $entries = $entries->sortByDesc(function ($entry) { // return $entry->totalScore(); // }); - $entries = $audition->rankedEntries()->load('student','scoreSheets.audition.scoringGuide.subscores'); + $entries = $audition->rankedEntries()->load('student.entries','scoreSheets.audition.scoringGuide.subscores'); $judges = $audition->judges(); return view('tabulation.auditionSeating',compact('audition','entries','judges')); } diff --git a/app/Models/Entry.php b/app/Models/Entry.php index f00bc67..5fd8a6b 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -59,6 +59,10 @@ class Entry extends Model } + + public function fullyJudged(){ + return $this->scoreSheets->count() >= $this->audition->room->judges->count(); + } public function scoreFromJudge($user): ScoreSheet|null { // return $this->scoreSheets()->where('user_id','=',$user)->first() ?? null; diff --git a/app/Models/Student.php b/app/Models/Student.php index c4b7089..afa878f 100644 --- a/app/Models/Student.php +++ b/app/Models/Student.php @@ -34,4 +34,9 @@ class Student extends Model return $this->first_name . ' ' . $this->last_name; } + public function isDoubler() + { + return $this->entries->count() > 1; + } + } diff --git a/resources/views/components/icons/checkmark.blade.php b/resources/views/components/icons/checkmark.blade.php new file mode 100644 index 0000000..3231384 --- /dev/null +++ b/resources/views/components/icons/checkmark.blade.php @@ -0,0 +1,4 @@ +@props(['color' => 'currentColor']) + diff --git a/resources/views/components/layout/navbar/menus/admin.blade.php b/resources/views/components/layout/navbar/menus/admin.blade.php index 3ba7785..72ef8cd 100644 --- a/resources/views/components/layout/navbar/menus/admin.blade.php +++ b/resources/views/components/layout/navbar/menus/admin.blade.php @@ -1,7 +1,7 @@
{{--