srp testing
This commit is contained in:
@@ -137,6 +137,7 @@ class SRPAdminController extends Controller
|
||||
|
||||
//Get the losses by Fleet Commander Name, and populate variables for the table
|
||||
$fcNames = SRPShip::pluck('fleet_commander_name');
|
||||
dd($fcNames);
|
||||
foreach($fcNames as $name) {
|
||||
$total = SRPShip::where(['fleet_commander_name' => $name])
|
||||
->sum('loss_value');
|
||||
@@ -148,6 +149,8 @@ class SRPAdminController extends Controller
|
||||
array_push($barChartData, $temp);
|
||||
}
|
||||
|
||||
dd($barChartData);
|
||||
|
||||
//Pie Chart for approval, denied, and under review
|
||||
$lava = new Lavacharts; // See note below for Laravel
|
||||
|
||||
|
||||
@@ -59,10 +59,14 @@ class SRPController extends Controller
|
||||
$lossValue = str_replace(',', '', $lossValue);
|
||||
$lossValue = floatval($lossValue);
|
||||
|
||||
//Convert the FC name to a regular case of characters
|
||||
$tempFcName = strtolower($request->FC);
|
||||
$tempFcName = ucwords($tempFcName);
|
||||
|
||||
$ship = new SRPShip;
|
||||
$ship->character_id = auth()->user()->character_id;
|
||||
$ship->character_name = auth()->user()->name;
|
||||
$ship->fleet_commander_name = $request->FC;
|
||||
$ship->fleet_commander_name = $tempFcName;
|
||||
if(isset($fcId[0])) {
|
||||
$ship->fleet_commander_id = $fcId[0]->character_id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user