hide Ablehnen button once a flat has been successfully applied to

Mirrors the Bewerben-hide behavior: once item.last.success == 1, the
Ablehnen form/button doesn't render either, so the row just shows the
"beworben" chip without any actions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
EiSiMo 2026-04-21 18:40:42 +02:00
parent f5b4523b77
commit 72d9f808e2

View file

@ -166,6 +166,7 @@
{% endif %} {% endif %}
</form> </form>
{% endif %} {% endif %}
{% if not (item.last and item.last.success == 1) %}
<form method="post" action="/actions/reject" <form method="post" action="/actions/reject"
class="btn-with-badge" class="btn-with-badge"
hx-post="/actions/reject" hx-target="#wohnungen-body" hx-swap="outerHTML"> hx-post="/actions/reject" hx-target="#wohnungen-body" hx-swap="outerHTML">
@ -180,6 +181,7 @@
title="{{ partner.name }} hat abgelehnt">{{ partner.initial }}</span> title="{{ partner.name }} hat abgelehnt">{{ partner.initial }}</span>
{% endif %} {% endif %}
</form> </form>
{% endif %}
<button type="button" class="flat-expand-btn" aria-label="Details" <button type="button" class="flat-expand-btn" aria-label="Details"
data-flat-id="{{ f.id }}"> data-flat-id="{{ f.id }}">
<svg width="14" height="14" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="5 8 10 13 15 8"/></svg> <svg width="14" height="14" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="5 8 10 13 15 8"/></svg>