Show assigned prelim auditions on judging dashboard

This commit is contained in:
Matt Young 2025-09-22 20:59:32 -05:00
parent 2418873af0
commit a609c9d627
4 changed files with 14 additions and 1 deletions

View File

@ -27,7 +27,7 @@ class JudgingController extends Controller
public function index() public function index()
{ {
$rooms = Auth::user()->judgingAssignments()->with('auditions')->get(); $rooms = Auth::user()->judgingAssignments()->with('auditions')->with('prelimAuditions')->get();
$bonusScoresToJudge = Auth::user()->bonusJudgingAssignments()->with('auditions')->get(); $bonusScoresToJudge = Auth::user()->bonusJudgingAssignments()->with('auditions')->get();
//$rooms->load('auditions'); //$rooms->load('auditions');

View File

@ -19,6 +19,11 @@ class Room extends Model
return $this->hasMany(Audition::class)->orderBy('order_in_room')->orderBy('score_order'); return $this->hasMany(Audition::class)->orderBy('order_in_room')->orderBy('score_order');
} }
public function prelimAuditions(): HasMany
{
return $this->hasMany(PrelimDefinition::class);
}
public function entries(): HasManyThrough public function entries(): HasManyThrough
{ {
return $this->hasManyThrough( return $this->hasManyThrough(

View File

@ -13,6 +13,11 @@
<x-card.list.row class="!py-3 ml-3">{{ $audition->name }}</x-card.list.row> <x-card.list.row class="!py-3 ml-3">{{ $audition->name }}</x-card.list.row>
</a> </a>
@endforeach @endforeach
@foreach($room->prelimAuditions as $prelimAudition)
<a href="{{ route('judging.prelimEntryList', $prelimAudition->audition) }}">
<x-card.list.row class="!py-3 ml-3">{{ $prelimAudition->audition->name }} Prelims</x-card.list.row>
</a>
@endforeach
</x-card.list.body> </x-card.list.body>
</x-card.card> </x-card.card>
@endforeach @endforeach

View File

@ -14,6 +14,9 @@ Route::middleware(['auth', 'verified', CheckIfCanJudge::class])->prefix('judging
Route::get('/entry/{entry}', 'entryScoreSheet')->name('judging.entryScoreSheet'); Route::get('/entry/{entry}', 'entryScoreSheet')->name('judging.entryScoreSheet');
Route::post('/entry/{entry}', 'saveScoreSheet')->name('judging.saveScoreSheet'); Route::post('/entry/{entry}', 'saveScoreSheet')->name('judging.saveScoreSheet');
Route::patch('/entry/{entry}', 'updateScoreSheet')->name('judging.updateScoreSheet'); Route::patch('/entry/{entry}', 'updateScoreSheet')->name('judging.updateScoreSheet');
// Prelim Audition Related Routes
Route::get('/audition/{audition}/prelim', 'prelimEntryList')->name('judging.prelimEntryList');
}); });
// Bonus score judging routes // Bonus score judging routes