Files
vergabe-teilnahme/vergabe_teilnahme/templates/marktbegleiter/marktbegleiter_detail.html
tegwick bde10f3a69 feat(WP-0011): Marktbegleiter-Analyse — Katalog, Passagen, Auswertung
Implementiert UC-MB-01 bis UC-MB-03: Marktbegleiter-Katalog (Liste,
Detail, Anlegen/Bearbeiten), Ausschreibungspassagen mit Verlässlichkeitsscore
(1–10, Validator), Musterauswertung mit Aggregationen (Ausschreiber-Häufigkeit,
Ø-Score, Passagen-Anzahl). 4 Tests grün.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 16:20:55 +02:00

119 lines
4.3 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ obj.name }}{% endblock %}
{% block content %}
<div class="flex items-center justify-between mb-5">
<h1 class="page-title">{{ obj.name }}</h1>
<div class="flex gap-2">
<a href="{% url 'marktbegleiter:auswertung' pk=obj.pk %}" class="btn-secondary">Auswertung</a>
<a href="{% url 'marktbegleiter:bearbeiten' pk=obj.pk %}" class="btn-primary">Bearbeiten</a>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-5 mb-5">
<div class="card col-span-2 space-y-4">
{% if obj.kurzbeschreibung %}
<div>
<h2 class="section-title">Beschreibung</h2>
<p class="text-sm text-slate-700">{{ obj.kurzbeschreibung }}</p>
</div>
{% endif %}
{% if obj.produkt_leistungsportfolio %}
<div>
<h2 class="section-title">Portfolio</h2>
<p class="text-sm text-slate-700 whitespace-pre-line">{{ obj.produkt_leistungsportfolio }}</p>
</div>
{% endif %}
{% if obj.bekannte_staerken %}
<div>
<h2 class="section-title">Stärken</h2>
<p class="text-sm text-slate-700 whitespace-pre-line">{{ obj.bekannte_staerken }}</p>
</div>
{% endif %}
{% if obj.bekannte_schwaechen %}
<div>
<h2 class="section-title">Schwächen</h2>
<p class="text-sm text-slate-700 whitespace-pre-line">{{ obj.bekannte_schwaechen }}</p>
</div>
{% endif %}
{% if obj.typische_formulierungen %}
<div>
<h2 class="section-title">Typische Formulierungen</h2>
<div class="flex flex-wrap gap-2">
{% for zeile in obj.typische_formulierungen.splitlines %}
{% if zeile.strip %}
<span class="px-2 py-1 bg-slate-100 text-slate-700 rounded text-xs">{{ zeile.strip }}</span>
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
</div>
<div class="space-y-4">
<div class="card">
<h2 class="section-title mb-3">Kennzahlen</h2>
<dl class="space-y-2 text-sm">
<div class="flex justify-between">
<dt class="text-slate-500">Ausschreibungen</dt>
<dd class="font-medium">{{ anzahl_ausschreibungen }}</dd>
</div>
<div class="flex justify-between">
<dt class="text-slate-500">Passagen gesamt</dt>
<dd class="font-medium">{{ passagen.count }}</dd>
</div>
{% if score_durchschnitt %}
<div class="flex justify-between">
<dt class="text-slate-500">Ø Verlässlichkeit</dt>
<dd class="font-medium">{{ score_durchschnitt|floatformat:1 }}</dd>
</div>
{% endif %}
<div class="flex justify-between">
<dt class="text-slate-500">Vertraulichkeit</dt>
<dd>{{ obj.get_vertraulichkeit_display }}</dd>
</div>
{% if obj.letzte_aktualisierung %}
<div class="flex justify-between">
<dt class="text-slate-500">Aktualisiert</dt>
<dd>{{ obj.letzte_aktualisierung }}</dd>
</div>
{% endif %}
</dl>
</div>
</div>
</div>
<div class="card">
<h2 class="section-title mb-4">Verknüpfte Passagen</h2>
{% if passagen %}
<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">Ausschreibung</th>
<th class="pb-2 font-medium text-slate-600">Textauszug</th>
<th class="pb-2 font-medium text-slate-600">Score</th>
<th class="pb-2 font-medium text-slate-600">Kategorie</th>
<th class="pb-2 font-medium text-slate-600">Datum</th>
</tr>
</thead>
<tbody>
{% for p in passagen %}
<tr class="border-b border-slate-100 hover:bg-slate-50">
<td class="py-2 text-slate-700">{{ p.ausschreibung.titel|truncatechars:40 }}</td>
<td class="py-2 text-slate-600 max-w-xs">{{ p.passage|truncatechars:150 }}</td>
<td class="py-2">
<span class="font-medium {% if p.verlaesslichkeitsscore >= 7 %}text-green-600{% elif p.verlaesslichkeitsscore >= 4 %}text-yellow-600{% else %}text-red-500{% endif %}">
{{ p.verlaesslichkeitsscore }}
</span>
</td>
<td class="py-2 text-slate-600">{{ p.kategorie|default:"—" }}</td>
<td class="py-2 text-slate-500 text-xs">{{ p.erfassungsdatum }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="text-slate-500 text-sm">Noch keine Passagen erfasst.</p>
{% endif %}
</div>
{% endblock %}