Add the delete button for a task.

This commit is contained in:
2023-07-17 19:25:47 +03:00
parent c66712d0f4
commit a929846d13
4 changed files with 19 additions and 1 deletions
+7 -1
View File
@@ -1,4 +1,4 @@
<div class="p-2 border rounded-lg inline-flex gap-2 my-2 bg-gray-200">
<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">
{% elif task.status == "DOING" %}
@@ -10,4 +10,10 @@
</p>
<p class="font-semibold">{{ task.name }}</p>
<p>{{ task.description | truncatewords:10 }}</p>
<button type="button"
hx-post="{% url 'tasks:task-delete' task.id %}"
hx-swap="outerHTML">
Delete
</button>
</div>