diff --git a/app/Http/Controllers/Dashboard/DashboardController.php b/app/Http/Controllers/Dashboard/DashboardController.php index c283d83..08e5e6a 100644 --- a/app/Http/Controllers/Dashboard/DashboardController.php +++ b/app/Http/Controllers/Dashboard/DashboardController.php @@ -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,