Late night fixing
This commit is contained in:
parent
f9967bad71
commit
d9951b69ca
10 changed files with 730 additions and 29 deletions
|
@ -19,12 +19,18 @@
|
|||
<li class="mr-2">
|
||||
<a class="text-blue-500 hover:text-blue-800" href="/transactions">Transactions</a>
|
||||
</li>
|
||||
<li class="mr-2">
|
||||
<a class="text-blue-500 hover:text-blue-800" href="/transactions?unsorted=1">Unsorted Transactions</a>
|
||||
</li>
|
||||
<li class="mr-2">
|
||||
<a class="text-blue-500 hover:text-blue-800" href="/categories">Categories</a>
|
||||
</li>
|
||||
<li class="mr-2">
|
||||
<a class="text-blue-500 hover:text-blue-800" href="/graph">Monthly Graph</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="container mx-auto">
|
||||
<div class="pt-2 container mx-auto">
|
||||
|
||||
{{!base}}
|
||||
</div>
|
||||
|
|
4
views/graph.tpl
Normal file
4
views/graph.tpl
Normal file
|
@ -0,0 +1,4 @@
|
|||
% rebase("base.tpl")
|
||||
|
||||
<h1 class="text-2xl font-bold text-indigo-500">Last 12 months</h1>
|
||||
|
|
@ -2,18 +2,25 @@
|
|||
|
||||
<h1 class="text-2xl font-bold text-indigo-500">Monatsübersicht</h1>
|
||||
|
||||
<table class="table-auto border-none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="px-4 py-2">Categorie</th>
|
||||
<th class="px-4 py-2 text-right">Summe</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
% for c in categories:
|
||||
<tr>
|
||||
<td class="border px-4 py-2">{{ c["name"] }}</td>
|
||||
<td class="border px-4 py-2 text-right {{ 'text-green-500' if c['amount'] > 0 else 'text-red-500' }}">{{ c["amount"] }} €</td>
|
||||
</tr>
|
||||
|
||||
% if len(categories) > 0:
|
||||
<table class="table-auto border-none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="px-4 py-2">Categorie</th>
|
||||
<th class="px-4 py-2 text-right">Summe</th>
|
||||
</tr>kk
|
||||
</thead>
|
||||
<tbody>
|
||||
% for c in categories:
|
||||
<tr>
|
||||
<td class="border px-4 py-2">{{ c["name"] }}</td>
|
||||
<td class="border px-4 py-2 text-right {{ 'text-red-500' if c['amount'][0] == "-" else 'text-green-500' }}">{{ c["amount"] }} €</td>
|
||||
</tr>
|
||||
% end
|
||||
</tbody>
|
||||
% else:
|
||||
|
||||
No transactions this month
|
||||
|
||||
% end
|
||||
</tbody>
|
|
@ -14,7 +14,7 @@
|
|||
<th class="px-4 py-2">Date</th>
|
||||
<th class="px-4 py-2">Sender/Empfänger</th>
|
||||
<th class="px-4 py-2">Verwendungszweck</th>
|
||||
<th class="px-4 py-2">Betrag</th>
|
||||
<th class="px-4 py-2 text-right">Betrag</th>
|
||||
<th class="px-4 py-2">Kategorie</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<td class="border px-4 py-2">{{ t.get_date("de") }}</td>
|
||||
<td class="border px-4 py-2">{{ t.name }}<br/> <span class="text-gray-500">{{t.iban}}</span></td>
|
||||
<td class="border px-4 py-2">{{ t.description }}</td>
|
||||
<td class="border px-4 py-2 {{ 'text-green-500' if t.is_positive() else 'text-red-500' }}">{{ t.pretty_amount() }}</td>
|
||||
<td class="border px-4 py-2 text-right {{ 'text-green-500' if t.is_positive() else 'text-red-500' }}">{{ t.pretty_amount() }} €</td>
|
||||
% if t.category:
|
||||
<td class="border px-4 py-2"> <a href="/category/{{ t.category.name }}"> {{ t.category.full_name()}}</a></td>
|
||||
% else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue