Show assigned prelim auditions on judging dashboard
This commit is contained in:
parent
2418873af0
commit
a609c9d627
|
|
@ -27,7 +27,7 @@ class JudgingController extends Controller
|
|||
|
||||
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();
|
||||
|
||||
//$rooms->load('auditions');
|
||||
|
|
|
|||
|
|
@ -19,6 +19,11 @@ class Room extends Model
|
|||
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
|
||||
{
|
||||
return $this->hasManyThrough(
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@
|
|||
<x-card.list.row class="!py-3 ml-3">{{ $audition->name }}</x-card.list.row>
|
||||
</a>
|
||||
@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.card>
|
||||
@endforeach
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ Route::middleware(['auth', 'verified', CheckIfCanJudge::class])->prefix('judging
|
|||
Route::get('/entry/{entry}', 'entryScoreSheet')->name('judging.entryScoreSheet');
|
||||
Route::post('/entry/{entry}', 'saveScoreSheet')->name('judging.saveScoreSheet');
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue