moon displays

This commit is contained in:
2021-05-31 23:55:12 +09:00
parent 55185bae5b
commit 0815b43797
3 changed files with 198 additions and 197 deletions

View File

@@ -86,33 +86,19 @@ class MiningTaxesController extends Controller
'Loparite', 'Loparite',
'Ytterbite', 'Ytterbite',
]; ];
/*
$systems = [
'0-NTIS',
'1-NJLK',
'35-JWD',
'8KR9-5',
'EIMJ-M',
'F-M1FU',
'G-C8QO',
'I6M-9U',
'L5D-ZL',
'L-YMYU',
'VQE-CN',
'VR-YIQ',
'XZ-SKZ',
'Y-CWQY',
];
*/
$systems = AllianceMoon::where([ $systems = AllianceMoon::where([
'rented' => 'No', 'rented' => 'No',
])->pluck('system_name')->unique()->toArray(); ])->where(['moon_type', '!=', 'R32'])
->orWhere(['moon_type', '!=', 'R64'])
->pluck('system_name')->unique()->toArray();
//Get all of the moons which are not rented //Get all of the moons which are not rented
$allyMoons = AllianceMoon::where([ $allyMoons = AllianceMoon::where([
'rented' => 'No', 'rented' => 'No',
])->get(); ])->where(['moon_type', '!=', 'R32'])
->orWhere(['moon_type', '!=', 'R64'])
->get();
foreach($allyMoons as $moon) { foreach($allyMoons as $moon) {
$ores = AllianceMoonOre::where([ $ores = AllianceMoonOre::where([
@@ -125,13 +111,13 @@ class MiningTaxesController extends Controller
]); ]);
} }
return view('miningtax.user.display.moons.allmoons')->with('moons', $moons) return view('miningtax.user.display.moons.availablemoons')->with('moons', $moons)
->with('systems', $systems) ->with('systems', $systems)
->with('r4Goo', $r4Goo) ->with('r4Goo', $r4Goo)
->with('r8Goo', $r8Goo) ->with('r8Goo', $r8Goo)
->with('r16Goo', $r16Goo) ->with('r16Goo', $r16Goo)
->with('r32Goo', $r32Goo) ->with('r32Goo', $r32Goo)
->with('r64Goo', $r64Goo); ->with('r64Goo', $r64Goo);
} }
/** /**

View File

@@ -1,170 +0,0 @@
@extends('layouts.user.dashb4')
@section('content')
<div class="container-fluid">
<div class="row">
<div class="container">
<h2>Moons in Warped Intentions Sovereignty</h2>
</div>
</div>
<br>
<ul class="nav nav-pills">
@foreach($systems as $system)
<li class="nav-item">
<a class="nav-link" data-toggle="pill" href="#W4RP-{{$system}}">{{$system}}</a>
</li>
@endforeach
</ul>
<br>
<div class="tab-content">
@foreach($systems as $system)
<div id="W4RP-{{ $system }}" class="tab-pane fade">
<table class="table table-bordered">
<thead>
<th>Location</th>
<th>Corporation</th>
<th>First Ore</th>
<th>First Quantity</th>
<th>Second Ore</th>
<th>Second Quantity</th>
<th>Third Ore</th>
<th>Third Quantity</th>
<th>Fourth Ore</th>
<th>Fourth Quantity</th>
<th>Availability</th>
</thead>
<tbody>
@foreach($moons as $moon)
@if($moon->System == $system)
@if($moon->Availability == 'Deployed')
<tr class="table-danger">
@else
<tr>
@endif
<td>{{ $moon->System . " - " . $moon->Planet . " - " . $moon->Moon }}</td>
<td>{{ $moon->Corporation }}</td>
@if(in_array($moon->FirstOre, $r4Goo))
<td class="table-secondary">{{ $moon->FirstOre }}</td>
<td class="table-secondary">{{ $moon->FirstQuantity }}</td>
@elseif(in_array($moon->FirstOre, $r8Goo))
<td class="table-primary">{{ $moon->FirstOre }}</td>
<td class="table-primary">{{ $moon->FirstQuantity }}</td>
@elseif(in_array($moon->FirstOre, $r16Goo))
<td class="table-success">{{ $moon->FirstOre }}</td>
<td class="table-success">{{ $moon->FirstQuantity }}</td>
@elseif(in_array($moon->FirstOre, $r32Goo))
<td class="table-warning">{{ $moon->FirstOre }}</td>
<td class="table-warning">{{ $moon->FirstQuantity }}</td>
@elseif(in_array($moon->FirstOre, $r64Goo))
<td class="table-danger">{{ $moon->FirstOre }}</td>
<td class="table-danger">{{ $moon->FirstQuantity }}</td>
@else
<td>{{ $moon->FirstOre }}</td>
<td>{{ $moon->FirstQuantity }}</td>
@endif
@if(in_array($moon->SecondOre, $r4Goo))
<td class="table-secondary">{{ $moon->SecondOre }}</td>
<td class="table-secondary">{{ $moon->SecondQuantity }}</td>
@elseif(in_array($moon->SecondOre, $r8Goo))
<td class="table-primary">{{ $moon->SecondOre }}</td>
<td class="table-primary">{{ $moon->SecondQuantity }}</td>
@elseif(in_array($moon->SecondOre, $r16Goo))
<td class="table-success">{{ $moon->SecondOre }}</td>
<td class="table-success">{{ $moon->SecondQuantity }}</td>
@elseif(in_array($moon->SecondOre, $r32Goo))
<td class="table-warning">{{ $moon->SecondOre }}</td>
<td class="table-warning">{{ $moon->SecondQuantity }}</td>
@elseif(in_array($moon->SecondOre, $r64Goo))
<td class="table-danger">{{ $moon->SecondOre }}</td>
<td class="table-danger">{{ $moon->SecondQuantity }}</td>
@else
<td>{{ $moon->SecondOre }}</td>
<td>{{ $moon->SecondQuantity }}</td>
@endif
@if(in_array($moon->ThirdOre, $r4Goo))
<td class="table-secondary">{{ $moon->ThirdOre }}</td>
<td class="table-secondary">{{ $moon->ThirdQuantity }}</td>
@elseif(in_array($moon->ThirdOre, $r8Goo))
<td class="table-primary">{{ $moon->ThirdOre }}</td>
<td class="table-primary">{{ $moon->ThirdQuantity }}</td>
@elseif(in_array($moon->ThirdOre, $r16Goo))
<td class="table-success">{{ $moon->ThirdOre }}</td>
<td class="table-success">{{ $moon->ThirdQuantity }}</td>
@elseif(in_array($moon->ThirdOre, $r32Goo))
<td class="table-warning">{{ $moon->ThirdOre }}</td>
<td class="table-warning">{{ $moon->ThirdQuantity }}</td>
@elseif(in_array($moon->ThirdOre, $r64Goo))
<td class="table-danger">{{ $moon->ThirdOre }}</td>
<td class="table-danger">{{ $moon->ThirdQuantity }}</td>
@else
<td>{{ $moon->ThirdOre }}</td>
<td>{{ $moon->ThirdQuantity }}</td>
@endif
@if(in_array($moon->FourthOre, $r4Goo))
<td class="table-secondary">{{ $moon->FourthOre }}</td>
<td class="table-secondary">{{ $moon->FourthQuantity }}</td>
@elseif(in_array($moon->FourthOre, $r8Goo))
<td class="table-primary">{{ $moon->FourthOre }}</td>
<td class="table-primary">{{ $moon->FourthQuantity }}</td>
@elseif(in_array($moon->FourthOre, $r16Goo))
<td class="table-success">{{ $moon->FourthOre }}</td>
<td class="table-success">{{ $moon->FourthQuantity }}</td>
@elseif(in_array($moon->FourthOre, $r32Goo))
<td class="table-warning">{{ $moon->FourthOre }}</td>
<td class="table-warning">{{ $moon->FourthQuantity }}</td>
@elseif(in_array($moon->FourthOre, $r64Goo))
<td class="table-danger">{{ $moon->FourthOre }}</td>
<td class="table-danger">{{ $moon->FourthQuantity }}</td>
@else
<td>{{ $moon->FourthOre }}</td>
<td>{{ $moon->FourthQuantity }}</td>
@endif
<td>{{ $moon->Availability }}</td>
</tr>
@endif
@endforeach
</tbody>
</table>
</div>
@endforeach
</div>
</div>
<br>
<div class="container-fluid">
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">
Legend
</div>
<div class="card-body">
<table class="table table-striped">
<tbody>
<tr class="table-secondary">
<td>R4 Ore</td>
</tr>
<tr class="table-primary">
<td>R8 Ore</td>
</tr>
<tr class="table-success">
<td>R16 Ore</td>
</tr>
<tr class="table-warning">
<td>R32 Ore</td>
</tr>
<tr class="table-danger">
<td>R64 Ore</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col"></div>
<div class="col"></div>
<div class="col"></div>
<div class="col"></div>
<div class="col"></div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,185 @@
@extends('layouts.user.dashb4')
@section('content')
<div class="container-fluid">
<div class="row">
<div class="container">
<h2>Available Moons for Rent in Warped Intentions Sovreignty</h2>
</div>
</div>
<br>
<ul class="nav nav-pills">
@foreach($systems as $system)
<li class="nav-item">
<a class="nav-link" data-toggle="pill" href="#W4RP-{{$system}}">{{$system}}</a>
</li>
@endforeach
</ul>
<br>
<div class="tab-content">
@foreach($systems as $system)
<div id="W4RP-{{ $system }}" class="tab-pane fade">
<table class="table table-striped table-bordered">
<thead>
<th>Location</th>
<th>First Ore</th>
<th>First Quantity</th>
<th>Second Ore</th>
<th>Second Quantity</th>
<th>Third Ore</th>
<th>Third Quantity</th>
<th>Fourth Ore</th>
<th>Fourth Quantity</th>
</thead>
<tbody>
@foreach($moons as $moon)
@if($moon['system'] == $system)
<tr>
<td>{{ $system }}</td>
@if(isset($moon['ores'][0]))
@if(in_array($moon['ores'][0]['ore_name'], $r4Goo))
<td class="table-secondary">{{ $moon['ores'][0]['ore_name'] }}</td>
<td class="table-secondary">{{ number_format(($moon['ores'][0]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@if(in_array($moon['ores'][0]['ore_name'], $r8Goo))
<td class="table-primary">{{ $moon['ores'][0]['ore_name'] }}</td>
<td class="table-primary">{{ number_format(($moon['ores'][0]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@if(in_array($moon['ores'][0]['ore_name'], $r16Goo))
<td class="table-success">{{ $moon['ores'][0]['ore_name'] }}</td>
<td class="table-success">{{ number_format(($moon['ores'][0]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@if(in_array($moon['ores'][0]['ore_name'], $r32Goo))
<td class="table-warning">{{ $moon['ores'][0]['ore_name'] }}</td>
<td class="table-warning">{{ number_format(($moon['ores'][0]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@if(in_array($moon['ores'][0]['ore_name'], $r64Goo))
<td class="table-danger">{{ $moon['ores'][0]['ore_name'] }}</td>
<td class="table-danger">{{ number_format(($moon['ores'][0]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@else
<td></td>
<td></td>
@endif
@if(isset($moon['ores'][1]))
@if(in_array($moon['ores'][1]['ore_name'], $r4Goo))
<td class="table-secondary">{{ $moon['ores'][1]['ore_name'] }}</td>
<td class="table-secondary">{{ number_format(($moon['ores'][1]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@if(in_array($moon['ores'][1]['ore_name'], $r8Goo))
<td class="table-primary">{{ $moon['ores'][1]['ore_name'] }}</td>
<td class="table-primary">{{ number_format(($moon['ores'][1]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@if(in_array($moon['ores'][1]['ore_name'], $r16Goo))
<td class="table-success">{{ $moon['ores'][1]['ore_name'] }}</td>
<td class="table-success">{{ number_format(($moon['ores'][1]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@if(in_array($moon['ores'][1]['ore_name'], $r32Goo))
<td class="table-warning">{{ $moon['ores'][1]['ore_name'] }}</td>
<td class="table-warning">{{ number_format(($moon['ores'][1]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@if(in_array($moon['ores'][1]['ore_name'], $r64Goo))
<td class="table-danger">{{ $moon['ores'][1]['ore_name'] }}</td>
<td class="table-danger">{{ number_format(($moon['ores'][1]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@else
<td></td>
<td></td>
@endif
@if(isset($moon['ores'][2]))
@if(in_array($moon['ores'][2]['ore_name'], $r4Goo))
<td class="table-secondary">{{ $moon['ores'][2]['ore_name'] }}</td>
<td class="table-secondary">{{ number_format(($moon['ores'][2]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@if(in_array($moon['ores'][2]['ore_name'], $r8Goo))
<td class="table-primary">{{ $moon['ores'][2]['ore_name'] }}</td>
<td class="table-primary">{{ number_format(($moon['ores'][2]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@if(in_array($moon['ores'][2]['ore_name'], $r16Goo))
<td class="table-success">{{ $moon['ores'][2]['ore_name'] }}</td>
<td class="table-success">{{ number_format(($moon['ores'][2]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@if(in_array($moon['ores'][2]['ore_name'], $r32Goo))
<td class="table-warning">{{ $moon['ores'][2]['ore_name'] }}</td>
<td class="table-warning">{{ number_format(($moon['ores'][2]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@if(in_array($moon['ores'][2]['ore_name'], $r64Goo))
<td class="table-danger">{{ $moon['ores'][2]['ore_name'] }}</td>
<td class="table-danger">{{ number_format(($moon['ores'][2]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@else
<td></td>
<td></td>
@endif
@if(isset($moon['ores'][3]))
@if(in_array($moon['ores'][3]['ore_name'], $r4Goo))
<td class="table-secondary">{{ $moon['ores'][3]['ore_name'] }}</td>
<td class="table-secondary">{{ number_format(($moon['ores'][3]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@if(in_array($moon['ores'][3]['ore_name'], $r8Goo))
<td class="table-primary">{{ $moon['ores'][3]['ore_name'] }}</td>
<td class="table-primary">{{ number_format(($moon['ores'][3]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@if(in_array($moon['ores'][3]['ore_name'], $r16Goo))
<td class="table-success">{{ $moon['ores'][3]['ore_name'] }}</td>
<td class="table-success">{{ number_format(($moon['ores'][3]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@if(in_array($moon['ores'][3]['ore_name'], $r32Goo))
<td class="table-warning">{{ $moon['ores'][3]['ore_name'] }}</td>
<td class="table-warning">{{ number_format(($moon['ores'][3]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@if(in_array($moon['ores'][3]['ore_name'], $r64Goo))
<td class="table-danger">{{ $moon['ores'][3]['ore_name'] }}</td>
<td class="table-danger">{{ number_format(($moon['ores'][3]['quantity'] * 100.00), 2, ".", ",") }}%</td>
@endif
@else
<td></td>
<td></td>
@endif
</tr>
@endif
@endforeach
</tbody>
</table>
</div>
@endforeach
</div>
</div>
<br>
<div class="container-fluid">
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">
Legend
</div>
<div class="card-body">
<table class="table table-striped">
<tbody>
<tr class="table-secondary">
<td>R4 Ore</td>
</tr>
<tr class="table-primary">
<td>R8 Ore</td>
</tr>
<tr class="table-success">
<td>R16 Ore</td>
</tr>
<tr class="table-warning">
<td>R32 Ore</td>
</tr>
<tr class="table-danger">
<td>R64 Ore</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col"></div>
<div class="col"></div>
<div class="col"></div>
<div class="col"></div>
<div class="col"></div>
</div>
</div>
@endsection