contract dashboard

This commit is contained in:
2019-10-20 18:18:17 -05:00
parent a922675d21
commit b9544014d5

View File

@@ -8,6 +8,7 @@ use App\Http\Controllers\Controller;
//Library
use App\Library\Contracts\ContractHelper;
use App\Library\Lookups\LookupHelper;
use App\Library\Esi\Esi;
class DashboardController extends Controller
{
@@ -20,6 +21,7 @@ class DashboardController extends Controller
//Declare the contract helper
$contractHelper = new ContractHelper;
$lookupHelper = new LookupHelper;
$esiHelper = new Esi;
//Declare array variable
$contracts = array();
@@ -30,7 +32,7 @@ class DashboardController extends Controller
$tempContracts = $contractHelper->GetContracts(98615428);
foreach($tempContracts as $con) {
if($con->status != 'finished') {
if($con->status == 'outstanding') {
//Find start and end station. Need to work on how to tell citadels later.
@@ -51,11 +53,11 @@ class DashboardController extends Controller
//Compile the final array
$final = [
'pickup' => $startSystem,
'destination' => $endSystem,
'pickup' => $startStation,
'destination' => $endStation,
'type' => $con->type,
'volume' => $con->volume,
'expired' => $con->date_expired,
'expired' => $esiHelper->DecodeDate($con->date_expired),
'collateral' => $con->collateral,
'reward' => $con->reward,
'availability' => $con->availability,