homeman-elixir/lib/homeman_web/live/task_live/show.html.heex

30 lines
859 B
Plaintext
Raw Normal View History

2024-01-21 23:48:10 -06:00
<.header>
Task <%= @task.id %>
<:subtitle>This is a task record from your database.</:subtitle>
<:actions>
<.link patch={~p"/tasks/#{@task}/show/edit"} phx-click={JS.push_focus()}>
<.button>Edit task</.button>
</.link>
</:actions>
</.header>
<.list>
<:item title="Description"><%= @task.description %></:item>
<:item title="Emoji"><%= @task.emoji %></:item>
<:item title="Completed at"><%= @task.completed_at %></:item>
<:item title="Phase"><%= @task.phase %></:item>
</.list>
<.back navigate={~p"/tasks"}>Back to tasks</.back>
<.modal :if={@live_action == :edit} id="task-modal" show on_cancel={JS.patch(~p"/tasks/#{@task}")}>
<.live_component
module={HomemanWeb.TaskLive.FormComponent}
id={@task.id}
title={@page_title}
action={@live_action}
task={@task}
patch={~p"/tasks/#{@task}"}
/>
</.modal>