feat(WP-0012): Querschnitt — Freigaben, Felder, Feedback, Suche, Tests

Implements all 8 tasks of the final cross-cutting workplan:

- T01: Generisches Freigabe-Modal (freigabe_modal, freigabe_erteilen views + templates)
- T02: Freigaben-Übersicht pro Ausschreibung (freigaben_uebersicht view + template)
- T03: EntityFieldConfig Admin-Interface (/felder/<entity_type>/ with HTMX toggle)
- T04: CustomAttribute-Panel (full CRUD with sort, lazy HTMX load)
- T05: Feedback-Backlog mit Statusverwaltung + feedback_success.html template
- T06: End-to-End-Tests in vergabe_teilnahme/tests/test_e2e.py (8 tests)
- T07: Globale Suche erweitert (Dokumente, Nachweise, Referenzen, Marktbegleiter)
- T08: Alle Migrationen sauber, 68/68 Tests grün, Ruff-Fehler in neuem Code behoben

Bugfix: URL-Namespace-Fehler in Abgabe-Templates (ausschreibungen:nachbetrachtung:abgabe → ausschreibungen:abgabe)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
tegwick 2026-05-11 17:54:38 +02:00
parent c5ccbd665d
commit 5a231223c0
23 changed files with 828 additions and 37 deletions

View file

@ -0,0 +1,56 @@
{% extends "base.html" %}
{% block title %}Feedback-Backlog{% endblock %}
{% block content %}
<div class="flex items-center justify-between mb-5">
<h1 class="page-title">Feedback-Backlog</h1>
<span class="text-sm text-slate-500">{{ eintraege.count }} Einträge</span>
</div>
<form method="get" class="flex gap-3 mb-5 flex-wrap">
<select name="status" class="form-input w-auto text-sm" onchange="this.form.submit()">
<option value="">Alle Status</option>
{% for val, label in status_choices %}
<option value="{{ val }}" {% if val == current_status %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
<select name="kategorie" class="form-input w-auto text-sm" onchange="this.form.submit()">
<option value="">Alle Kategorien</option>
{% for val, label in kategorie_choices %}
<option value="{{ val }}" {% if val == current_kategorie %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
<select name="dringlichkeit" class="form-input w-auto text-sm" onchange="this.form.submit()">
<option value="">Alle Dringlichkeiten</option>
{% for val, label in dringlichkeit_choices %}
<option value="{{ val }}" {% if val == current_dringlichkeit %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
{% if current_status or current_kategorie or current_dringlichkeit %}
<a href="?" class="text-sm text-slate-500 self-center hover:underline">Filter zurücksetzen</a>
{% endif %}
</form>
<div class="card overflow-x-auto">
{% if eintraege %}
<table class="w-full text-sm">
<thead>
<tr class="text-left border-b border-slate-200">
<th class="pb-2 font-medium text-slate-600">Titel</th>
<th class="pb-2 font-medium text-slate-600">Beschreibung</th>
<th class="pb-2 font-medium text-slate-600">Kategorie</th>
<th class="pb-2 font-medium text-slate-600">Dringlichkeit</th>
<th class="pb-2 font-medium text-slate-600">Status</th>
<th class="pb-2 font-medium text-slate-600">Datum</th>
</tr>
</thead>
<tbody>
{% for eintrag in eintraege %}
{% include "feedback/partials/eintrag_zeile.html" with status_choices=status_choices %}
{% endfor %}
</tbody>
</table>
{% else %}
<p class="text-slate-500 text-sm">Keine Einträge gefunden.</p>
{% endif %}
</div>
{% endblock %}

View file

@ -0,0 +1,39 @@
<tr id="eintrag-{{ eintrag.pk }}" class="border-b border-slate-100 hover:bg-slate-50 text-sm">
<td class="py-2 font-medium text-slate-800 max-w-xs">
{{ eintrag.titel|truncatechars:60 }}
{% if eintrag.ausschreibung %}
<span class="text-xs text-slate-400 block">{{ eintrag.ausschreibung.titel|truncatechars:40 }}</span>
{% endif %}
</td>
<td class="py-2 text-slate-500 max-w-xs text-xs">{{ eintrag.beschreibung|truncatechars:100 }}</td>
<td class="py-2">
<span class="inline-block rounded-full px-2 py-0.5 text-xs
{% if eintrag.kategorie == 'fehler' %}bg-red-100 text-red-700
{% elif eintrag.kategorie == 'verbesserung' %}bg-blue-100 text-blue-700
{% else %}bg-slate-100 text-slate-700{% endif %}">
{{ eintrag.get_kategorie_display }}
</span>
</td>
<td class="py-2">
<span class="inline-block rounded-full px-2 py-0.5 text-xs
{% if eintrag.dringlichkeit == 'kritisch' %}bg-red-100 text-red-700
{% elif eintrag.dringlichkeit == 'hoch' %}bg-orange-100 text-orange-700
{% elif eintrag.dringlichkeit == 'mittel' %}bg-amber-100 text-amber-700
{% else %}bg-slate-100 text-slate-600{% endif %}">
{{ eintrag.get_dringlichkeit_display }}
</span>
</td>
<td class="py-2">
<form hx-post="/feedback/backlog/{{ eintrag.pk }}/status/"
hx-target="#eintrag-{{ eintrag.pk }}"
hx-swap="outerHTML">
{% csrf_token %}
<select name="status" onchange="this.form.requestSubmit()" class="text-xs border-slate-200 rounded p-1">
{% for val, label in status_choices %}
<option value="{{ val }}" {% if val == eintrag.status %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
</form>
</td>
<td class="py-2 text-xs text-slate-500">{{ eintrag.datum|date:"d.m.Y" }}</td>
</tr>