Files
silent-auction/resources/views/showcars.blade.php
T

63 lines
2.6 KiB
PHP

@extends('tablar::page')
@section('content')
<div class="page-header d-print-none">
<div class="container-xl">
<div class="row g-2 align-items-center">
<div class="col">
<h2 class="page-title">Show Cars</h2>
</div>
</div>
</div>
</div>
<div class="page-body">
<div class="container-xl">
<div class="row row-cards">
<div class="col-12">
<div class="card">
<div class="table-responsive">
<table class="table table-vcenter card-table" id="showcars-table">
<thead>
<tr>
<th class="sort" data-sort="bidder-num">Bidder #</th>
<th class="sort" data-sort="make">Make</th>
<th class="sort" data-sort="model">Model</th>
<th class="sort" data-sort="year">Year</th>
<th class="sort" data-sort="owner">Owner</th>
</tr>
</thead>
<tbody class="list">
@foreach($vehicles as $vehicle)
<tr>
<td class="bidder-num">{{ $vehicle->vehicleOwner->bidder_assigned_number ?? 'N/A' }}</td>
<td class="make">{{ $vehicle->make }}</td>
<td class="model">{{ $vehicle->model }}</td>
<td class="year">{{ $vehicle->year }}</td>
<td class="owner">
@if($vehicle->vehicleOwner)
{{ $vehicle->vehicleOwner->bidder_fname }} {{ $vehicle->vehicleOwner->bidder_lname }}
@else
N/A
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('js')
<script src="https://cdnjs.cloudflare.com/ajax/libs/list.js/2.3.1/list.min.js"></script>
<script>
new List('showcars-table', {
valueNames: ['bidder-num', 'make', 'model', 'year', 'owner']
});
</script>
@endsection