30 lines
859 B
Plaintext
30 lines
859 B
Plaintext
|
<.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>
|