@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">Car Show Scores</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">
                            <thead>
                                <tr>
                                    <th>#</th>
                                    <th>Owner</th>
                                    <th>Year</th>
                                    <th>Make</th>
                                    <th>Model</th>
                                    <th>Total Score</th>
                                </tr>
                            </thead>
                            <tbody>
                                @foreach($scores_results as $score)
                                    <tr>
                                        <td>{{ $score->scoredVehicle->owner }}</td>
                                        <td>{{ $score->scoredVehicle->vehicleOwner->bidder_fname ?? '' }} {{ $score->scoredVehicle->vehicleOwner->bidder_lname ?? '' }}</td>
                                        <td>{{ $score->scoredVehicle->year }}</td>
                                        <td>{{ $score->scoredVehicle->make }}</td>
                                        <td>{{ $score->scoredVehicle->model }}</td>
                                        <td>{{ $score->totalscore }}</td>
                                    </tr>
                                @endforeach
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
@push('js')
@endpush
