srp admin controller

This commit is contained in:
2019-07-03 20:38:01 -05:00
parent abc9364afb
commit f7d2a5f23b
2 changed files with 10 additions and 3 deletions

View File

@@ -111,8 +111,8 @@ class SRPAdminController extends Controller
public function displayStatistics() {
$months = 3;
$barChartData = array();
$now = Carbon::now()->toDateTimeString();
$previous = Carbon::now()->subMonths(3)->toDateTimeString();
$start = Carbon::now()->toFormattedDateString();
$end = Carbon::now()->subMonths(3)->toFormattedDateString();
//We need a function from this library rather than recreating a new library
$srpHelper = new SRPHelper();
@@ -188,7 +188,9 @@ class SRPAdminController extends Controller
$lava->BarChart('FCs', $fcs);
return view('srp.admin.statistics')->with('lava', $lava);
return view('srp.admin.statistics')->with('lava', $lava)
->with('start', $start)
->with('end', $end);
}
public function displayCostCodes() {

View File

@@ -15,4 +15,9 @@
<div id="fc-losses-div"></div>
{!! $lava->render('BarChart', 'FCs', 'fc-losses-div') !!}
</div>
<div class="container">
{{ $start }}<br>
{{ $end }}<br>
</div>
@endsection