1. Bewerben button: hx-disabled-elt + hx-on::before-request flips the text to "läuft…" and disables the button the moment the confirm is accepted. .btn[disabled] now renders at 55% opacity with not-allowed cursor. Existing 3s poll interval picks up the running state for the chip beside the address. 2. Bewerbungen tab: delete the /bewerbungen/<id> forensics detail page + template entirely. The list now shows a plain "Report (ZIP)" button for every row regardless of success — same download route (/bewerbungen/<id>/report.zip), same visual style. External link to the listing moved onto the address itself. 3. Verified retention: web/retention.py runs cleanup_retention() hourly, which DELETEs errors + audit_log rows older than RETENTION_DAYS (14) and nulls applications.forensics_json for older rows. No code change needed. 4. Partner feature. Migration v8 adds partnerships(from_user_id, to_user_id, status, created_at, accepted_at). Einstellungen → Partner lets users: - send a request by username - accept / decline incoming requests - withdraw outgoing requests - unlink the active partnership A user can only have one accepted partnership; accepting one wipes stale pending rows involving either side. On the Wohnungen list, if the partner has applied to a flat, a small primary-colored circle with the partner's first-name initial sits on the top-right of the Bewerben button; if they've rejected it, the badge sits on Ablehnen. Badge is hover-tooltipped with the partner's name + verb. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
35 lines
2 KiB
HTML
35 lines
2 KiB
HTML
{% extends "_layout.html" %}
|
|
{% block content %}
|
|
<section class="card">
|
|
<div class="flex items-center justify-between px-4 py-3 border-b border-soft">
|
|
<h2 class="font-semibold">Meine Bewerbungen</h2>
|
|
<span class="text-xs text-slate-500">{{ applications|length }}</span>
|
|
</div>
|
|
<div class="divide-y divide-soft">
|
|
{% for a in applications %}
|
|
<div class="px-4 py-3 text-sm flex flex-col md:flex-row md:items-center gap-3">
|
|
<div class="flex-1 min-w-0">
|
|
<div class="flex items-center gap-2 flex-wrap">
|
|
{% if a.success == 1 %}<span class="chip chip-ok">ok</span>
|
|
{% elif a.success == 0 %}<span class="chip chip-bad">fehlgeschlagen</span>
|
|
{% else %}<span class="chip chip-warn">läuft</span>{% endif %}
|
|
<span class="chip chip-info">{% if a.triggered_by == 'auto' %}automatisch{% else %}manuell{% endif %}</span>
|
|
{% if a.provider %}<span class="chip chip-info">{{ a.provider }}</span>{% endif %}
|
|
{% if a.submit_forms_used %}<span class="chip chip-warn">echt gesendet</span>
|
|
{% else %}<span class="chip chip-info">nicht abgeschickt</span>{% endif %}
|
|
<span class="text-slate-500 text-xs ml-auto"
|
|
title="{{ a.started_at|de_dt }}">{{ a.started_at|de_dt }}</span>
|
|
</div>
|
|
<div class="mt-1 truncate">
|
|
#{{ a.id }} — <a href="{{ a.url }}" target="_blank" rel="noopener">{{ a.address or a.url }}</a>
|
|
</div>
|
|
{% if a.message %}<div class="text-xs text-slate-500 mt-0.5 truncate">{{ a.message }}</div>{% endif %}
|
|
</div>
|
|
<a class="btn btn-ghost text-sm" href="/bewerbungen/{{ a.id }}/report.zip">Report (ZIP)</a>
|
|
</div>
|
|
{% else %}
|
|
<div class="px-4 py-8 text-center text-slate-500">Noch keine Bewerbungen.</div>
|
|
{% endfor %}
|
|
</div>
|
|
</section>
|
|
{% endblock %}
|