summaryrefslogtreecommitdiffstats
path: root/engagements
diff options
context:
space:
mode:
Diffstat (limited to 'engagements')
-rw-r--r--engagements/templates/engagements/ep_org.html16
-rw-r--r--engagements/views.py2
2 files changed, 3 insertions, 15 deletions
diff --git a/engagements/templates/engagements/ep_org.html b/engagements/templates/engagements/ep_org.html
index e6ea423..e4dc8be 100644
--- a/engagements/templates/engagements/ep_org.html
+++ b/engagements/templates/engagements/ep_org.html
@@ -17,16 +17,13 @@
<h3 class="text-2xl font-semibold mb-4">2023</h3>
<div class="overflow-x-auto">
- <table class="divide-y divide-gray-200">
+ <table class="w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-2 py-1 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Start Date</th>
<th scope="col" class="px-2 py-1 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">End Date</th>
<th scope="col" class="px-2 py-1 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Engagement</th>
- <th scope="col" class="px-2 py-1 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Engagement Type</th>
- <th scope="col" class="px-2 py-1 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Theme</th>
<th scope="col" class="px-2 py-1 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Inspectors Involved</th>
- <th scope="col" class="px-2 py-1 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">DSCs</th>
<th scope="col" class="px-2 py-1 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Travel Effort</th>
<th scope="col" class="px-2 py-1 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Planning and Regulation Effort</th>
<th scope="col" class="px-2 py-1 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Completion Status</th>
@@ -38,10 +35,8 @@
<td class="px-2 py-1 whitespace-nowrap text-sm text-gray-500">{{ e.proposed_start_date|date:'j M Y' }}</td>
<td class="px-2 py-1 whitespace-nowrap text-sm text-gray-500">{{ e.proposed_end_date|date:'j M Y' }}</td>
<td class="px-2 py-1 whitespace-nowrap text-sm font-medium text-blue-600 hover:underline">
- <a href="{% url 'engagements:engagement_detail' e.pk %}">{{ e }}</a>
+ <a href="{% url 'engagements:engagement_detail' e.pk %}">{{ e.friendly_type }}</a>
</td>
- <td class="px-2 py-1 whitespace-nowrap text-sm text-gray-500">{{ e.friendly_type }}</td>
- <td class="px-2 py-1 whitespace-nowrap text-sm text-gray-500">-</td>
<td class="px-2 py-1 text-sm text-gray-500">
<ul class="list-none list-inside">
{% for inspector in e.get_officers %}
@@ -49,13 +44,6 @@
{% endfor %}
</ul>
</td>
- <td class="px-2 py-1 text-sm text-gray-500">
- <ul class="list-disc list-inside">
- {% for dsc in e.dscs %}
- <li><a href="#" class="text-blue-600 hover:underline">{{ dsc.short }}</a></li>
- {% endfor %}
- </ul>
- </td>
<td class="px-2 py-1 whitespace-nowrap text-sm text-gray-500">TBC</td>
<td class="px-2 py-1 whitespace-nowrap text-sm text-gray-500">TBC</td>
<td class="px-2 py-1 whitespace-nowrap text-sm text-gray-500">Incomplete</td>
diff --git a/engagements/views.py b/engagements/views.py
index 86f886d..6d7d4c9 100644
--- a/engagements/views.py
+++ b/engagements/views.py
@@ -84,7 +84,7 @@ def engagement_detail(request, pk):
@login_required
def engagement_plan_for(request, orgslug):
org = Organisation.objects.get(slug=orgslug)
- engagements = Engagement.objects.filter(external_party=org)
+ engagements = Engagement.objects.filter(external_party=org).order_by("-proposed_start_date")
dscs = SubInstrument.objects.filter(itype="DSC").filter(effort__engagement__external_party=org).distinct()
context = {"entity": org, "engagements": engagements, "dscs": dscs}
return render(request, "engagements/ep_org.html", context)