WebApp Kacheln ergänzt
This commit is contained in:
parent
16c97890e3
commit
01a145946c
3 changed files with 87 additions and 16 deletions
2
app.py
2
app.py
|
|
@ -92,7 +92,7 @@ def index():
|
|||
year=year,
|
||||
week=week,
|
||||
summary=summary,
|
||||
transactions=transactions[:10],
|
||||
transactions=transactions,
|
||||
total_income=total_income,
|
||||
total_expenses=total_expenses,
|
||||
total_saldo=total_saldo
|
||||
|
|
|
|||
|
|
@ -193,4 +193,58 @@ text-decoration: underline;
|
|||
.transaction-table td {
|
||||
padding: 6px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.transaction-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.transaction-table th {
|
||||
background: #ff6200;
|
||||
color: white;
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.transaction-table td {
|
||||
padding: 8px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.transaction-table tr:hover {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.transaction-container {
|
||||
max-height: 500px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.transaction-container {
|
||||
max-height: 500px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.transaction-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.transaction-table th {
|
||||
background: #ff6200;
|
||||
color: white;
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.transaction-table td {
|
||||
padding: 8px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.transaction-table tr:hover {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
|
@ -188,35 +188,52 @@
|
|||
<div class="card">
|
||||
|
||||
<h2>
|
||||
Letzte Transaktionen
|
||||
Transaktionen in dieser Woche
|
||||
</h2>
|
||||
|
||||
{% if transactions %}
|
||||
|
||||
<div class="transaction-container">
|
||||
<table class="transaction-table">
|
||||
<thead>
|
||||
|
||||
{% for t in transactions[-10:]|reverse %}
|
||||
<tr>
|
||||
|
||||
<th>Datum</th>
|
||||
<th>Name</th>
|
||||
<th>Kategorie</th>
|
||||
<th>Betrag</th>
|
||||
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for t in transactions|reverse %}
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
{{ t.date }}
|
||||
</td>
|
||||
<td>
|
||||
{{ t.date }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ t.applicant_name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ t.applicant_name }}
|
||||
</td>
|
||||
|
||||
<td class="{% if t.amount >= 0 %}amount-positive{% else %}amount-negative{% endif %}">
|
||||
{{ "%.2f"|format(t.amount) }} €
|
||||
</td>
|
||||
<td>
|
||||
{{ t.category }}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<td class="{% if t.amount >= 0 %}amount-positive{% else %}amount-negative{% endif %}">
|
||||
{{ "%.2f"|format(t.amount) }} €
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
{% else %}
|
||||
|
||||
<p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue