@extends('layouts.app')
@section('content')
<div class="container my-5 body-content">
<div class="row">
<div class="col-lg-3 col-sm-12">
@include('account.sidebar')
</div>
<div class="col-lg-9 col-sm-12">
<div class="card">
<h5 class="card-header">{{ __('Orders') }}</h5>
<div class="card-body">
<table class="table table-sm">
<thead class="thead-dark">
<tr>
<th scope="col">{{ __('Tracking Code') }}</th>
<th scope="col">{{ __('Price') }}</th>
<th scope="col">{{ __('Status') }}</th>
<th scope="col">{{ __('Date') }}</th>
<th scope="col">{{ __('Actions') }}</th>
</tr>
</thead>
<tbody>
@foreach($orders as $order)
<tr>
<td>{{ $order->tracking_code }}</td>
<td>{{ to_persian_numbers(number_format($order->price)) }}</td>
<td>
<span class="badge bg-{{ $order->status->color() }}">
{{ $order->status->description }}
</span>
</td>
<td>{{ to_persian_numbers(jdate($order->created_at)) }}</td>
<td>
<a href="{{ route('account.orders.show', $order->id) }}" class="btn btn-info btn-sm">
<span class="fa fa-eye"></span> {{ __('View') }}
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
{{ $orders->links() }}
</div>
</div>
</div>
</div>
</div>
@endsection