moon rental pages

This commit is contained in:
2021-07-09 01:06:40 -05:00
parent 1a44be502a
commit b310799bf0
8 changed files with 252 additions and 2 deletions

View File

@@ -0,0 +1,38 @@
@extends('layouts.user.dashb4')
@section('content')
<br>
<div class="container">
<div class="card">
<div class="card-header">
<h2>Rental Form for Moon Rental</h2><br>
Moon: {{ $moon->moon_name }}<br>
@foreach($ores as $ore)
{{ $ore->ore_name }} : {{ number_format(($ore->ore_quantity * 100.00), 2, ".", ",") }}<br>
@endforeach
</div>
<div class="card-body">
{!! Form::open(['action' => 'MiningTaxes\MiningTaxesController@storeMoonRentalForm']) !!}
{{ Form::hideen('moon_id', $moon->moon_id) }}
{{ Form::hidden('moon_name', $moon->moon_name) }}
<div class="form-group">
{{ Form::label('rental_start', Day of Rental Start) }}
{{ Form::date('rental_start', Carbon\Carbon::now(), ['class' => 'form-control']) }}
</div>
<div class="form-group">
{{ Form::label('rental_end', 'Day of Rental End') }}
{{ Form::date('rental_end', Carbon\Carbon::now()->addMonths(3), ['class' => 'form-control']) }}
</div>
<div class="form-group">
{{ Form::label('entity_type', 'Select Character or Corporation') }}
{{ Form::select('entity_type', ['Character', 'Corporation'], ['class' => 'form-control']) }}
</div>
<div class="form-group">
{{ Form::label('entity_name', 'Enter Name for Rental') }}
{{ Form::text('entity_name', '', ['class' => 'form-control', 'placeholder' => 'Enter your character name or corporation name to follow the previous selection.']) }}
</div>
{{ Form::submit('Submit', ['class' => 'btn btn-warning']) }}
{!! Form::close() !!}
</div>
</div>
</div>
@endsection

View File

@@ -29,6 +29,9 @@
<th>Third Quantity</th>
<th>Fourth Ore</th>
<th>Fourth Quantity</th>
<th>Moon Worth</th>
<th>Rental Cost</th>
<th>Rent?</th>
</thead>
<tbody>
@foreach($moons as $moon)
@@ -135,6 +138,17 @@
<td></td>
<td></td>
@endif
<td>{{ number_format($moon->worth_amount, 0, ".", ",") }}</td>
<td>{{ number_format($moon->rental_amount, 0, ".", ",") }}</td>
<td>
{!! Form::open(['action' => 'MiningTaxes\MiningTaxesController@DisplayMoonRentalForm', 'method' => 'POST']) !!}
{{ Form::hidden('moon_id', $moon->moon_id) }}
{{ Form::hidden('moon_name', $moon->moon_name) }}
{{ Form::hidden('worth_amount', $moon->worth_amount) }}
{{ Form::hidden('rental_amount', $moon->rental_amount) }}
{{ Form::submit('Rent', ['class' => 'btn btn-danger']) }}
{!! Form::close() !!}
</td>
</tr>
@endif
@endforeach