generated from coulomb/repo-seed
Compare commits
2 Commits
f6af101933
...
b054824862
| Author | SHA1 | Date | |
|---|---|---|---|
| b054824862 | |||
| 9ef6e0950a |
@@ -115,6 +115,10 @@ def ausschreibung_detail(request, pk):
|
|||||||
from vergabe_teilnahme.apps.lose.models import Los
|
from vergabe_teilnahme.apps.lose.models import Los
|
||||||
|
|
||||||
a = get_object_or_404(Ausschreibung, pk=pk)
|
a = get_object_or_404(Ausschreibung, pk=pk)
|
||||||
|
from vergabe_teilnahme.apps.aufgaben.models import Aufgabe as AufgabeModel
|
||||||
|
aufgaben = AufgabeModel.objects.filter(ausschreibung=a).select_related(
|
||||||
|
'verantwortlicher', 'los'
|
||||||
|
).order_by('prioritaet', 'frist')
|
||||||
lose = Los.objects.filter(ausschreibung=a).annotate(
|
lose = Los.objects.filter(ausschreibung=a).annotate(
|
||||||
aufgaben_total=Count('aufgaben', distinct=True),
|
aufgaben_total=Count('aufgaben', distinct=True),
|
||||||
aufgaben_erledigt=Count(
|
aufgaben_erledigt=Count(
|
||||||
@@ -127,6 +131,7 @@ def ausschreibung_detail(request, pk):
|
|||||||
'ausschreibung': a,
|
'ausschreibung': a,
|
||||||
'ausschreibung_id': pk,
|
'ausschreibung_id': pk,
|
||||||
'lose': lose,
|
'lose': lose,
|
||||||
|
'aufgaben': aufgaben,
|
||||||
'phases': build_phase_nav(a),
|
'phases': build_phase_nav(a),
|
||||||
'warnungen': get_deadline_warnings(a),
|
'warnungen': get_deadline_warnings(a),
|
||||||
'aufgaben_score': aufgaben_score(Aufgabe.objects.filter(ausschreibung=a)),
|
'aufgaben_score': aufgaben_score(Aufgabe.objects.filter(ausschreibung=a)),
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% load vergabe_tags %}
|
{% load vergabe_tags %}
|
||||||
<tr class="hover:bg-slate-50{% if aufgabe.status == 'ueberfaellig' %} bg-red-50{% endif %}">
|
<tr class="hover:bg-slate-50{% if aufgabe.status == 'ueberfaellig' %} bg-red-50{% endif %}">
|
||||||
<td class="py-2 pr-4">
|
<td class="py-2 pr-4">
|
||||||
<a href="{% url 'ausschreibungen:aufgaben:detail' ausschreibung.pk aufgabe.pk %}"
|
<a href="{% url 'ausschreibungen:aufgaben:detail' aufgabe.ausschreibung_id aufgabe.pk %}"
|
||||||
class="font-medium text-slate-800 hover:text-blue-600 line-clamp-1">
|
class="font-medium text-slate-800 hover:text-blue-600 line-clamp-1">
|
||||||
{{ aufgabe.titel|truncatechars:60 }}
|
{{ aufgabe.titel|truncatechars:60 }}
|
||||||
</a>
|
</a>
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<td class="py-2 pr-4 text-xs text-slate-600">{{ aufgabe.verantwortlicher|default:"—" }}</td>
|
<td class="py-2 pr-4 text-xs text-slate-600">{{ aufgabe.verantwortlicher|default:"—" }}</td>
|
||||||
<td class="py-2 pr-4">
|
<td class="py-2 pr-4">
|
||||||
<select name="status"
|
<select name="status"
|
||||||
hx-post="{% url 'ausschreibungen:aufgaben:status' ausschreibung.pk aufgabe.pk %}"
|
hx-post="{% url 'ausschreibungen:aufgaben:status' aufgabe.ausschreibung_id aufgabe.pk %}"
|
||||||
hx-target="closest tr"
|
hx-target="closest tr"
|
||||||
hx-swap="outerHTML"
|
hx-swap="outerHTML"
|
||||||
class="form-input text-xs py-1">
|
class="form-input text-xs py-1">
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
</td>
|
</td>
|
||||||
{% if aufgabe.status == 'erledigt' %}
|
{% if aufgabe.status == 'erledigt' %}
|
||||||
<td class="py-2">
|
<td class="py-2">
|
||||||
<form hx-post="{% url 'ausschreibungen:aufgaben:ergebnis' ausschreibung.pk aufgabe.pk %}"
|
<form hx-post="{% url 'ausschreibungen:aufgaben:ergebnis' aufgabe.ausschreibung_id aufgabe.pk %}"
|
||||||
hx-target="closest tr" hx-swap="outerHTML"
|
hx-target="closest tr" hx-swap="outerHTML"
|
||||||
class="flex gap-1 items-center">
|
class="flex gap-1 items-center">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|||||||
@@ -135,6 +135,45 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Aufgaben -->
|
||||||
|
<div class="card mt-6">
|
||||||
|
<div class="flex items-center justify-between mb-3">
|
||||||
|
<h2 class="text-sm font-semibold text-slate-700">Aufgaben</h2>
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
<a href="{% url 'ausschreibungen:aufgaben:liste' ausschreibung.pk %}" class="btn-ghost text-xs">Alle anzeigen</a>
|
||||||
|
<button class="btn-ghost text-xs"
|
||||||
|
hx-get="{% url 'ausschreibungen:aufgaben:neu' ausschreibung.pk %}"
|
||||||
|
hx-target="#aufgaben-form-container"
|
||||||
|
hx-swap="innerHTML">
|
||||||
|
+ Aufgabe anlegen
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="aufgaben-form-container"></div>
|
||||||
|
{% if aufgaben %}
|
||||||
|
<table class="w-full text-sm mt-1">
|
||||||
|
<thead>
|
||||||
|
<tr class="border-b border-slate-200 text-left text-xs text-slate-500">
|
||||||
|
<th class="pb-2 pr-4">Titel</th>
|
||||||
|
<th class="pb-2 pr-4">Typ</th>
|
||||||
|
<th class="pb-2 pr-4">Frist</th>
|
||||||
|
<th class="pb-2 pr-4">Verantwortlicher</th>
|
||||||
|
<th class="pb-2 pr-4">Status</th>
|
||||||
|
<th class="pb-2"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="aufgaben-tbody" class="divide-y divide-slate-100">
|
||||||
|
{% for aufgabe in aufgaben %}
|
||||||
|
{% include "aufgaben/partials/aufgabe_row.html" %}
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% else %}
|
||||||
|
<div id="aufgaben-tbody"></div>
|
||||||
|
<p class="text-sm text-slate-400 mt-1">Noch keine Aufgaben angelegt.</p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="flex gap-3 mt-6">
|
<div class="flex gap-3 mt-6">
|
||||||
<a href="{% url 'ausschreibungen:entscheidung' ausschreibung.pk %}" class="btn-ghost text-xs">
|
<a href="{% url 'ausschreibungen:entscheidung' ausschreibung.pk %}" class="btn-ghost text-xs">
|
||||||
Teilnahmeentscheidung
|
Teilnahmeentscheidung
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<a href="/aufgaben/" class="sidebar-link">Aufgaben</a>
|
||||||
<a href="/marktbegleiter/" class="sidebar-link">Marktbegleiter</a>
|
<a href="/marktbegleiter/" class="sidebar-link">Marktbegleiter</a>
|
||||||
<a href="/feedback/backlog/" class="sidebar-link">Feedback-Backlog</a>
|
<a href="/feedback/backlog/" class="sidebar-link">Feedback-Backlog</a>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user