This commit is contained in:
2019-11-02 18:19:30 -05:00
parent 0d0bc46e2c
commit 309427568e
3 changed files with 34 additions and 1 deletions

View File

@@ -108,6 +108,8 @@ class HaulingController extends Controller
* Controller function to display quotes for pricing tables
*/
public function displayQuotes() {
return view('hauling.display.quotes');
$loads = HaulingConfig::all();
return view('hauling.display.quotes')->with('loads', $loads);
}
}

View File

@@ -0,0 +1,30 @@
@extends('layouts.b4')
@section('content')
<div class="container">
<div class="card">
<div class="card-header">
<h2>Hauling Rates</h2>
</div>
<div class="card-body">
<table class="table table-bordered table-striped">
<thead>
<th>Load Size</th>
<th>Min Load Size</th>
<th>Max Load Size</th>
<th>Price Per Jump</th>
</thead>
<tbody>
@foreach($loads as $load)
<tr>
<td>{{ ucfirst($load->load_size) }}</td>
<td>{{ number_format($load->min_load_size, 2, ".", ",") }}</td>
<td>{{ number_format($load->max_load_size, 2, ".", ",") }}</td>
<td>{{ number_format($load->price_per_jump, 2, ".", ",") }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection

View File

@@ -9,6 +9,7 @@
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdoownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Hauling</a>
<div class="dropdown-menu" aria-labelledby="navbarDropDownMenuLink">
<a class="dropdown-item" href="/">Hauling Form</a>
<a class="dropdown-item" href="/display/quotes">Hauling Rates</a>
</div>
</li>
</ul>