srp admin controller
This commit is contained in:
@@ -111,8 +111,8 @@ class SRPAdminController extends Controller
|
|||||||
public function displayStatistics() {
|
public function displayStatistics() {
|
||||||
$months = 3;
|
$months = 3;
|
||||||
$barChartData = array();
|
$barChartData = array();
|
||||||
$now = Carbon::now()->toDateTimeString();
|
$start = Carbon::now()->toFormattedDateString();
|
||||||
$previous = Carbon::now()->subMonths(3)->toDateTimeString();
|
$end = Carbon::now()->subMonths(3)->toFormattedDateString();
|
||||||
|
|
||||||
//We need a function from this library rather than recreating a new library
|
//We need a function from this library rather than recreating a new library
|
||||||
$srpHelper = new SRPHelper();
|
$srpHelper = new SRPHelper();
|
||||||
@@ -188,7 +188,9 @@ class SRPAdminController extends Controller
|
|||||||
|
|
||||||
$lava->BarChart('FCs', $fcs);
|
$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() {
|
public function displayCostCodes() {
|
||||||
|
|||||||
@@ -15,4 +15,9 @@
|
|||||||
<div id="fc-losses-div"></div>
|
<div id="fc-losses-div"></div>
|
||||||
{!! $lava->render('BarChart', 'FCs', 'fc-losses-div') !!}
|
{!! $lava->render('BarChart', 'FCs', 'fc-losses-div') !!}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
{{ $start }}<br>
|
||||||
|
{{ $end }}<br>
|
||||||
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
Reference in New Issue
Block a user