Add the delete button for a task.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user