{% extends "biz/base.html" %}
{% load biz_tags %}


{% block content %}

{% if request.user|is_biz_manager %}

<div class="d-flex">

    <a href="{% url 'biz:prospect-list' %}" class="small-button margin-v20">
        Prospects
    </a>
    <a href="{% url 'biz:add-event' %}" class="small-button margin-v20">
        Ajouter un évènement
    </a>
    <a href="{% url 'biz:add-prospect' %}" class="small-button margin-v20 left-margin">
        Ajouter un prospect
    </a>
    <a href="{% url 'biz:csv-import' %}" class="small-button margin-v20 left-margin">
        Import
    </a>
</div>

<div class="container grid-x padding-bottom">
    <div class="cell medium-6 large-6 padding10 bubble">

        <div class="d-flex justify-content-between align-items-center mb-4">
            <h1 class="title">Completed Events</h1>
        </div>

        <div class="list-group">
            {% for event in completed_events %}
                {% include "biz/event_row.html" with event=event %}
            {% empty %}
            <div class="list-group-item">No completed events.</div>
            {% endfor %}
        </div>

    </div>

    <div class="cell medium-6 large-6 padding10 bubble">

        <div class="d-flex justify-content-between align-items-center mb-4">
            <h1 class="title">Planned Events</h1>
        </div>

        <div class="list-group">
            {% for event in planned_events %}
                {% include "biz/event_row.html" with event=event %}
            {% empty %}
            <div class="list-group-item">No planned events.</div>
            {% endfor %}
        </div>

    </div>
</div>

{% else %}

Not authorized

{% endif %}

{% endblock %}
