<div class="table-responsive">
    <table id="tables" class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr>
                <th class="thbutton">Serial No</th>
                
                <th>Product Name</th>
                <th class="text-end">Quantity</th>
                <th>Recommended BY</th>
                <th>Recommended Date</th>
                <th>Re-Stock Status</th>
                <th class="thbutton">Delete</th>
            </tr>
        </thead>
        <tbody>
            @php $i=1;@endphp
            @if(count($data)>0)
                @foreach($data as $key=> $list)
                    <tr>
                        <td class="text-center">{{$data->firstItem() + $key}}</td>
                        
                        <td>{!! $list->product_name??'' !!}</td>
                        <td class="text-end">{{ isset($list->quantity) ? convertDecimelPoint($list->quantity):'' }}</td>
                        <td>{!! $list->prepared_by??'' !!}</td>
                        <td>{{ formatedDateTime($list->created_at) }}</td>
                        <td>{!! $list->status??'' !!}</td>
                        <td class="text-center">
                            <a data-url="{{route('stock-short-list.destroy')}}" data-id="{{$list->id}}" class="btn btn-danger deleteDataCustom" href="#" class="text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Delete">
                                <i class="bi bi-trash text-white"></i>
                            </a>
                        </td>
                    </tr>
                    @php $i++; @endphp
                @endforeach
            @else
                <tr>
                    <td colspan="5">No Data Found</td>
                </tr>
            @endif
        </tbody>
    </table>
</div>

<nav class="row align-items-center mt-2">
    <div class="col-md-10">
        {!! $data->onEachSide(0)->render('stocks.stock-short.pagination') !!}
    </div>

    <div class="col-lg-2 col-md-2 col-2 dataTables_length" id="example_length" style="text-align: right;">
            <i class="bi bi-funnel" style=" top: 11px;left: 20px;"></i>
            <select class="form-select sorting sorting-box" id="" name="example_length" aria-controls="example" style="padding-left: 30px;">
                <option value="10">Show: 10</option>
                <option value="30">Show: 30</option>
                <option value="50">Show: 50</option>
            </select>
    </div>
</nav>
</div>

