feat: show total payment amount (self + guests) on event page
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Displays breakdown: "Do wpłaty łącznie: 280 zł" with "Ty: 140 zł + 1 osoba: 140 zł" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ee61f5876d
commit
131f7f7a6f
@ -605,19 +605,28 @@
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if event.is_paid and user_attending %}
|
||||
{% set my_amount = (user_attending.payment_amount or 0)|float %}
|
||||
{% set guests_amount = user_guests|sum(attribute='payment_amount', default=0)|float if user_guests else 0 %}
|
||||
{% set total_to_pay = my_amount + guests_amount %}
|
||||
<div style="margin-top: 8px; width: 100%;">
|
||||
{% if user_attending.payment_status == 'paid' %}
|
||||
{% if user_attending.payment_status == 'paid' and not user_guests %}
|
||||
<span style="background: #dcfce7; color: #166534; padding: 6px 12px; border-radius: var(--radius-sm); font-size: 0.85em; font-weight: 600; display: inline-block;">
|
||||
✓ Płatność potwierdzona
|
||||
</span>
|
||||
{% elif user_attending.payment_status == 'exempt' %}
|
||||
{% elif user_attending.payment_status == 'exempt' and not user_guests %}
|
||||
<span style="background: #f3f4f6; color: #6b7280; padding: 6px 12px; border-radius: var(--radius-sm); font-size: 0.85em; font-weight: 600; display: inline-block;">
|
||||
Zwolniony z opłaty
|
||||
</span>
|
||||
{% else %}
|
||||
<span style="background: #fee2e2; color: #991b1b; padding: 6px 12px; border-radius: var(--radius-sm); font-size: 0.85em; font-weight: 600; display: inline-block;">
|
||||
Oczekuje na potwierdzenie wpłaty — {{ "%.0f"|format(user_attending.payment_amount) if user_attending.payment_amount else '?' }} zł
|
||||
</span>
|
||||
<div style="background: #fef3c7; color: #92400e; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.85em; display: inline-block;">
|
||||
<strong>Do wpłaty łącznie: {{ "%.0f"|format(total_to_pay) }} zł</strong>
|
||||
<div style="font-size: 0.9em; margin-top: 4px; color: #a16207;">
|
||||
Ty: {{ "%.0f"|format(my_amount) }} zł
|
||||
{% if user_guests %}
|
||||
+ {{ user_guests|length }} {{ 'osoba' if user_guests|length == 1 else 'osoby' if user_guests|length < 5 else 'osób' }}: {{ "%.0f"|format(guests_amount) }} zł
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user