Files
2026-11-19 14:41:35 +01:00

114 lines
3.6 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "base.html" %}
{% block title %}Dashboard{% endblock %}
{% block content %}
<div class="grid-hero">
<div>
<h1 class="hero-title">Deine Ausgaben im Blick</h1>
<p class="hero-sub">Erfasse Ausgaben je Gruppe und werte sie monatlich als Kreisdiagramm aus.</p>
</div>
<div class="stat-card" id="stat-summe">
<span class="stat-label">Diese Gruppe, dieser Monat</span>
<span class="stat-value" id="summe-monat">—</span>
</div>
</div>
<section class="panel">
<div class="panel-head">
<div class="gruppen-tabs" id="gruppen-tabs"></div>
</div>
<h2>Neue Ausgabe erfassen</h2>
<form id="ausgabe-form" class="form form-grid">
<div>
<label for="kategorie">Was für den Haushalt</label>
<select id="kategorie" name="kategorie" required></select>
</div>
<div>
<label for="ort">Wo</label>
<input id="ort" name="ort" type="text" placeholder="z. B. Supermarkt, Online" required />
</div>
<div>
<label for="betrag">Betrag (€)</label>
<input id="betrag" name="betrag" type="number" step="0.01" min="0" placeholder="0,00" required />
</div>
<div>
<label for="datum">Datum</label>
<input id="datum" name="datum" type="date" required />
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Hinzufügen</button>
</div>
</form>
<div id="form-message" class="alert hidden"></div>
</section>
<section class="panel">
<div class="panel-head">
<h2>Einnahmen des Monats</h2>
<p class="hint">Gilt je Gruppe und Monat – jedes Gruppenmitglied darf sie ändern.</p>
</div>
<form id="einnahme-form" class="form-inline">
<input id="einnahme-monat" type="month" required />
<input id="einnahme-betrag" type="number" step="0.01" min="0" placeholder="Einnahmen in €" required />
<button type="submit" class="btn btn-primary">Speichern</button>
</form>
<div id="einnahme-message" class="alert hidden"></div>
</section>
<section class="panel">
<div class="panel-head">
<h2>Bilanz (Plus / Minus)</h2>
<div class="panel-actions">
<select id="bilanz-jahr" class="select" aria-label="Jahr wählen"></select>
</div>
</div>
<div class="bilanz-summary" id="bilanz-summary"></div>
<figure class="chart-card chart-wide">
<canvas id="chart-bilanz"></canvas>
</figure>
</section>
<section class="panel">
<div class="panel-head">
<h2>Monatsauswertung</h2>
<div class="panel-actions">
<select id="monat-select" class="select" aria-label="Monat wählen"></select>
<button id="export-btn" class="btn btn-ghost">⬇ Excel-Export</button>
</div>
</div>
<div class="charts-grid">
<figure class="chart-card">
<canvas id="chart-kategorie"></canvas>
<figcaption>Nach Kategorie</figcaption>
</figure>
<figure class="chart-card">
<canvas id="chart-ort"></canvas>
<figcaption>Nach Ort</figcaption>
</figure>
</div>
<p id="charts-empty" class="muted hidden">Noch keine Daten für diesen Monat.</p>
</section>
<section class="panel">
<h2>Alle Ausgaben</h2>
<div class="table-wrap">
<table id="ausgaben-tabelle" class="table">
<thead>
<tr>
<th>Datum</th>
<th>Kategorie</th>
<th>Ort</th>
<th class="text-right">Betrag</th>
<th></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<p id="liste-empty" class="muted hidden">Noch keine Einträge vorhanden.</p>
</section>
{% endblock %}
{% block scripts %}
<script src="{{ url_for('static', filename='js/app.js') }}"></script>
{% endblock %}