From e636d7b9d5484a93072b2380fafa4925fc3bef86 Mon Sep 17 00:00:00 2001 From: akemidx Date: Mon, 11 Dec 2023 15:28:34 -0500 Subject: [PATCH] multiple saved reports, beginning of dynamic dropdown listing/queried url --- app/Http/Controllers/ReportsController.php | 4 ++-- resources/views/reports/custom.blade.php | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index d60e201e77..bf00e0ce23 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -388,7 +388,7 @@ class ReportsController extends Controller * @since [v1.0] * @return \Illuminate\Http\Response */ - public function getCustomReport() + public function getCustomReport(Request $request) { $this->authorize('reports.view'); $customfields = CustomField::get(); @@ -398,7 +398,7 @@ class ReportsController extends Controller 'customfields' => $customfields, 'saved_reports' => $saved_reports, // @todo: temporary - 'savedReport' => $saved_reports->first(), + 'savedReport' => $saved_reports->find($request->input('report')), // 'savedReport' => new SavedReport, ]); } diff --git a/resources/views/reports/custom.blade.php b/resources/views/reports/custom.blade.php index 84394981ef..48138dc62f 100644 --- a/resources/views/reports/custom.blade.php +++ b/resources/views/reports/custom.blade.php @@ -386,17 +386,18 @@
- - {{ trans('admin/reports/general.select_template') }} - - -