views for mining taxes. next up is routes in the next update
This commit is contained in:
@@ -134,14 +134,12 @@ class MiningTaxesInvoices extends Command
|
||||
$subject = 'Warped Intentions Mining Taxes';
|
||||
$sender = $config['primary'];
|
||||
$recipientType = 'character';
|
||||
$recipient = $config['primary'];
|
||||
$recipient = $charId;
|
||||
|
||||
//Send the Eve Mail Job to the queue to be dispatched
|
||||
ProcessSendEveMailJob::dispatch($body, $recipient, $recipientType, $subject, $sender)->onQueue('mail');
|
||||
}
|
||||
|
||||
//CalculateMiningTaxesJob::dispatch()->onQueue('miningtaxes');
|
||||
|
||||
//Set the task as stopped
|
||||
$task->SetStopStatus();
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
@extends('layouts.admin.dashb4')
|
||||
@section('content')
|
||||
<br>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Paid Invoices</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<th>Character</th>
|
||||
<th>Invoice Id</th>
|
||||
<th>Amount</th>
|
||||
<th>Date Issued</th>
|
||||
<th>Date Due</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoices as $invoice)
|
||||
<tr>
|
||||
<td>{{ $invoice->character_name }}</td>
|
||||
<td>{{ $invoice->invoice_id }}</td>
|
||||
<td>{{ $invoice->amount }}</td>
|
||||
<td>{{ $invoice->date_issued }}</td>
|
||||
<td>{{ $invoice->date_due }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
{{ $invoices->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
47
resources/views/miningtax/admin/display/unpaid.blade.php
Normal file
47
resources/views/miningtax/admin/display/unpaid.blade.php
Normal file
@@ -0,0 +1,47 @@
|
||||
@extends('layouts.admin.dashb4')
|
||||
@section('content')
|
||||
<br>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Invoice Status</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<th>Character</th>
|
||||
<th>Invoice Id</th>
|
||||
<th>Amount</th>
|
||||
<th>Date Issued</th>
|
||||
<th>Date Due</th>
|
||||
<th>Status</th>
|
||||
<th>Update</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoices as $invoice)
|
||||
<tr>
|
||||
<td>{{ $invoice->character_name }}</td>
|
||||
<td>{{ $invoice->invoice_id }}</td>
|
||||
<td>{{ $invoice->amount }}</td>
|
||||
<td>{{ $invoice->date_issued }}</td>
|
||||
<td>{{ $invoice->date_due }}</td>
|
||||
<td>{{ $invoice->status }}</td>
|
||||
<td>
|
||||
{!! Form::open(['action' => 'MiningTax\MiningTaxesAdminController@UpdateInvoice', 'method' => 'POST']) !!}
|
||||
{{ Form::hidden('invoiceId', $invoice->invoice_id, ['class' => 'form-control']) }}
|
||||
{{ Form::label('status', Paid) }}
|
||||
{{ Form::radio('status', 'Paid', ['class' => 'form-control']) }}
|
||||
{{ Form::label('status', 'Delete') }}
|
||||
{{ Form::radio('status', 'Delete', ['class' => 'form-control']) }}
|
||||
{{ Form::submit('Submit', ['class' => 'btn btn-primary']) }}
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
{{ $invoices->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
109
resources/views/miningtax/user/display/invoices.blade.php
Normal file
109
resources/views/miningtax/user/display/invoices.blade.php
Normal file
@@ -0,0 +1,109 @@
|
||||
@extends('layouts.user.dashb4')
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Unpaid Invoices</h2><br>
|
||||
<h3>Amount: {!! $unpaidAmount !!}</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<th>Invoice Id</th>
|
||||
<th>Amount</th>
|
||||
<th>Due Date</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($unpaid as $un)
|
||||
<tr>
|
||||
<td>{{ $un->invoice_id }}</td>
|
||||
<td>{{ $un->amount }}</td>
|
||||
<td>{{ $un->due_date }}</td>
|
||||
</tr>
|
||||
@endforeach()
|
||||
</tbody>
|
||||
</table>
|
||||
{{ $unpaid->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Paid Invoices</h2><br>
|
||||
<h3>Amount: {!! $paidAmount !!}</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<th>Invoice Id</th>
|
||||
<th>Amount</th>
|
||||
<th>Due Date</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($paid as $p)
|
||||
<tr>
|
||||
<td>{{ $p->invoice_id }}</td>
|
||||
<td>{{ $p->amount }}</td>
|
||||
<td>{{ $p->due_date }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
{{ $paid->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Late Invoices</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<th>Invoice Id</th>
|
||||
<th>Amount</th>
|
||||
<th>Due Date</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($late as $l)
|
||||
<tr>
|
||||
<td>{{ $l->invoice_id }}</td>
|
||||
<td>{{ $l->amount }}</td>
|
||||
<td>{{ $l->due_date }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
{{ $late->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Deferred Invoices</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<th>Invoice Id</th>
|
||||
<th>Amount</th>
|
||||
<th>Due Date</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($deferred as $d)
|
||||
<tr>
|
||||
<td>{{ $d->invoice_id }}</td>
|
||||
<td>{{ $d->amount }}</td>
|
||||
<td>{{ $d->due_date }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
{{ $deferred->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
49
resources/views/miningtax/user/display/ledger.blade.php
Normal file
49
resources/views/miningtax/user/display/ledger.blade.php
Normal file
@@ -0,0 +1,49 @@
|
||||
@extends('layouts.user.dashb4')
|
||||
@section('content')
|
||||
<br>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="container">
|
||||
<h2>Moon Mining Ledgers</h2>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<ul class="nav nav-pills">
|
||||
@foreach($structures as $structure)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="pill" href="#W4RP-{{$structure}}">{{$structure}}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<br>
|
||||
<div class="tab-content">
|
||||
@foreach($structures as $structure)
|
||||
<div id="W4RP-{{$structure}}" class="tab-pane fade">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<th>Structure</th>
|
||||
<th>Character</th>
|
||||
<th>Corp Ticker</th>
|
||||
<th>Ore</th>
|
||||
<th>Quantity</th>
|
||||
<th>Updated</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($miningLedgers as $ledger)
|
||||
@if($ledger['structure'] == $structure['name'])
|
||||
<tr>
|
||||
<td>{{ $ledger['structure'] }}</td>
|
||||
<td>{{ $ledger['character'] }}</td>
|
||||
<td>{{ $ledger['corpTicker'] }}</td>
|
||||
<td>{{ $ledger['ore'] }}</td>
|
||||
<td>{{ $ledger['quantity'] }}</td>
|
||||
<td>{{ $ledger['updated'] }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
31
resources/views/miningtax/user/display/upcoming.blade.php
Normal file
31
resources/views/miningtax/user/display/upcoming.blade.php
Normal file
@@ -0,0 +1,31 @@
|
||||
@extends('layouts.user.dashb4')
|
||||
@section('content')
|
||||
<br>
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Upcoming Extractions</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<th>Structure Name</th>
|
||||
<th>Start Time</th>
|
||||
<th>Arrival Time</th>
|
||||
<th>Decay Time</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($extractions as $ex)
|
||||
<tr>
|
||||
<td>{{ $ex->structure_name }}</td>
|
||||
<td>{{ $ex->start_time }}</td>
|
||||
<td>{{ $ex->arrival_time }}</td>
|
||||
<td>{{ $ex->decay_time }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user