fixed serve
This commit is contained in:
parent
db555fa3b3
commit
1dc9d35475
10 changed files with 66 additions and 116 deletions
|
@ -8,6 +8,7 @@
|
|||
<title>Schmeckels</title>
|
||||
<link href="https://unpkg.com/tailwindcss/dist/tailwind.min.css" rel="stylesheet">
|
||||
<link href="https://unpkg.com/@tailwindcss/custom-forms/dist/custom-forms.min.css" rel="stylesheet">
|
||||
<link href="/static/style.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body class="bg-grey-100 font-sans leading-normal tracking-normal">
|
||||
|
@ -16,17 +17,14 @@
|
|||
<li class="ml-12 mr-12">
|
||||
<a class="text-blue-500 hover:text-blue-800" href="/">SCHMECKELS</a>
|
||||
</li>
|
||||
<li class="mr-2">
|
||||
<li class="mx-4">
|
||||
<a class="text-blue-500 hover:text-blue-800" href="/transactions">Transactions</a>
|
||||
</li>
|
||||
<li class="mr-2">
|
||||
<li class="mx-4">
|
||||
<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 class="mx-4">
|
||||
<a class="text-blue-500 hover:text-blue-800" href="/tags">Tags</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<h1 class="text-2xl font-bold text-indigo-500">Last 12 months</h1>
|
||||
|
||||
{% endblock %}
|
|
@ -1,28 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block main %}
|
||||
<h1 class="text-2xl font-bold text-indigo-500">Monatsübersicht</h1>
|
||||
<h1 class="text-2xl font-bold text-indigo-500">Start</h1>
|
||||
|
||||
{% if categories|length > 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>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% else %}
|
||||
|
||||
No transactions this month
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,16 +2,15 @@
|
|||
|
||||
{% block main %}
|
||||
|
||||
<h1>Transaktionen aus {{ category.full_name() }}</h1>
|
||||
<h1>Transaktionen aus {{ tag.name }}</h1>
|
||||
|
||||
<table class="table-auto">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="px-4 py-2">Date</th>
|
||||
<th class="px-4 py-2">Datum</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"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -21,8 +20,9 @@
|
|||
<td class="border px-4 py-2">{{ t.name }}</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"><a href="#">Remove category</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
{% block main %}
|
||||
|
||||
<h1 class="text-2xl font-bold text-indigo-500">Category overview</h1>
|
||||
<h1 class="text-2xl font-bold text-indigo-500">Tag overview</h1>
|
||||
|
||||
<ul>
|
||||
{% for c in categories %}
|
||||
{% for tag in tags %}
|
||||
<li class="p-2">
|
||||
{{ c.full_name() }}
|
||||
<a class="float-right" href="/category/{{ c.name }}">
|
||||
<span style="background-color: {{ tag.color() }};" class="text-white rounded p-1" >{{ tag.name }}</span>
|
||||
<a class="float-right" href="/tag/{{ tag.name }}">
|
||||
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold mx-2 y-1 px-2 rounded"> Transactions </button>
|
||||
</a>
|
||||
<a class="float-right" href="/category/{{ c.name }}/delete">
|
||||
<a class="float-right" href="/tag/{{ tag.name }}/delete">
|
||||
<button class="bg-red-500 hover:bg-red-700 text-white font-bold y-1 px-2 rounded"> Delete </button>
|
||||
</a>
|
||||
</li>
|
|
@ -3,9 +3,9 @@
|
|||
{% block main %}
|
||||
|
||||
<form action="/bulksort" method="POST">
|
||||
<select name="category">
|
||||
{% for c in categories %}
|
||||
<option value="{{ c.id }}">{{ c.full_name() }}</option>
|
||||
<select name="tag">
|
||||
{% for tag in tags %}
|
||||
<option value="{{ tag.id }}">{{ tag.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="submit">
|
||||
|
@ -28,11 +28,11 @@
|
|||
<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-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 %}
|
||||
<td class="border px-4 py-2"> - </td>
|
||||
{% endif %}
|
||||
<td class="border px-4 py-2">
|
||||
{% for tag in t.tags %}
|
||||
<span style="background-color: {{ tag.color() }};" class="text-white rounded p-1" >{{ tag.name }}</span>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue