+
+
{task.description}
+
+ <.link
+ phx-click={JS.push("complete", value: %{id: task.id})}
+ class="text-green-600 hover:text-green-800 p-1 rounded-full hover:bg-green-100"
+ >
+
+
+
+
- <:col :let={{_id, task}} label="Description">{task.description}
+
+
Due
+
{format_date(task.due)}
+
- <:col :let={{_id, task}} label="Due">{format_date(task.due)}
+
+
+ <.link navigate={~p"/tasks/#{task}"}>Show
+
- <:action :let={{_id, task}}>
-
- <.link navigate={~p"/tasks/#{task}"}>Show
+
+ <.link
+ patch={~p"/tasks/#{task}/edit"}
+ class="text-blue-600 hover:text-blue-800 p-1 rounded-full hover:bg-blue-100"
+ phx-click-stop-propagation="true"
+ >
+
+
+
+ <.link
+ phx-click={JS.push("delete", value: %{id: task.id}) |> hide("#task-#{id}")}
+ data-confirm="Are you sure?"
+ class="text-red-600 hover:text-red-800 p-1 rounded-full hover:bg-red-100"
+ phx-click-stop-propagation="true"
+ >
+
+
+
+
-
-
- <:col :let={{id, task}}>
- <.link patch={~p"/tasks/#{task}/edit"}>
-
-
-
-
- <:col :let={{id, task}}>
- <.link
- phx-click={JS.push("delete", value: %{id: task.id}) |> hide("##{id}")}
- data-confirm="Are you sure?"
- >
-
-
-
-
+ <% end %>
+
<.modal :if={@live_action in [:new, :edit]} id="task-modal" show on_cancel={JS.patch(~p"/tasks")}>
<.live_component