{% extends 'base.html' %}
{% block content %}
<a href="/edit_cheltuieli/new" class="btn btn-danger btn-sm">Insert New</a>

<br>
<table class="table" id="all_planned_values" border="1">
    <script src="{{ url_for('static', filename='js/myfile.cs') }}"></script>
    <thead>
        <tr>
            {% for col in table[0] %}
            <th scope="col" onclick="sortMasinaTable({{ loop.index0 }})">{{col}}</th>
            {% endfor %}
        </tr>
    </thead>
    {% for row in table[1:] %}
    <tr>
        {% for col  in row %}
         <td>{{col}}</td>
        {% endfor %}
        <td><a href="/edit_cheltuieli/{{row[0]}}" class="btn btn-danger btn-sm">Copy as</a></td>
        <td><a href="/delete_transaction/{{row[0]}}" class="btn btn-danger btn-sm">Delete</a></td>
    </tr>
    {% endfor %}
</table>
<br>


{% endblock %}