added controller layouts for display pages

This commit is contained in:
2021-02-07 04:27:51 +09:00
parent 8ab88d29f3
commit eabbf5ce58
3 changed files with 80 additions and 32 deletions

View File

@@ -0,0 +1,11 @@
<?php
namespace App\Http\Controllers\MiningTaxes;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class MiningTaxesAdminController extends Controller
{
//
}

View File

@@ -0,0 +1,56 @@
<?php
namespace App\Http\Controllers\MiningTaxes;
//Internal Library
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Log;
use Carbon\Carbon;
use Khill\Lavacharts\Lavacharts;
use Auth;
//Library Helpers
use App\Library\Lookups\LookupHelper;
use App\Library\Structures\StructureHelper;
//Models
use App\Models\Moon\ItemComposition;
use App\Models\Moon\MineralPrice;
use App\Models\MiningTax\Ledger;
use App\Models\MiningTax\Observer;
use App\Models\MiningTax\Invoice;
class MiningTaxesController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
}
public function DisplayUpcomingExtractions() {
//Declare variables
$structures = array();
$sHelper = new StructureHelper;
//Get all the current observers from the database
$observers = Observer::all();
foreach($observers as $obs) {
$extraction = $sHelper->GetExtractions();
}
}
public function DisplayMiningMoons() {
}
public function DisplayAccruedTaxes() {
}
public function DisplayLedgers() {
}
}

View File

@@ -34,20 +34,22 @@ class StructureHelper {
public function __construct($char, $corp, $esi = null) {
$this->charId = $char;
$this->corpId = $corp;
$this->esi = $esi;
if($esi == null) {
$esiHelper = new Esi;
$token = $esiHelper->GetRefreshToken($char);
$this->esi = $esiHelper->SetupEsiAuthentication($token);
} else {
$this->esi = $esi;
}
}
public function GetExtractions() {
//Declare some variables
}
public function GetStructuresByPage($page) {
//Declare some variables
$esiHelper = new Esi;
if($this->esi == null) {
//Get the refresh token from the database
$token = $esiHelper->GetRefreshToken($this->charId);
//Create the esi authentication container
$this->esi = $esiHelper->SetupEsiAuthentication($token);
}
//Try to get the ESI data
try {
$structures = $this->esi->page($page)
@@ -63,14 +65,7 @@ class StructureHelper {
}
public function ProcessStructure($structure) {
//Declare some variables
$esiHelper = new Esi;
//Get the refresh token from the database
$token = $esiHelper->GetRefreshToken($this->charId);
//Setup the esi authentication container
$this->esi = $esiHelper->SetupEsiAuthentication($token);
//Get the structure information
$info = $this->GetStructureInfo($structure->structure_id);
@@ -88,13 +83,6 @@ class StructureHelper {
$esiHelper = new Esi;
$lookup = new LookupHelper;
if($this->esi == null) {
//Get the refresh token
$token = $esiHelper->GetRefreshToken($this->charId);
//Setup the esi authentication container
$this->esi = $esiHelper->SetupEsiAuthentication($token);
}
$solar = $lookup->SystemIdToName($systemId);
if($solar != null) {
@@ -108,13 +96,6 @@ class StructureHelper {
//Declare some variables
$esiHelper = new Esi;
if($this->esi == null) {
//Get the refresh token
$token = $esiHelper->GetRefreshToken($this->charId);
//Setup the esi authentication container
$this->esi = $esiHelper->SetupEsiAuthentication($token);
}
try {
$info = $this->esi->invoke('get', '/universe/structures/{structure_id}/', [
'structure_id' => $structureId,