feat: Web-GUI Basis, Uebersicht, Buchungsliste

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-17 18:45:54 +02:00
parent e8ea948b38
commit a6009c47e3
11 changed files with 488 additions and 9 deletions

View File

@@ -0,0 +1,54 @@
{% extends "base.html" %}
{% block title %}Übersicht Finanzberatung{% endblock %}
{% block content %}
<h1>Übersicht</h1>
{% if projection and projection.below_threshold_date %}
<div class="warning">
Achtung: Prognostizierter Saldo unterschreitet den Schwellenwert am
<strong>{{ projection.below_threshold_date.strftime('%d.%m.%Y') }}</strong>.
</div>
{% endif %}
<div class="total-balance {{ 'neg' if total < 0 else '' }}">
Gesamtsaldo: {{ '%.2f'|format(total) }} €
</div>
<table>
<thead>
<tr><th>Konto</th><th>Bank</th><th>Saldo</th></tr>
</thead>
<tbody>
{% for account, balance in balances %}
<tr>
<td>{{ account.name }}</td>
<td>{{ account.bank }}</td>
<td class="{{ 'neg' if balance < 0 else '' }}">{{ '%.2f'|format(balance) }} €</td>
</tr>
{% else %}
<tr><td colspan="3">Keine Konten angelegt.</td></tr>
{% endfor %}
</tbody>
</table>
<h2>Nächste anstehende Posten (30 Tage)</h2>
<table>
<thead>
<tr><th>Datum</th><th>Bezeichnung</th><th>Betrag</th></tr>
</thead>
<tbody>
{% for item in upcoming %}
<tr>
<td>{{ item.date.strftime('%d.%m.%Y') }}</td>
<td>{{ item.name }}</td>
<td class="{{ 'neg' if item.amount < 0 else '' }}">{{ '%.2f'|format(item.amount) }} €</td>
</tr>
{% else %}
<tr><td colspan="3">Keine anstehenden Posten.</td></tr>
{% endfor %}
</tbody>
</table>
<h2>Grafana-Dashboard</h2>
<iframe class="grafana" src="http://{{ request.url.hostname or '127.0.0.1' }}:8097"></iframe>
{% endblock %}