{% extends 'base.html' %}
{% block body_block %}
<div class="container mt-5">
  <h2 class="text-center"><strong>Your Orders</strong></h2>
  <div class="row">
    <div class="col-md-12">
      <div class="card mt-5">
        <div class="table-responsive">
          <table class="table">
            <thead>
              <tr>
                <th scope="col">#</th>
                <th scope="col">Order Id</th>
                <th scope="col">Products</th>
                <th scope="col">Status</th>
              </tr>
            </thead>
            <tbody>
              {% for order in orders %}

              <tr>
                <th scope="row"> {{ forloop.counter }} </th>
                <td><a href="#">{{ order.orderId }}</a></td>
                <td>
                  {% for item in order.orderitems.all %} {{ item }} <br> {% endfor %}
                </td>
                <td><span class="badge badge-primary">Processing Your Order</span> </td>
              </tr> 
              {% endfor %}
            </tbody>

          </table>

        </div>

      </div>

    </div>

  </div>


</div>







{% endblock %}
