
<div class="table-responsive">
    <table class="table mb-0">
        <thead>
        <tr>
            <th scope="col">  #  </th>
            <th scope="col">  {{ __('web.price') }}        </th>
            <th scope="col"> {{ __('web.products_count') }}      </th>
            <th scope="col"> {{ __('web.order_date') }}      </th>
            <th scope="col"> {{ __('web.state') }}</th>
            <th scope="col"> {{ __('web.details') }}  </th>

        </tr>
        </thead>
        <tbody>
        @if(count($orders) == 0)
            <tr>
                <div class="alert alert-danger py-4 text-center my-5" role="alert">
                    {{__('web.not_exist_orders')}}
                </div>
            </tr>
        @else
            @foreach($orders as $order)
                <tr>
    
                    <td>{{$order->id}}  </td>
                    <td><b>{{$order->payment ? round(currencyConvert($order->payment->total),2) : ''}}</b> <small>{{$currency->abbr}}</small></td>
                    <td>{{$order->sumProducts()}}</td>
                    <td> <small>  {{$order->date}}  </small> </td>
                    <td><span class="badge @if($order->status == 'progress') gray_bagde @elseif($order->status == 'preparing') secondaey_badge @elseif($order->status == 'shipping') primary_badge @else offer_badge @endif">{{__('web.'.$order->status)}}  </span></td>
                    <td>
                        <a href="{{route('order.details',$order->token)}}" class="more-butn"><i class="fal fa-exclamation-circle"></i></a>
                    </td>
                </tr>
            @endforeach
        @endif
        </tbody>
    </table>
</div>
