Condensed classifiers in one place

This commit is contained in:
Manuel Forcén Muñoz 2024-03-20 20:49:22 +01:00
parent cf7fc2ec87
commit e336292db4
8 changed files with 256 additions and 34 deletions

View file

@ -25,9 +25,10 @@
<body>
<div class="flex h-full">
<aside class="sidebar bg-stone-300 p-4 flex flex-col">
<a class="hover:bg-stone-400" href="/">Start</a>
<a class="hover:bg-stone-400" href="/rules">Rules</a>
<a class="hover:bg-stone-400" href="/">Summary</a>
<a class="hover:bg-stone-400" href="/accounts">Accounts</a>
<a class="hover:bg-stone-400" href="/categories">Categories</a>
<a class="hover:bg-stone-400" href="/classifiers">Classifiers</a>
</aside>
<div class="p-4 grow h-full overflow-auto">
{% block body %}

View file

@ -1,8 +1,8 @@
{% extends "base.html" %}
{% block title %}Categories{% endblock title %}
{% block title %}Rules{% endblock title %}
{% block body %}
<div>
<a href="/categories/new">New</a>
<a href="/classifiers/new_category">New</a>
</div>
<table>
<thead>
@ -22,4 +22,24 @@
{% endfor %}
</tbody>
</table>
<div>
<a href="/classifiers/new_rule">New</a>
</div>
<table>
<thead>
<tr>
<th>Categoría</th>
<th>Regla</th>
</tr>
</thead>
<tbody>
{% for rule in rules %}
<tr>
<td>{{rule.category}}</td>
<td>{{rule.regex}}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock body %}

View file

@ -7,4 +7,27 @@
<a class="p-2 hover:bg-stone-200" href="/accounts/id/{{account.account_id}}">{{account.account_name}}</a>
{% endfor %}
</div>
<div><h2 class="text-lg">Last transactions</h2></div>
<div>
<table>
<thead>
<tr>
<th>Description</th>
<th>Date</th>
<th>Amount</th>
<th>Category</th>
</tr>
</thead>
<tbody>
{% for tx in transactions %}
<tr>
<td>{{tx.description}}</td>
<td>{{tx.transaction_timestamp}}</td>
<td>{{tx.amount/100}}</td>
<td>{{tx.category}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock body %}

View file

@ -1,23 +0,0 @@
{% extends "base.html" %}
{% block title %}Rules{% endblock title %}
{% block body %}
<div>
<a href="/rules/new">New</a>
</div>
<table>
<thead>
<tr>
<th>Categoría</th>
<th>Regla</th>
</tr>
</thead>
<tbody>
{% for rule in rules %}
<tr>
<td>{{rule.category}}</td>
<td>{{rule.regex}}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock body %}