From a776e7c51e773aecf1f1157cfce4c8e16e56a7ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Fri, 12 Dec 2025 11:57:34 +0100 Subject: [PATCH] wizualne --- templates/admin/dodaj_wplate.html | 109 +++++++++++++------------ templates/admin/edytuj_stan.html | 36 ++++---- templates/admin/lista_rezerwowych.html | 6 +- templates/admin/transakcje.html | 101 ++++++++++++++--------- 4 files changed, 142 insertions(+), 110 deletions(-) diff --git a/templates/admin/dodaj_wplate.html b/templates/admin/dodaj_wplate.html index 7d61e31..91ea8a4 100644 --- a/templates/admin/dodaj_wplate.html +++ b/templates/admin/dodaj_wplate.html @@ -5,15 +5,14 @@

Dodaj wpłatę: {{ zbiorka.nazwa }}

- {% if zbiorka.cel %} + {% if zbiorka.cel and zbiorka.typ_zbiorki != 'rezerwa' %} Cel: {{ zbiorka.cel|round(2) }} PLN @@ -22,7 +21,7 @@ Stan: {{ zbiorka.stan|round(2) }} PLN - {% if zbiorka.cel and zbiorka.cel > 0 %} + {% if zbiorka.cel and zbiorka.cel > 0 and zbiorka.typ_zbiorki != 'rezerwa' %} {% set delta = zbiorka.cel - zbiorka.stan %} {% if delta > 0 %} @@ -37,65 +36,69 @@
+ {% if zbiorka.typ_zbiorki != 'rezerwa' %} {% set progress = (zbiorka.stan / zbiorka.cel * 100) if zbiorka.cel and zbiorka.cel > 0 else 0 %} - - {% set progress_clamped = 100 if progress > 100 else (0 if progress < 0 else progress) %}
+ {% set progress_clamped = 100 if progress > 100 else (0 if progress < 0 else progress) %} +
{{ progress|round(1) }}% +
+ {% endif %} + +
+
+ +
+ +
+ PLN + +
+
Podaj kwotę w złotówkach (min. 0,01).
+ +
+ {% for preset in [5,10,20,25,30,35,40,50,60,100,150,200] %} + + {% endfor %} + {% if zbiorka.cel and zbiorka.cel > 0 and zbiorka.typ_zbiorki != 'rezerwa' %} + {% set brakujace = (zbiorka.cel - zbiorka.stan) if (zbiorka.cel - zbiorka.stan) > 0 else 0 %} + {% if brakujace > 0 %} + + {% endif %} + {% endif %} +
+
+ +
+ + +
+ Krótka notatka do wpłaty (widoczna w systemie). + 0/300 +
+
+ +
+ + Anuluj +
+
+
- -
-
- -
- -
- PLN - -
-
Podaj kwotę w złotówkach (min. 0,01).
- -
- {% for preset in [5,10,20,25,30,50,60,100,150,200] %} - - {% endfor %} - {% if zbiorka.cel and zbiorka.cel > 0 %} - {% set brakujace = (zbiorka.cel - zbiorka.stan) if (zbiorka.cel - zbiorka.stan) > 0 else 0 %} - - {% endif %} -
-
- -
- - -
- Krótka notatka do wpłaty (widoczna w systemie). - 0/300 -
-
- -
- - Anuluj -
-
-
-
{% endblock %} {% block extra_scripts %} {{ super() }} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/templates/admin/edytuj_stan.html b/templates/admin/edytuj_stan.html index 06ccd79..cdab018 100644 --- a/templates/admin/edytuj_stan.html +++ b/templates/admin/edytuj_stan.html @@ -6,16 +6,18 @@
- ← Szczegóły - zbiórki + ← Szczegóły zbiórki ← Panel Admina
{# Obliczenia wstępne (do inicjalnego podglądu) #} - {% set has_cel = (zbiorka.cel is defined and zbiorka.cel and zbiorka.cel > 0) %} + {% set has_cel = (zbiorka.cel is defined and zbiorka.cel and zbiorka.cel > 0 and zbiorka.typ_zbiorki != 'rezerwa') %} {% set progress = (zbiorka.stan / zbiorka.cel * 100) if has_cel else 0 %} - {% set progress_clamped = 100 if progress > 100 else (0 if progress < 0 else progress) %}
+ {% set progress_clamped = 100 if progress > 100 else (0 if progress < 0 else progress) %} + +

Edytuj stan: {{ zbiorka.nazwa }}

@@ -43,17 +45,18 @@
- + + {% if zbiorka.typ_zbiorki != 'rezerwa' %}
-
Aktualnie: {{ progress|round(1) }}%
+ {% endif %} -
+
{# {{ form.csrf_token }} #} @@ -72,22 +75,19 @@
{% for delta in [10,50,100,200] %} - - + + {% endfor %} {% if has_cel %} - {% set brakujace = (zbiorka.cel - zbiorka.stan) if (zbiorka.cel - zbiorka.stan) > 0 else 0 %} - {% endif %}
- + + {% if zbiorka.typ_zbiorki != 'rezerwa' %}
@@ -106,6 +106,7 @@
{% if has_cel %} + {% set brakujace = (zbiorka.cel - zbiorka.stan) %} {% if brakujace > 0 %} Do celu brakuje: {{ brakujace|round(2) }} PLN {% elif brakujace == 0 %} @@ -121,6 +122,7 @@
+ {% endif %}
@@ -129,11 +131,11 @@
-
+ {% endblock %} {% block extra_scripts %} {{ super() }} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/templates/admin/lista_rezerwowych.html b/templates/admin/lista_rezerwowych.html index 2023f58..3f5fadf 100644 --- a/templates/admin/lista_rezerwowych.html +++ b/templates/admin/lista_rezerwowych.html @@ -116,19 +116,19 @@
  • + href="{{ url_for('dodaj_wplate', zbiorka_id=r.id) }}"> Dodaj wpłatę
  • + href="{{ url_for('dodaj_wydatek', zbiorka_id=r.id) }}"> Dodaj wydatek
  • + href="{{ url_for('dodaj_przesuniecie', zbiorka_id=r.id) }}"> Przesuń środki
  • diff --git a/templates/admin/transakcje.html b/templates/admin/transakcje.html index 8bbc9fe..bb7822e 100644 --- a/templates/admin/transakcje.html +++ b/templates/admin/transakcje.html @@ -4,18 +4,50 @@ {% block content %}
    -
    -

    Transakcje: {{ zbiorka.nazwa }}

    +
    +
    +

    Transakcje: {{ zbiorka.nazwa }}

    +
    + {% if zbiorka.typ_zbiorki == 'rezerwa' %} + Lista rezerwowa + {% endif %} + + {% if zbiorka.cel and zbiorka.typ_zbiorki != 'rezerwa' %} + + Cel: {{ zbiorka.cel|round(2) }} PLN + + {% endif %} + + + Stan: {{ zbiorka.stan|round(2) }} PLN + + + {% if zbiorka.cel and zbiorka.cel > 0 and zbiorka.typ_zbiorki != 'rezerwa' %} + {% set delta = zbiorka.cel - zbiorka.stan %} + {% if delta > 0 %} + + Brakuje: {{ delta|round(2) }} PLN + + {% elif delta < 0 %} + + Nadwyżka: {{ (-delta)|round(2) }} PLN + + {% else %} + Zrealizowana + {% endif %} + {% endif %} +
    +
    @@ -127,10 +158,6 @@
    - -
    - Aktualny stan: {{ '%.2f'|format(zbiorka.stan or 0) }} PLN -
    @@ -193,4 +220,4 @@ {% block extra_scripts %} {{ super() }} -{% endblock %} \ No newline at end of file +{% endblock %}