diff --git a/lib/planner_web/live/tasks_components.ex b/lib/planner_web/live/tasks_components.ex index 08556ab..d90a027 100644 --- a/lib/planner_web/live/tasks_components.ex +++ b/lib/planner_web/live/tasks_components.ex @@ -162,14 +162,7 @@ defmodule TaskDetailsComponent do to: @route_edit_task.(@socket, @task.id), class: "button is-dark is-small" ) %> - - delete - - """ end diff --git a/lib/planner_web/live/tasks_live.ex b/lib/planner_web/live/tasks_live.ex index db0da07..f2cda1c 100644 --- a/lib/planner_web/live/tasks_live.ex +++ b/lib/planner_web/live/tasks_live.ex @@ -190,14 +190,6 @@ defmodule PlannerWeb.TasksLive do {:noreply, refresh_tasks_and_flash_msg(socket, "task \"#{task.value}\" completed")} end - def handle_event("delete-task", %{"task-id" => task_id}, socket) do - {_, task} = Tasks.delete_task_by_id!(task_id) - socket = refresh_tasks_and_flash_msg(socket, "task \"#{task.value}\" deleted") - route = get_index_route(socket) - - {:noreply, push_patch(socket, to: route)} - end - def handle_event("new-task", %{"task" => task_params}, socket) do add_new_task(task_params, socket.assigns.active_plan, socket) end