diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index 4d1ca65470..ed9b003817 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -56,7 +56,7 @@ class ReportController extends Controller } - return view('reports.index', compact('months', 'hasShared')); + return view('reports.index', compact('months','accounts', 'hasShared','start')); } /** diff --git a/public/js/reports.js b/public/js/reports.js index b123497481..8de6096c12 100644 --- a/public/js/reports.js +++ b/public/js/reports.js @@ -3,6 +3,21 @@ $(function () { "use strict"; drawChart(); + + $('#inputDateRange').daterangepicker( + { + minDate: minDate, + drops: 'up', + } + ); + + $('.openModal').on('click', openModal); + + + // click open the top X income list: + $('#showIncomes').click(showIncomes); + // click open the top X expense list: + $('#showExpenses').click(showExpenses); }); @@ -79,15 +94,4 @@ function showExpenses() { } return false; -} - -$(function () { - "use strict"; - $('.openModal').on('click', openModal); - - - // click open the top X income list: - $('#showIncomes').click(showIncomes); - // click open the top X expense list: - $('#showExpenses').click(showExpenses); -}); \ No newline at end of file +} \ No newline at end of file diff --git a/resources/twig/reports/index.twig b/resources/twig/reports/index.twig index 064b17ed58..c978055589 100644 --- a/resources/twig/reports/index.twig +++ b/resources/twig/reports/index.twig @@ -17,7 +17,9 @@