bewerben UX: instant feedback; drop forensics detail; partner feature
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>
This commit is contained in:
parent
3bb04210c4
commit
a212dff4d9
8 changed files with 379 additions and 166 deletions
|
|
@ -7,27 +7,25 @@
|
|||
</div>
|
||||
<div class="divide-y divide-soft">
|
||||
{% for a in applications %}
|
||||
<div class="px-4 py-3 text-sm">
|
||||
<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 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>
|
||||
<div class="mt-1 truncate">
|
||||
<a href="/bewerbungen/{{ a.id }}">#{{ a.id }} — {{ 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 %}
|
||||
{% if a.success == 0 %}
|
||||
<div class="mt-1">
|
||||
<a class="text-xs" href="/bewerbungen/{{ a.id }}/report.zip">↓ Fehler-Report (ZIP)</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue