@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">Winners By Item</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>Item Number</th>
                                    <th>Item Description</th>
                                    <th>Winner</th>
                                    <th>Winning Bid</th>
                                </tr>
                            </thead>
                            <tbody>
                                @foreach($winnersbyitem_results as $winner)
                                    <tr>
                                        <td>{{ $winner->item_assigned_num }}</td>
                                        <td>{{ $winner->item_desc }}</td>
                                        <td>{{ $winner->bidders->bidder_fname }} {{ $winner->bidders->bidder_lname }}</td>
                                        <td>${{ number_format($winner->winning_cost, 2) }}</td>
                                    </tr>
                                @endforeach
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
@include('components.tomselect')
