generated from coulomb/repo-seed
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>
80 lines
3.1 KiB
HTML
80 lines
3.1 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Auswertung — {{ marktbegleiter.name }}{% endblock %}
|
|
{% block content %}
|
|
<div class="flex items-center justify-between mb-5">
|
|
<h1 class="page-title">Auswertung: {{ marktbegleiter.name }}</h1>
|
|
<a href="{% url 'marktbegleiter:detail' pk=marktbegleiter.pk %}" class="btn-secondary">Zurück</a>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-3 gap-4 mb-6">
|
|
<div class="card text-center">
|
|
<p class="text-3xl font-bold text-brand-600">{{ passagen.count }}</p>
|
|
<p class="text-sm text-slate-500 mt-1">Passagen gesamt</p>
|
|
</div>
|
|
<div class="card text-center">
|
|
<p class="text-3xl font-bold text-brand-600">{{ anzahl_ausschreibungen }}</p>
|
|
<p class="text-sm text-slate-500 mt-1">Ausschreibungen</p>
|
|
</div>
|
|
<div class="card text-center">
|
|
<p class="text-3xl font-bold text-brand-600">
|
|
{% if score_durchschnitt %}{{ score_durchschnitt|floatformat:1 }}{% else %}—{% endif %}
|
|
</p>
|
|
<p class="text-sm text-slate-500 mt-1">Ø Verlässlichkeit</p>
|
|
</div>
|
|
</div>
|
|
|
|
{% if ausschreiber_haeufigkeit %}
|
|
<div class="card mb-5">
|
|
<h2 class="section-title mb-4">Häufigste Ausschreiber</h2>
|
|
<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">Ausschreiber</th>
|
|
<th class="pb-2 font-medium text-slate-600">Passagen</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for row in ausschreiber_haeufigkeit %}
|
|
<tr class="border-b border-slate-100">
|
|
<td class="py-2 text-slate-700">{{ row.ausschreibung__ausschreiber|default:"(unbekannt)" }}</td>
|
|
<td class="py-2 font-medium">{{ row.count }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="card">
|
|
<h2 class="section-title mb-4">Alle 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 font-medium {% if p.verlaesslichkeitsscore >= 7 %}text-green-600{% elif p.verlaesslichkeitsscore >= 4 %}text-yellow-600{% else %}text-red-500{% endif %}">
|
|
{{ p.verlaesslichkeitsscore }}
|
|
</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">Keine Passagen vorhanden.</p>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|