Simplify url

This commit is contained in:
Marcus Moore 2023-12-20 16:48:25 -08:00
parent 578495bab6
commit fda77179a3
No known key found for this signature in database
2 changed files with 7 additions and 6 deletions

View file

@ -423,7 +423,7 @@
<script>
$('#saved_report_select')
.on('select2:select', function (event) {
window.location.href = '/reports/saved-templates/' + event.params.data.id;
window.location.href = '/reports/templates/' + event.params.data.id;
})
.on('select2:clearing', function (event) {
window.location.href = '{{ route('reports/custom') }}';

View file

@ -357,11 +357,12 @@ Route::group(['middleware' => ['auth']], function () {
)->name('reports/export/accessories');
Route::get('reports/custom', [ReportsController::class, 'getCustomReport'])->name('reports/custom');
Route::post('reports/custom', [ReportsController::class, 'postCustom']);
Route::post('reports/saved-templates', [ReportTemplatesController::class, 'store'])->name('report-templates.store');
Route::get('reports/saved-templates/{reportId}', [ReportTemplatesController::class, 'show'])->name('report-templates.show');
Route::get('reports/saved-templates/{reportId}/edit', [ReportTemplatesController::class, 'edit'])->name('report-templates.edit');
Route::post('reports/saved-templates/{reportId}', [ReportTemplatesController::class, 'update'])->name('report-templates.update');
Route::delete('reports/saved-templates/{reportId}', [ReportTemplatesController::class, 'destroy'])->name('report-templates.destroy');
Route::post('reports/templates', [ReportTemplatesController::class, 'store'])->name('report-templates.store');
Route::get('reports/templates/{reportId}', [ReportTemplatesController::class, 'show'])->name('report-templates.show');
Route::get('reports/templates/{reportId}/edit', [ReportTemplatesController::class, 'edit'])->name('report-templates.edit');
Route::post('reports/templates/{reportId}', [ReportTemplatesController::class, 'update'])->name('report-templates.update');
Route::delete('reports/templates/{reportId}', [ReportTemplatesController::class, 'destroy'])->name('report-templates.destroy');
Route::get(
'reports/activity',