{%  extends 'account/main.html' %}

{% block content %}

{%  include 'account/status.html' %}

<br>

<div class="row">
	<div class="col-md-6">
		<h5>CUSTOMERS:</h5>
		<hr>
		<div class="card card-body">
			<a class="btn btn-primary  btn-sm btn-block" href="">Create Customer</a>
			<table class="table table-sm">
				<tr>
					<th>View Customer </th>
					<th>Customer</th>
					<th>Phone</th>
				</tr>

				{% for customer in customers %}
					<tr>
						<td><a class="btn btn-sm btn-info" href="{% url 'customer' customer.id %}">View</a></td>
						<td>{{customer.name}}</td>
						<td>{{customer.phone}}</td>
					</tr>
				{% endfor %}

			</table>
		</div>
	</div>

	<div class="col-md-6">
		<h5>LAST 5 ORDERS</h5>
		<hr>
		<div class="card card-body">
			<a class="btn btn-primary  btn-sm btn-block" href="">Create Order</a>
			<table class="table table-sm">
				<tr>
					<th>customer</th>
					<th>Date Orderd</th>
					<th>Status</th>
					<!-- <th>Update</th>
					<th>Remove</th> -->
				</tr>

				{% for order in orders %}
					<tr>
						<td>{{order.customer}}</td>
						<td>{{order.date_ordered}}</td>
						<td>{{order.status}}</td>
						<!-- <td><a class="btn btn-sm btn-info" href="">Update</a></td>
						<td><a class="btn btn-sm btn-danger"href="">Delete</a></td> -->

					</tr>
				{% endfor %}

		
			</table>
		</div>
	</div>

</div>

{% endblock %}