wizualne
This commit is contained in:
@@ -5,15 +5,14 @@
|
|||||||
<div class="container my-4">
|
<div class="container my-4">
|
||||||
|
|
||||||
<div class="d-flex align-items-center gap-2 mb-3">
|
<div class="d-flex align-items-center gap-2 mb-3">
|
||||||
<a href="{{ url_for('zbiorka', zbiorka_id=zbiorka.id) }}" class="btn btn-sm btn-outline-light">← Powrót do
|
<a href="{{ url_for('zbiorka', zbiorka_id=zbiorka.id) }}" class="btn btn-sm btn-outline-light">← Powrót do zbiórki</a>
|
||||||
zbiórki</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card shadow-sm">
|
<div class="card shadow-sm">
|
||||||
<div class="card-header bg-secondary text-white d-flex flex-wrap align-items-center justify-content-between gap-2">
|
<div class="card-header bg-secondary text-white d-flex flex-wrap align-items-center justify-content-between gap-2">
|
||||||
<h3 class="card-title mb-0">Dodaj wpłatę: <span class="fw-semibold">{{ zbiorka.nazwa }}</span></h3>
|
<h3 class="card-title mb-0">Dodaj wpłatę: <span class="fw-semibold">{{ zbiorka.nazwa }}</span></h3>
|
||||||
<div class="d-flex align-items-center gap-2">
|
<div class="d-flex align-items-center gap-2">
|
||||||
{% if zbiorka.cel %}
|
{% if zbiorka.cel and zbiorka.typ_zbiorki != 'rezerwa' %}
|
||||||
<span class="badge bg-dark border" style="border-color: var(--border);">
|
<span class="badge bg-dark border" style="border-color: var(--border);">
|
||||||
Cel: {{ zbiorka.cel|round(2) }} PLN
|
Cel: {{ zbiorka.cel|round(2) }} PLN
|
||||||
</span>
|
</span>
|
||||||
@@ -22,7 +21,7 @@
|
|||||||
Stan: {{ zbiorka.stan|round(2) }} PLN
|
Stan: {{ zbiorka.stan|round(2) }} PLN
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{% 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 %}
|
{% set delta = zbiorka.cel - zbiorka.stan %}
|
||||||
{% if delta > 0 %}
|
{% if delta > 0 %}
|
||||||
<span class="badge bg-dark border" style="border-color: var(--border);">
|
<span class="badge bg-dark border" style="border-color: var(--border);">
|
||||||
@@ -37,17 +36,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if zbiorka.typ_zbiorki != 'rezerwa' %}
|
||||||
{% set progress = (zbiorka.stan / zbiorka.cel * 100) if zbiorka.cel and zbiorka.cel > 0 else 0 %}
|
{% 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) %} <div class="px-3 pt-3">
|
<div class="px-3 pt-3">
|
||||||
<div class="progress" role="progressbar" aria-valuenow="{{ progress_clamped|round(2) }}" aria-valuemin="0"
|
<div class="progress" role="progressbar" aria-valuenow="{{ progress_clamped|round(2) }}" aria-valuemin="0"
|
||||||
aria-valuemax="100" aria-label="Postęp zbiórki {{ progress_clamped|round(0) }} procent">
|
aria-valuemax="100" aria-label="Postęp zbiórki {{ progress_clamped|round(0) }} procent">
|
||||||
<div class="progress-bar" style="width: {{ progress_clamped }}%;"></div>
|
<div class="progress-bar" style="width: {{ progress_clamped }}%;"></div>
|
||||||
</div>
|
</div>
|
||||||
<small class="text-muted d-block mt-1 mb-2">{{ progress|round(1) }}%</small>
|
<small class="text-muted d-block mt-1 mb-2">{{ progress|round(1) }}%</small>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="card-body pt-0">
|
<div class="card-body {% if zbiorka.typ_zbiorki == 'rezerwa' %}pt-3{% else %}pt-0{% endif %}">
|
||||||
<form method="post" novalidate>
|
<form method="post" novalidate>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
@@ -60,18 +61,20 @@
|
|||||||
<div id="kwotaHelp" class="form-text">Podaj kwotę w złotówkach (min. 0,01).</div>
|
<div id="kwotaHelp" class="form-text">Podaj kwotę w złotówkach (min. 0,01).</div>
|
||||||
|
|
||||||
<div class="d-flex flex-wrap gap-2 mt-2">
|
<div class="d-flex flex-wrap gap-2 mt-2">
|
||||||
{% for preset in [5,10,20,25,30,50,60,100,150,200] %}
|
{% for preset in [5,10,20,25,30,35,40,50,60,100,150,200] %}
|
||||||
<button type="button" class="btn btn-sm btn-outline-light btn-kwota" data-amount="{{ preset }}">
|
<button type="button" class="btn btn-sm btn-outline-light btn-kwota" data-amount="{{ preset }}">
|
||||||
{{ preset }} PLN
|
{{ preset }} PLN
|
||||||
</button>
|
</button>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if zbiorka.cel and zbiorka.cel > 0 %}
|
{% 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 %}
|
{% set brakujace = (zbiorka.cel - zbiorka.stan) if (zbiorka.cel - zbiorka.stan) > 0 else 0 %}
|
||||||
|
{% if brakujace > 0 %}
|
||||||
<button type="button" class="btn btn-sm btn-outline-light btn-kwota"
|
<button type="button" class="btn btn-sm btn-outline-light btn-kwota"
|
||||||
data-amount="{{ brakujace|round(2) }}">
|
data-amount="{{ brakujace|round(2) }}">
|
||||||
Do celu: {{ brakujace|round(2) }} PLN
|
Do celu: {{ brakujace|round(2) }} PLN
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -91,7 +94,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -6,16 +6,18 @@
|
|||||||
|
|
||||||
<!-- Nawigacja -->
|
<!-- Nawigacja -->
|
||||||
<div class="d-flex align-items-center gap-2 mb-3">
|
<div class="d-flex align-items-center gap-2 mb-3">
|
||||||
<a href="{{ url_for('zbiorka', zbiorka_id=zbiorka.id) }}" class="btn btn-sm btn-outline-light">← Szczegóły
|
<a href="{{ url_for('zbiorka', zbiorka_id=zbiorka.id) }}" class="btn btn-sm btn-outline-light">← Szczegóły zbiórki</a>
|
||||||
zbiórki</a>
|
|
||||||
<a href="{{ url_for('admin_dashboard') }}" class="btn btn-sm btn-outline-light">← Panel Admina</a>
|
<a href="{{ url_for('admin_dashboard') }}" class="btn btn-sm btn-outline-light">← Panel Admina</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# Obliczenia wstępne (do inicjalnego podglądu) #}
|
{# 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 = (zbiorka.stan / zbiorka.cel * 100) if has_cel else 0 %}
|
||||||
{% set progress_clamped = 100 if progress > 100 else (0 if progress < 0 else progress) %} <div class="card shadow-sm"
|
{% set progress_clamped = 100 if progress > 100 else (0 if progress < 0 else progress) %}
|
||||||
data-module="edit-stan" data-cel="{{ (zbiorka.cel|round(2)) if has_cel else 0 }}">
|
|
||||||
|
<div class="card shadow-sm" data-module="edit-stan"
|
||||||
|
data-cel="{{ (zbiorka.cel|round(2)) if has_cel else 0 }}"
|
||||||
|
data-typ-zbiorki="{{ zbiorka.typ_zbiorki }}">
|
||||||
<div class="card-header bg-secondary text-white d-flex flex-wrap align-items-center justify-content-between gap-2">
|
<div class="card-header bg-secondary text-white d-flex flex-wrap align-items-center justify-content-between gap-2">
|
||||||
<h3 class="card-title mb-0">Edytuj stan: <span class="fw-semibold">{{ zbiorka.nazwa }}</span></h3>
|
<h3 class="card-title mb-0">Edytuj stan: <span class="fw-semibold">{{ zbiorka.nazwa }}</span></h3>
|
||||||
<div class="d-flex align-items-center flex-wrap gap-2">
|
<div class="d-flex align-items-center flex-wrap gap-2">
|
||||||
@@ -43,17 +45,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Mini progress (aktualny) -->
|
<!-- Mini progress (aktualny) - tylko dla standardowych zbiórek -->
|
||||||
|
{% if zbiorka.typ_zbiorki != 'rezerwa' %}
|
||||||
<div class="px-3 pt-3">
|
<div class="px-3 pt-3">
|
||||||
<div class="progress" role="progressbar" aria-valuenow="{{ progress_clamped|round(2) }}" aria-valuemin="0"
|
<div class="progress" role="progressbar" aria-valuenow="{{ progress_clamped|round(2) }}" aria-valuemin="0"
|
||||||
aria-valuemax="100" aria-label="Postęp zbiórki {{ progress_clamped|round(0) }} procent">
|
aria-valuemax="100" aria-label="Postęp zbiórki {{ progress_clamped|round(0) }} procent">
|
||||||
<div class="progress-bar" style="width: {{ progress_clamped }}%;"></div>
|
<div class="progress-bar" style="width: {{ progress_clamped }}%;"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<small class="text-muted d-block mt-1 mb-2">Aktualnie: {{ progress|round(1) }}%</small>
|
<small class="text-muted d-block mt-1 mb-2">Aktualnie: {{ progress|round(1) }}%</small>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="card-body pt-0">
|
<div class="card-body {% if zbiorka.typ_zbiorki == 'rezerwa' %}pt-3{% else %}pt-0{% endif %}">
|
||||||
<form method="post" novalidate>
|
<form method="post" novalidate>
|
||||||
{# {{ form.csrf_token }} #}
|
{# {{ form.csrf_token }} #}
|
||||||
|
|
||||||
@@ -72,22 +75,19 @@
|
|||||||
<!-- Szybkie korekty -->
|
<!-- Szybkie korekty -->
|
||||||
<div class="d-flex flex-wrap gap-2 mt-2">
|
<div class="d-flex flex-wrap gap-2 mt-2">
|
||||||
{% for delta in [10,50,100,200] %}
|
{% for delta in [10,50,100,200] %}
|
||||||
<button type="button" class="btn btn-sm btn-outline-light btn-delta" data-delta="{{ delta }}">+{{
|
<button type="button" class="btn btn-sm btn-outline-light btn-delta" data-delta="{{ delta }}">+{{ delta }} PLN</button>
|
||||||
delta }} PLN</button>
|
<button type="button" class="btn btn-sm btn-outline-light btn-delta" data-delta="-{{ delta }}">-{{ delta }} PLN</button>
|
||||||
<button type="button" class="btn btn-sm btn-outline-light btn-delta" data-delta="-{{ delta }}">-{{
|
|
||||||
delta }} PLN</button>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if has_cel %}
|
{% if has_cel %}
|
||||||
<button type="button" class="btn btn-sm btn-outline-light btn-set"
|
<button type="button" class="btn btn-sm btn-outline-light btn-set"
|
||||||
data-value="{{ zbiorka.cel|round(2) }}">Ustaw: do celu</button>
|
data-value="{{ zbiorka.cel|round(2) }}">Ustaw: do celu</button>
|
||||||
{% set brakujace = (zbiorka.cel - zbiorka.stan) if (zbiorka.cel - zbiorka.stan) > 0 else 0 %}
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<button type="button" class="btn btn-sm btn-outline-light btn-set" data-value="0">Ustaw: 0</button>
|
<button type="button" class="btn btn-sm btn-outline-light btn-set" data-value="0">Ustaw: 0</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Podgląd po zmianie -->
|
<!-- Podgląd po zmianie - tylko dla standardowych zbiórek -->
|
||||||
|
{% if zbiorka.typ_zbiorki != 'rezerwa' %}
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<div class="card bg-dark border" style="border-color: var(--border);">
|
<div class="card bg-dark border" style="border-color: var(--border);">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@@ -106,6 +106,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<small class="text-muted d-block mt-1" id="previewNote">
|
<small class="text-muted d-block mt-1" id="previewNote">
|
||||||
{% if has_cel %}
|
{% if has_cel %}
|
||||||
|
{% set brakujace = (zbiorka.cel - zbiorka.stan) %}
|
||||||
{% if brakujace > 0 %}
|
{% if brakujace > 0 %}
|
||||||
Do celu brakuje: {{ brakujace|round(2) }} PLN
|
Do celu brakuje: {{ brakujace|round(2) }} PLN
|
||||||
{% elif brakujace == 0 %}
|
{% elif brakujace == 0 %}
|
||||||
@@ -121,6 +122,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<!-- CTA -->
|
<!-- CTA -->
|
||||||
<div class="d-flex flex-wrap gap-2">
|
<div class="d-flex flex-wrap gap-2">
|
||||||
@@ -129,7 +131,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|||||||
@@ -116,19 +116,19 @@
|
|||||||
<li><hr class="dropdown-divider"></li>
|
<li><hr class="dropdown-divider"></li>
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item"
|
<a class="dropdown-item"
|
||||||
href="{{ url_for('dodaj_wplate', zbiorka_id=r.id, next=url_for('zbiorka', zbiorka_id=r.id)) }}">
|
href="{{ url_for('dodaj_wplate', zbiorka_id=r.id) }}">
|
||||||
<i class="bi bi-plus-circle text-success"></i> Dodaj wpłatę
|
<i class="bi bi-plus-circle text-success"></i> Dodaj wpłatę
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item"
|
<a class="dropdown-item"
|
||||||
href="{{ url_for('dodaj_wydatek', zbiorka_id=r.id, next=url_for('zbiorka', zbiorka_id=r.id)) }}">
|
href="{{ url_for('dodaj_wydatek', zbiorka_id=r.id) }}">
|
||||||
<i class="bi bi-dash-circle text-danger"></i> Dodaj wydatek
|
<i class="bi bi-dash-circle text-danger"></i> Dodaj wydatek
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item"
|
<a class="dropdown-item"
|
||||||
href="{{ url_for('dodaj_przesuniecie', zbiorka_id=r.id, next=url_for('zbiorka', zbiorka_id=r.id)) }}">
|
href="{{ url_for('dodaj_przesuniecie', zbiorka_id=r.id) }}">
|
||||||
<i class="bi bi-arrow-left-right text-info"></i> Przesuń środki
|
<i class="bi bi-arrow-left-right text-info"></i> Przesuń środki
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -4,12 +4,44 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container my-4">
|
<div class="container my-4">
|
||||||
|
|
||||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
<div class="d-flex flex-wrap justify-content-between align-items-start gap-3 mb-3">
|
||||||
<h3 class="mb-0">Transakcje: {{ zbiorka.nazwa }}</h3>
|
<div>
|
||||||
|
<h3 class="mb-1">Transakcje: {{ zbiorka.nazwa }}</h3>
|
||||||
|
<div class="d-flex flex-wrap align-items-center gap-2">
|
||||||
|
{% if zbiorka.typ_zbiorki == 'rezerwa' %}
|
||||||
|
<span class="badge bg-info">Lista rezerwowa</span>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if zbiorka.cel and zbiorka.typ_zbiorki != 'rezerwa' %}
|
||||||
|
<span class="badge bg-dark border" style="border-color: var(--border);">
|
||||||
|
Cel: {{ zbiorka.cel|round(2) }} PLN
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<span class="badge bg-dark border border-success" style="border-color: var(--border);">
|
||||||
|
Stan: {{ zbiorka.stan|round(2) }} PLN
|
||||||
|
</span>
|
||||||
|
|
||||||
|
{% if zbiorka.cel and zbiorka.cel > 0 and zbiorka.typ_zbiorki != 'rezerwa' %}
|
||||||
|
{% set delta = zbiorka.cel - zbiorka.stan %}
|
||||||
|
{% if delta > 0 %}
|
||||||
|
<span class="badge bg-dark border border-warning">
|
||||||
|
Brakuje: {{ delta|round(2) }} PLN
|
||||||
|
</span>
|
||||||
|
{% elif delta < 0 %}
|
||||||
|
<span class="badge bg-dark border" style="border-color: var(--border);">
|
||||||
|
Nadwyżka: {{ (-delta)|round(2) }} PLN
|
||||||
|
</span>
|
||||||
|
{% else %}
|
||||||
|
<span class="badge rounded-pill" style="background: var(--accent); color:#111;">Zrealizowana</span>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="btn-group" role="group" aria-label="Akcje zbiórki">
|
<div class="btn-group" role="group" aria-label="Akcje zbiórki">
|
||||||
<a class="btn btn-sm btn-outline-light" href="{{ url_for('dodaj_wplate', zbiorka_id=zbiorka.id) }}">
|
<a class="btn btn-sm btn-outline-light" href="{{ url_for('dodaj_wplate', zbiorka_id=zbiorka.id) }}">
|
||||||
<i class="fas fa-plus-circle"></i> Dodaj wpłatę
|
Dodaj wpłatę
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-sm btn-outline-light" href="{{ url_for('dodaj_wydatek', zbiorka_id=zbiorka.id) }}">
|
<a class="btn btn-sm btn-outline-light" href="{{ url_for('dodaj_wydatek', zbiorka_id=zbiorka.id) }}">
|
||||||
Dodaj wydatek
|
Dodaj wydatek
|
||||||
@@ -45,9 +77,7 @@
|
|||||||
<tr data-tx-id="{{ a.id }}" data-tx-typ="{{ a.typ }}">
|
<tr data-tx-id="{{ a.id }}" data-tx-typ="{{ a.typ }}">
|
||||||
<td>{{ a.data|dt("%d.%m.%Y %H:%M") }}</td>
|
<td>{{ a.data|dt("%d.%m.%Y %H:%M") }}</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="badge {{ 'bg-success' if a.typ=='wpłata' else 'bg-danger' }}">{{ a.typ
|
<span class="badge {{ 'bg-success' if a.typ=='wpłata' else 'bg-danger' }}">{{ a.typ }}</span>
|
||||||
}}</span>
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
@@ -56,7 +86,6 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<span class="badge bg-success ms-1">widoczna</span>
|
<span class="badge bg-success ms-1">widoczna</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td class="text-end">{{ '%.2f'|format(a.kwota) }} PLN</td>
|
<td class="text-end">{{ '%.2f'|format(a.kwota) }} PLN</td>
|
||||||
<td class="text-muted">{{ a.opis or '—' }}</td>
|
<td class="text-muted">{{ a.opis or '—' }}</td>
|
||||||
@@ -73,48 +102,50 @@
|
|||||||
data-action="{{ url_for('zapisz_wplate', wplata_id=a.id) }}">
|
data-action="{{ url_for('zapisz_wplate', wplata_id=a.id) }}">
|
||||||
Edytuj
|
Edytuj
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
{% if a.ukryta %}
|
||||||
|
<form class="d-inline" method="post"
|
||||||
|
action="{{ url_for('odkryj_wplate', wplata_id=a.id) }}">
|
||||||
|
<button class="btn btn-sm btn-outline-success">Odkryj</button>
|
||||||
|
</form>
|
||||||
|
{% else %}
|
||||||
|
<form class="d-inline" method="post"
|
||||||
|
action="{{ url_for('ukryj_wplate', wplata_id=a.id) }}">
|
||||||
|
<button class="btn btn-sm btn-outline-warning">Ukryj</button>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<form class="d-inline" method="post"
|
<form class="d-inline" method="post"
|
||||||
action="{{ url_for('usun_wplate', wplata_id=a.id) }}"
|
action="{{ url_for('usun_wplate', wplata_id=a.id) }}"
|
||||||
onsubmit="return confirm('Usunąć wpłatę? Cofnie to wpływ na stan.');">
|
onsubmit="return confirm('Usunąć wpłatę? Cofnie to wpływ na stan.');">
|
||||||
<button class="btn btn-sm btn-outline-danger">Usuń</button>
|
<button class="btn btn-sm btn-outline-danger">Usuń</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% if a.ukryta %}
|
|
||||||
<form class="d-inline" method="post"
|
|
||||||
action="{{ url_for('odkryj_wplate', wplata_id=a.id) }}">
|
|
||||||
<button class="btn btn-sm btn-outline-secondary">Odkryj</button>
|
|
||||||
</form>
|
|
||||||
{% else %}
|
|
||||||
<form class="d-inline" method="post"
|
|
||||||
action="{{ url_for('ukryj_wplate', wplata_id=a.id) }}">
|
|
||||||
<button class="btn btn-sm btn-outline-secondary">Ukryj</button>
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<button class="btn btn-sm btn-outline-light btn-edit-wydatek" data-id="{{ a.id }}"
|
<button class="btn btn-sm btn-outline-light btn-edit-wydatek" data-id="{{ a.id }}"
|
||||||
data-kwota="{{ '%.2f'|format(a.kwota) }}" data-opis="{{ a.opis|e if a.opis }}"
|
data-kwota="{{ '%.2f'|format(a.kwota) }}" data-opis="{{ a.opis|e if a.opis }}"
|
||||||
data-action="{{ url_for('zapisz_wydatek', wydatek_id=a.id) }}">
|
data-action="{{ url_for('zapisz_wydatek', wydatek_id=a.id) }}">
|
||||||
Edytuj
|
Edytuj
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
{% if a.ukryta %}
|
||||||
|
<form class="d-inline" method="post"
|
||||||
|
action="{{ url_for('odkryj_wydatek', wydatek_id=a.id) }}">
|
||||||
|
<button class="btn btn-sm btn-outline-success">Odkryj</button>
|
||||||
|
</form>
|
||||||
|
{% else %}
|
||||||
|
<form class="d-inline" method="post"
|
||||||
|
action="{{ url_for('ukryj_wydatek', wydatek_id=a.id) }}">
|
||||||
|
<button class="btn btn-sm btn-outline-warning">Ukryj</button>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<form class="d-inline" method="post"
|
<form class="d-inline" method="post"
|
||||||
action="{{ url_for('usun_wydatek', wydatek_id=a.id) }}"
|
action="{{ url_for('usun_wydatek', wydatek_id=a.id) }}"
|
||||||
onsubmit="return confirm('Usunąć wydatek? Cofnie to wpływ na stan.');">
|
onsubmit="return confirm('Usunąć wydatek? Cofnie to wpływ na stan.');">
|
||||||
<button class="btn btn-sm btn-outline-danger">Usuń</button>
|
<button class="btn btn-sm btn-outline-danger">Usuń</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% if a.ukryta %}
|
|
||||||
<form class="d-inline" method="post"
|
|
||||||
action="{{ url_for('odkryj_wydatek', wydatek_id=a.id) }}">
|
|
||||||
<button class="btn btn-sm btn-outline-secondary">Odkryj</button>
|
|
||||||
</form>
|
|
||||||
{% else %}
|
|
||||||
<form class="d-inline" method="post"
|
|
||||||
action="{{ url_for('ukryj_wydatek', wydatek_id=a.id) }}">
|
|
||||||
<button class="btn btn-sm btn-outline-secondary">Ukryj</button>
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -127,10 +158,6 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="small text-muted">
|
|
||||||
Aktualny stan: <strong>{{ '%.2f'|format(zbiorka.stan or 0) }} PLN</strong>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user