{% extends "dashboard.html" %}
{% load static %}

{% block content %}
<article>
    <header class="object__header">
        <h1><img src="{% static 'images/customer.png' %}" alt=""> Customers</h1>
    </header>
    <section class="object__list">
        <div class="object__item panel__header object__item--col3" href="customer-detail">
            <span>Name</span>
            <span>Email</span>
            <span>Orders</span>
        </div>
    {% for customer in user_list  %}
        <a class="object__item object__item--link object__item--col3" href="{% url 'dashboard:customer-detail' customer.pk %}">
            <span>{{customer.get_full_name}}</span>
            <span>{{customer.email}}</span>
            <span>{{customer.num_orders}}</span>
        </a>
    {% empty %}
        <span class="object__item">No customers</span>
    {% endfor %}
    </section>
</article>
{% endblock content %}
