Add the action to set the circular next status for Task items.

This commit is contained in:
2023-07-23 19:20:57 +03:00
parent 9f6934d076
commit b1e9c7e713
4 changed files with 22 additions and 3 deletions
+5 -3
View File
@@ -1,11 +1,13 @@
<div hx-target="this" class="p-2 border rounded-lg inline-flex gap-2 my-2 bg-gray-200">
{% if task.status == "TODO" %}
<p class="font-semibold text-green-500">
<p class="font-semibold text-green-500"
{% elif task.status == "DOING" %}
<p class="font-semibold text-yellow-500">
<p class="font-semibold text-yellow-500"
{% elif task.status == "DONE" or task.status == "CANCELED" %}
<p class="font-semibold text-gray-500">
<p class="font-semibold text-gray-500"
{% endif %}
hx-post="{% url 'tasks:task-set-circular-next-status' task.id %}"
hx-swap="outerHTML">
{{ task.status }}
</p>
<p class="font-semibold">{{ task.name }}</p>