dropbna poprawka w stringu

This commit is contained in:
Mateusz Gruszczyński
2025-08-12 22:27:38 +02:00
parent 462570da48
commit ae2c3e66bf
2 changed files with 9 additions and 3 deletions

2
app.py
View File

@@ -2130,7 +2130,7 @@ def crop_receipt_user():
@login_required
@admin_required
def admin_panel():
month_str = request.args.get("month")
month_str = request.args.get("m")
if not month_str:
month_str = datetime.now(timezone.utc).strftime("%Y-%m")
show_all = (month_str == "all")

View File

@@ -161,10 +161,16 @@
</form>
</div>
<div class="card bg-dark text-white mb-5">
<div class="card-body">
<h3 class="mt-4">📄 Listy zakupowe</h3>
<h3 class="mt-4">
📄 Listy zakupowe
{% if show_all %}
— wszystkie miesiące
{% else %}
— {{ month_str|replace('-', ' / ') }}
{% endif %}
</h3>
<form method="post" action="{{ url_for('delete_selected_lists') }}">
<div class="table-responsive">
<table class="table table-dark table-striped align-middle sortable">