Add trading journal and portfolio tracking

This commit is contained in:
kai
2026-09-09 19:01:30 +02:00
parent 1db3b008ec
commit c683bc74c0
24 changed files with 1043 additions and 8 deletions
+9
View File
@@ -0,0 +1,9 @@
{% extends 'base.html' %}{% block title %}Transaktionshistorie · Trading-Buch{% endblock %}{% block content %}
{% include '_trading_nav.html' %}<div class="page-heading"><h1>Alle Transaktionen</h1><a class="button" href="/trading/transactions/new">+ Transaktion eintragen</a></div>
<section class="panel"><form method="get" class="filters">
<label>Jahr<select name="year"><option value="">Alle Jahre</option>{% for year in years %}<option value="{{ year }}" {{ 'selected' if filters.get('year') == year else '' }}>{{ year }}</option>{% endfor %}</select></label>
<label>Monat<select name="month"><option value="">Alle Monate</option>{% for month in months %}<option value="{{ loop.index }}" {{ 'selected' if filters.get('month') == loop.index else '' }}>{{ month }}</option>{% endfor %}</select></label>
<label>Position<select name="asset_id"><option value="">Alle Positionen</option>{% for asset in assets %}<option value="{{ asset.id }}" {{ 'selected' if filters.get('asset_id') == asset.id else '' }}>{{ asset.name }}</option>{% endfor %}</select></label>
{% for field,label,options in [('transaction_type','Typ',trade_types), ('source','Source',sources), ('strategy_tag','Strategie',strategies)] %}<label>{{ label }}<select name="{{ field }}"><option value="">Alle</option>{% for key,title in options.items() %}<option value="{{ key }}" {{ 'selected' if filters.get(field) == key else '' }}>{{ title }}</option>{% endfor %}{% if field == 'strategy_tag' %}<option value="untagged" {{ 'selected' if filters.get(field) == 'untagged' else '' }}>Ohne Tag</option>{% endif %}</select></label>{% endfor %}
<button>Filtern</button><a href="/trading/transactions">Zurücksetzen</a></form>
{% include '_trading_entries.html' %}<div class="pagination">{% if page > 1 %}<a href="{{ request.url.include_query_params(page=page-1) }}">← Zurück</a>{% endif %}<span>Seite {{ page }} · bis zu 100 Transaktionen</span>{% if more %}<a href="{{ request.url.include_query_params(page=page+1) }}">Weiter →</a>{% endif %}</div></section>{% endblock %}