{% extends 'base/banking_base.html' %}
{% load i18n humanize static %}

{% block content %}
<div id="ledger-account-list-app">
    <h2 class="mt-3">{% trans 'REQUEST Events' %}</h2>
    
    {% include "easyaudit/_filters.html" %}
    <hr/>

<div name="fade">
    <div v-show="list_ledger_accounts" class="">
        <table class="table table-bordered bg-white table-hover table-striped">
        <thead class="">
            <tr>
                <th>{% trans 'Date' %}</th>
                <th>{% trans 'Method' %}</th>
                <th>{% trans 'URL' %}</th>
                <th>{% trans 'Query String' %}</th>
                <th>{% trans 'User' %}</th>
                <th>{% trans 'Remote IP' %}</th>
            </tr>
        </thead>
        <tbody>
        {% for request in object_list %}
        <tr>
            <td>{{ request.datetime }}</td>
            <td>
              <span class=" badge
                {% if request.method == 'GET' %}
                badge-info
                {% elif request.method == 'POST' %}
                badge-success
                {% elif request.method == 'OPTION' %}
                badge-warning
                {% elif request.method == 'PUT' %}
                badge-secondary
                {% elif request.method == 'DELETE' %}
                badge-danger
                {% endif %}
              ">
                {{ request.method }}
              </span>
            </td>
            <td>{{ request.url }}</td>
            <td>{{ request.query_string }}</td>
            <td>{{ request.user }}</td>
            <td>{{ request.remote_ip }}</td>
        </tr>
        {% empty %}
        <tr>
            <td colspan="7">{% trans 'No Request Event' %}</td>
        </tr>
        {% endfor %}
    </tbody>
    </table>

    {% include "libs/pagination.html" with page_obj=page_obj %}
    </div>
</div>


</div>
{% endblock %}