{% load static i18n %}
{% if leaves %}
<div class="oh-card-dashboard__body">
    <ul class="oh-card-dashboard__user-list" id="leaveEmployee">
        {% for leave in leaves %}
        <li
            class="oh-card-dashboard__user-item"
            role="button"
        >
            <div class="oh-profile oh-profile--md"
            {% if perms.leave.add_leaverequest %}
            onclick="$('#objectDetailsModalW25').addClass('oh-modal--show');"
            data-target="#objectDetailsModalW25"
            hx-get="{% url 'one-request-view' leave.id %}?instances_ids={{requests_ids}}"
            hx-target="#objectDetailsModalW25Target"
            {% endif %}
			>
                <div class="oh-profile__avatar mr-1">
                    <img
                        src="{{leave.employee_id.get_avatar}}"
                        class="oh-profile__image"
                        alt=""
                    />
                </div>
                <span class="oh-profile__name oh-text--dark"
                    >{{leave.employee_id.get_full_name}}
                </span>
            </div>
        </li>
        {% endfor %}
    </ul>
</div>
{% else %}
<div style="margin-top: 30%">
    <div class="oh-404" style="position: revert; transform: none">
        <img
            style="width: 80px; height: 80px; margin-bottom: 20px"
            src="{% static 'images/ui/attendance.png' %}"
            class="oh-404__image"
            alt="Page not found. 404."
        />
        <h5 class="oh-404__subtitle">
            {% trans "No Leave request for today." %}
        </h5>
    </div>
</div>
{% endif %}
