feat: Show alert when user accepted changes in admin panel

Display prominent green alert informing admin that user has accepted
the proposed changes and they can now approve the membership application.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-02-01 18:05:28 +01:00
parent 54d5e030e4
commit 2a7cfbcfc9

View File

@ -784,6 +784,27 @@
</p>
{% elif application.status == 'under_review' %}
{# Check if user accepted changes from workflow history #}
{% set user_accepted = namespace(found=false, name='', timestamp='') %}
{% if application.workflow_history %}
{% for event in application.workflow_history|reverse %}
{% if event.event == 'user_accepted_changes' and not user_accepted.found %}
{% set user_accepted.found = true %}
{% set user_accepted.name = event.user_name %}
{% set user_accepted.timestamp = event.timestamp[:16].replace('T', ' ') %}
{% endif %}
{% endfor %}
{% endif %}
{% if user_accepted.found %}
<div class="alert" style="background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); color: #16a34a;">
<strong>✓ Użytkownik zaakceptował proponowane zmiany</strong>
<br>{{ user_accepted.name }} zatwierdził(a) zmiany danych z rejestru.
<br><small>{{ user_accepted.timestamp }}</small>
<br><br><em>Możesz teraz zatwierdzić deklarację członkowską.</em>
</div>
{% endif %}
<div class="action-buttons">
<button class="btn-action btn-approve" onclick="openApproveModal()">
✓ Zatwierdź