style: formatter seems to work now
This commit is contained in:
parent
70aeb019a5
commit
f34936b176
11 changed files with 117 additions and 116 deletions
|
|
@ -6,7 +6,7 @@ defmodule PutzplanWeb.CompletedTaskLive.FormComponent do
|
|||
~H"""
|
||||
<div>
|
||||
<.header>
|
||||
<%= @title %>
|
||||
{@title}
|
||||
<:subtitle>Use this form to manage completed_task records in your database.</:subtitle>
|
||||
</.header>
|
||||
|
||||
|
|
@ -17,9 +17,12 @@ defmodule PutzplanWeb.CompletedTaskLive.FormComponent do
|
|||
phx-change="validate"
|
||||
phx-submit="save"
|
||||
>
|
||||
|
||||
<.input field={@form[:user]} type="text" label="User" /><.input field={@form[:task]} type="text" label="Task" />
|
||||
|
||||
<.input field={@form[:user]} type="text" label="User" /><.input
|
||||
field={@form[:task]}
|
||||
type="text"
|
||||
label="Task"
|
||||
/>
|
||||
|
||||
<:actions>
|
||||
<.button phx-disable-with="Saving...">Save Completed task</.button>
|
||||
</:actions>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ defmodule PutzplanWeb.CompletedTaskLive.Index do
|
|||
Listing Completed tasks
|
||||
<:actions>
|
||||
<.link patch={~p"/completed_tasks/new"}>
|
||||
<.button>New Completed task</.button>
|
||||
<.button>New Completed task</.button>
|
||||
</.link>
|
||||
</:actions>
|
||||
</.header>
|
||||
|
|
@ -18,31 +18,31 @@ defmodule PutzplanWeb.CompletedTaskLive.Index do
|
|||
rows={@streams.completed_tasks}
|
||||
row_click={fn {_id, completed_task} -> JS.navigate(~p"/completed_tasks/#{completed_task}") end}
|
||||
>
|
||||
|
||||
<:col :let={{_id, completed_task}} label="Id"><%= completed_task.id %></:col>
|
||||
|
||||
<:col :let={{_id, completed_task}} label="Id">{completed_task.id}</:col>
|
||||
|
||||
<:action :let={{_id, completed_task}}>
|
||||
<div class="sr-only">
|
||||
<.link navigate={~p"/completed_tasks/#{completed_task}"}>Show</.link>
|
||||
</div>
|
||||
|
||||
</:action>
|
||||
|
||||
</.table>
|
||||
|
||||
|
||||
<.modal :if={@live_action == :new} id="completed_task-modal" show on_cancel={JS.patch(~p"/completed_tasks")}>
|
||||
<.live_component
|
||||
module={PutzplanWeb.CompletedTaskLive.FormComponent}
|
||||
current_user={@current_user}
|
||||
id={:new}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
completed_task={@completed_task}
|
||||
patch={~p"/completed_tasks"}
|
||||
/>
|
||||
</.modal>
|
||||
|
||||
<.modal
|
||||
:if={@live_action == :new}
|
||||
id="completed_task-modal"
|
||||
show
|
||||
on_cancel={JS.patch(~p"/completed_tasks")}
|
||||
>
|
||||
<.live_component
|
||||
module={PutzplanWeb.CompletedTaskLive.FormComponent}
|
||||
current_user={@current_user}
|
||||
id={:new}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
completed_task={@completed_task}
|
||||
patch={~p"/completed_tasks"}
|
||||
/>
|
||||
</.modal>
|
||||
"""
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -5,20 +5,15 @@ defmodule PutzplanWeb.CompletedTaskLive.Show do
|
|||
def render(assigns) do
|
||||
~H"""
|
||||
<.header>
|
||||
Completed task <%= @completed_task.id %>
|
||||
<:subtitle>This is a completed_task record from your database.</:subtitle>
|
||||
|
||||
Completed task {@completed_task.id}
|
||||
<:subtitle>This is a completed_task record from your database.</:subtitle>
|
||||
</.header>
|
||||
|
||||
<.list>
|
||||
|
||||
<:item title="Id"><%= @completed_task.id %></:item>
|
||||
|
||||
<:item title="Id">{@completed_task.id}</:item>
|
||||
</.list>
|
||||
|
||||
<.back navigate={~p"/completed_tasks"}>Back to completed_tasks</.back>
|
||||
|
||||
|
||||
"""
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue