diff options
author | Matthew Lemon <y@yulqen.org> | 2024-10-15 14:50:52 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-10-15 14:50:52 +0100 |
commit | 3c724c0a25a8cfa34befbbb88bff1236cc88ec20 (patch) | |
tree | db4f131fb2b3366da19f0d92c6f72749da960db6 | |
parent | a47f71efc9a7643be548f7f805e162a1942d3db4 (diff) |
Cleaned up the EP table for an org
-rw-r--r-- | core/static/css/output.css | 33 | ||||
-rw-r--r-- | engagements/templates/engagements/ep_org.html | 16 | ||||
-rw-r--r-- | engagements/views.py | 2 |
3 files changed, 8 insertions, 43 deletions
diff --git a/core/static/css/output.css b/core/static/css/output.css index 3a5b9a1..c49ad06 100644 --- a/core/static/css/output.css +++ b/core/static/css/output.css @@ -612,10 +612,6 @@ video { z-index: 10; } -.m-2 { - margin: 0.5rem; -} - .mx-auto { margin-left: auto; margin-right: auto; @@ -859,24 +855,10 @@ video { border-bottom-width: calc(2px * var(--tw-divide-y-reverse)); } -.divide-y-4 > :not([hidden]) ~ :not([hidden]) { - --tw-divide-y-reverse: 0; - border-top-width: calc(4px * calc(1 - var(--tw-divide-y-reverse))); - border-bottom-width: calc(4px * var(--tw-divide-y-reverse)); -} - .divide-solid > :not([hidden]) ~ :not([hidden]) { border-style: solid; } -.divide-dashed > :not([hidden]) ~ :not([hidden]) { - border-style: dashed; -} - -.divide-double > :not([hidden]) ~ :not([hidden]) { - border-style: double; -} - .divide-gray-200 > :not([hidden]) ~ :not([hidden]) { --tw-divide-opacity: 1; border-color: rgb(229 231 235 / var(--tw-divide-opacity)); @@ -927,11 +909,6 @@ video { border-width: 2px; } -.border-y-0 { - border-top-width: 0px; - border-bottom-width: 0px; -} - .border-b { border-bottom-width: 1px; } @@ -1311,6 +1288,11 @@ video { color: rgb(79 70 229 / var(--tw-text-opacity)); } +.text-purple { + --tw-text-opacity: 1; + color: rgb(63 60 187 / var(--tw-text-opacity)); +} + .text-red-500 { --tw-text-opacity: 1; color: rgb(239 68 68 / var(--tw-text-opacity)); @@ -1331,11 +1313,6 @@ video { color: rgb(161 161 170 / var(--tw-text-opacity)); } -.text-purple { - --tw-text-opacity: 1; - color: rgb(63 60 187 / var(--tw-text-opacity)); -} - .underline { text-decoration-line: underline; } 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) |