{% extends "index.html" %}
{% block body %}

<div id="profileform" class="content-section">
        <div class="media">
            <legend class="border-bottom mb-4">{{ user.role }}</legend>
            {% if current_user.role == 'Admin' %}
                <form action="{{ url_for('delete_user', id=user.id) }}" method="POST">
                    <input type="submit" class="btn btn-danger" value="Delete">
                </form>
            {% endif %}
        </div>
        <div class="media">
            <img class="rounded-circle account-img" src="{{ profile_image }}">
        </div>
        <div class="media">
            <div class="media-body">
                <legend class="border-bottom mb-4">Full Name: {{ user.name }} {{ user.surname }}</legend>
                <p class="mr-2">Email: {{ user.email }}</p>
                <p class="mr-2">Employee Number: {{ user.employee_number }}</p>
                <p class="mr-2">Expenses: {{ user.expenses|selectattr('author')|list|length }}</p>
                <p class="mr-2">Employee ID: {{ user.id }}</p>
            </div>
        </div>
 </div>




{% endblock body%}