srp history
This commit is contained in:
@@ -132,6 +132,20 @@ class SRPAdminController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
public function displayHistory() {
|
||||
|
||||
$srpApproved = SRPShip::where([
|
||||
'approved' => 'Approved',
|
||||
])->paginate(25);
|
||||
|
||||
$srpDenied = SRPShip::where([
|
||||
'approved' => 'Denied',
|
||||
])->paginate(25);
|
||||
|
||||
return view('srp.admin.history')->with('srpApproved', $srpApproved)
|
||||
->with('srpDenied', $srpDenied);
|
||||
}
|
||||
|
||||
public function displayStatistics() {
|
||||
$months = 3;
|
||||
$barChartData = array();
|
||||
|
||||
80
resources/views/srp/admin/history.blade.php
Normal file
80
resources/views/srp/admin/history.blade.php
Normal file
@@ -0,0 +1,80 @@
|
||||
@extends('srp.layouts.b4')
|
||||
@section('content')
|
||||
<div class="container col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Approved SRP Requests</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<th>Timestamp</th>
|
||||
<th>Pilot</th>
|
||||
<th>FC</th>
|
||||
<th>ZKillboard</th>
|
||||
<th>Total Loss</th>
|
||||
<th>Ship Type</th>
|
||||
<th>Payout %</th>
|
||||
<th>Fleet Type</th>
|
||||
<th>Actual SRP</th>
|
||||
<th>Notes</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($srpApproved as $approved)
|
||||
<tr>
|
||||
<td>{{ $approved->created_at }}</td>
|
||||
<td>{{ $approved->character_name }}</td>
|
||||
<td>{{ $approved->fleet_commander_name }}</td>
|
||||
<td><a href="{{ $approved->zkillboard }}" target="_blank">zKill Link</a></td>
|
||||
<td>{{ $approved->loss_value }}</td>
|
||||
<td>{{ $approved->ship_type }}</td>
|
||||
<td>{{ $approved->cost_code }}</td>
|
||||
<td>{{ $approved->fleet_type }}</td>
|
||||
<td>{{ number_format($approved->actual_srp, 2, ".", ",") }}</td>
|
||||
<td>{{ $approved->notes }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="container col-m-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Denied SRP Requests</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<th>Timestamp</th>
|
||||
<th>Pilot</th>
|
||||
<th>FC</th>
|
||||
<th>Total Loss</th>
|
||||
<th>Ship Type</th>
|
||||
<th>Payout %</th>
|
||||
<th>Fleet Type</th>
|
||||
<th>Actual SRP</th>
|
||||
<th>Notes</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($srpDenied as $denied)
|
||||
<tr>
|
||||
<td>{{ $denied->created_at }}</td>
|
||||
<td>{{ $denied->character_name }}</td>
|
||||
<td>{{ $denied->fleet_commander_name }}</td>
|
||||
<td>{{ $denied->loss_value }}</td>
|
||||
<td>{{ $denied->ship_type }}</td>
|
||||
<td>{{ $denied->cost_code }}</td>
|
||||
<td>{{ $denied->fleet_type }}</td>
|
||||
<td>{{ number_format($denied->actual_srp, 2, ".", ",") }}</td>
|
||||
<td>{{ $denied->notes }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -138,6 +138,7 @@ Route::group(['middleware' => ['auth']], function(){
|
||||
Route::get('/srp/admin/costcodes/add', 'SRP\SRPAdminController@displayAddCostCode');
|
||||
Route::post('/srp/admin/costcodes/add', 'SRP\SRPAdminController@addCostCode');
|
||||
Route::post('/srp/admin/costcodes/modify', 'SRP\SRPAdminController@modifyCostCodes');
|
||||
Route::get('/srp/admin/display', 'SRP\SRPAdminController@displayHistory');
|
||||
|
||||
/**
|
||||
* Wiki Controller display pages
|
||||
|
||||
Reference in New Issue
Block a user