fix duplicate route name
This commit is contained in:
parent
2ffe14e43c
commit
bf502f4cbb
|
|
@ -45,7 +45,15 @@ class PrelimJudgingController extends Controller
|
|||
$oldSheet = PrelimScoreSheet::where('user_id', Auth::id())->where('entry_id',
|
||||
$entry->id)->value('subscores') ?? null;
|
||||
|
||||
return view('judging.prelim_entry_form', compact('entry', 'oldSheet'));
|
||||
if ($oldSheet) {
|
||||
$formRoute = 'update.savePrelimScoreSheet';
|
||||
$formMethod = 'PATCH';
|
||||
} else {
|
||||
$formRoute = 'judging.savePrelimScoreSheet';
|
||||
$formMethod = 'POST';
|
||||
}
|
||||
|
||||
return view('judging.prelim_entry_form', compact('entry', 'oldSheet', 'formRoute', 'formMethod'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class AdvancementController extends Controller
|
|||
return $entry->hasFlag('no_show');
|
||||
});
|
||||
|
||||
$scoringComplete = $audition->entries->where('for_advancement, true')->every(function ($entry) {
|
||||
$scoringComplete = $audition->entries->where('for_advancement', true)->every(function ($entry) {
|
||||
return $entry->totalScore || $entry->hasFlag('no_show');
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -15,11 +15,9 @@
|
|||
</ul>
|
||||
</x-slot:subheading>
|
||||
</x-card.heading>
|
||||
<x-form.form method="POST" action="{{ route('judging.savePrelimScoreSheet', $entry) }}">
|
||||
@if($oldSheet)
|
||||
{{-- if there are existing scores, make this a patch request --}}
|
||||
@method('PATCH')
|
||||
@endif
|
||||
<x-form.form method="POST" action="{{ route($formRoute, $entry) }}">
|
||||
@method($formMethod)
|
||||
|
||||
<x-card.list.body class="mt-1">
|
||||
@foreach($entry->audition->prelimDefinition->scoringGuide->subscores()->orderBy('display_order')->get() as $subscore)
|
||||
@php
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Route::middleware(['auth', 'verified', CheckIfCanJudge::class])->prefix('judging
|
|||
Route::get('/{prelimDefinition}', 'prelimEntryList')->name('judging.prelimEntryList');
|
||||
route::get('/enterScore/{entry}', 'prelimScoreEntryForm')->name('judging.prelimScoreEntryForm');
|
||||
route::post('/enterScore/{entry}', 'savePrelimScoreSheet')->name('judging.savePrelimScoreSheet');
|
||||
route::patch('/enterScore/{entry}', 'updatePrelimScoreSheet')->name('judging.savePrelimScoreSheet');
|
||||
route::patch('/enterScore/{entry}', 'updatePrelimScoreSheet')->name('judging.updatePrelimScoreSheet');
|
||||
});
|
||||
|
||||
// Bonus score judging routes
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ it('calls the YearEndCleanup action', function () {
|
|||
$mock->shouldReceive('__invoke')->once();
|
||||
app()->instance(YearEndCleanup::class, $mock);
|
||||
actAsAdmin();
|
||||
$response = $this->post(route('execute_admin.year_end_procedures'));
|
||||
$response = $this->post(route('admin.execute_year_end_procedures'));
|
||||
$response->assertRedirect(route('dashboard'))
|
||||
->with('success', 'Year end cleanup completed. ');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue