views for mining taxes. next up is routes in the next update
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\AfterActionReports;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AfterActionReportsAdminController extends Controller
|
||||
{
|
||||
public function __construct() {
|
||||
$this->middleware('auth');
|
||||
$this->middleware('permission:fc.lead');
|
||||
}
|
||||
|
||||
public function DeleteReport() {
|
||||
|
||||
}
|
||||
|
||||
public function DeleteComment() {
|
||||
|
||||
}
|
||||
|
||||
public function PruneReports() {
|
||||
|
||||
}
|
||||
|
||||
public function DisplayStastics() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\AfterActionReports;
|
||||
|
||||
//Internal Library
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
//Models
|
||||
use App\Models\AfterActionReports\Report;
|
||||
use App\Models\AfterActionReports\Comment;
|
||||
|
||||
class AfterActionReportsController extends Controller
|
||||
{
|
||||
public function __contstruct() {
|
||||
$this->middleware('auth');
|
||||
$this->middleware('permission:fc.team');
|
||||
}
|
||||
|
||||
public function DisplayReportForm() {
|
||||
//
|
||||
}
|
||||
|
||||
public function StoreReport() {
|
||||
|
||||
}
|
||||
|
||||
public function StoreComment() {
|
||||
|
||||
}
|
||||
|
||||
public function DisplayAllReports() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ class MiningTaxesAdminController extends Controller
|
||||
'status' => 'Late',
|
||||
])->orWhere([
|
||||
'status' => 'Deferred',
|
||||
])->get();
|
||||
])->get()->paginate(50);
|
||||
|
||||
return view('miningtax.admin.display.unpaid')->with('invoices', $invoices);
|
||||
}
|
||||
@@ -79,7 +79,7 @@ class MiningTaxesAdminController extends Controller
|
||||
'status' => 'Paid',
|
||||
])->orWhere([
|
||||
'status' => 'Paid Late',
|
||||
])->get();
|
||||
])->get()->paginate(50);
|
||||
|
||||
return view('miningtax.admin.display.paidinvoices')->with('invoices', $invoices);
|
||||
}
|
||||
|
||||
@@ -35,6 +35,56 @@ class MiningTaxesController extends Controller
|
||||
$this->middleware('role:User');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the users invoices
|
||||
*/
|
||||
public function DisplayMiningTaxInvoices() {
|
||||
//Declare variables
|
||||
$paidAmount = 0.00;
|
||||
$unpaidAmount = 0.00;
|
||||
|
||||
//Get the unpaid invoices
|
||||
$unpaid = Invoice::where([
|
||||
'status' => 'Pending',
|
||||
'character_id' => auth()->user()->getId(),
|
||||
])->get()->paginate(15);
|
||||
|
||||
//Get the late invoices
|
||||
$late = Invoice::where([
|
||||
'status' => 'Late',
|
||||
'character_id' => auth()->user()->getId(),
|
||||
])->get()->paginate(10);
|
||||
|
||||
//Get the deferred invoices
|
||||
$deferred = Invoice::where([
|
||||
'status' => 'Deferred',
|
||||
'character_id' => auth()->user()->getId(),
|
||||
])->get()->paginate(10);
|
||||
|
||||
//Get the paid invoices
|
||||
$paid = Invoice::where([
|
||||
'status' => 'Paid',
|
||||
'character_id' => auth()->user()->getId(),
|
||||
])->get()->paginate(15);
|
||||
|
||||
//Total up the unpaid invoices
|
||||
foreach($unpaid as $un) {
|
||||
$unpaidAmount += $un->amount;
|
||||
}
|
||||
|
||||
//Total up the paid invoices
|
||||
foreach($paid as $p) {
|
||||
$paidAmount += $p;
|
||||
}
|
||||
|
||||
return view('miningtax.user.display.invoices')->with('unpaid', $unpaid)
|
||||
->with('late', $late)
|
||||
->with('deferred', $deferred)
|
||||
->with('paid', $paid)
|
||||
->with('unpaidAmount', $unpaidAmount)
|
||||
->with('paidAmount', $paidAmount);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display all of the upcoming extractions
|
||||
*/
|
||||
@@ -57,12 +107,16 @@ class MiningTaxesController extends Controller
|
||||
//Basically get the structure info and attach it to the variable set
|
||||
foreach($extractions as $ex) {
|
||||
$sName = $sHelper->GetStructureInfo($ex->structure_id);
|
||||
$ex->structure_name = $sName;
|
||||
|
||||
array_push($structures, [
|
||||
'structure_name' => $sName,
|
||||
'start_time' => $ex->extraction_start_time,
|
||||
'arrival_time' => $ex->chunk_arrival_time,
|
||||
'decay_time' => $ex->natural_decay_time,
|
||||
]);
|
||||
}
|
||||
|
||||
//Return the view with the extractions variable for html processing
|
||||
return view('miningtax.display.upcoming')->with('extractions', $extractions);
|
||||
return view('miningtax.user.display.upcoming')->with('extractions', $extractions);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -128,12 +182,16 @@ class MiningTaxesController extends Controller
|
||||
'quantity' => $ledger->quantity,
|
||||
'updated' => $ledger->last_updated,
|
||||
]);
|
||||
|
||||
array_push($structures, [
|
||||
'name' => $structure->name,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Return the view
|
||||
return view('miningtax.display.ledger')->with('miningLedgers', $miningLedgers)
|
||||
return view('miningtax.user.display.ledger')->with('miningLedgers', $miningLedgers)
|
||||
->with('structures', $structures);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user