diff --git a/lib/chore_tracker_web/components/core_components.ex b/lib/chore_tracker_web/components/core_components.ex index 6d3bc0b..3bce58d 100644 --- a/lib/chore_tracker_web/components/core_components.ex +++ b/lib/chore_tracker_web/components/core_components.ex @@ -431,7 +431,7 @@ defmodule ChoreTrackerWeb.CoreComponents do ~H"""
-

+

<%= render_slot(@inner_block) %>

diff --git a/lib/chore_tracker_web/live/chore_live/form_component.ex b/lib/chore_tracker_web/live/chore_live/form_component.ex index bb5c242..df24d99 100644 --- a/lib/chore_tracker_web/live/chore_live/form_component.ex +++ b/lib/chore_tracker_web/live/chore_live/form_component.ex @@ -10,7 +10,6 @@ defmodule ChoreTrackerWeb.ChoreLive.FormComponent do

<.header> <%= @title %> - <:subtitle>Use this form to manage chore records in your database. <.simple_form diff --git a/lib/chore_tracker_web/live/chore_live/index.html.heex b/lib/chore_tracker_web/live/chore_live/index.html.heex index 7014b26..3577970 100644 --- a/lib/chore_tracker_web/live/chore_live/index.html.heex +++ b/lib/chore_tracker_web/live/chore_live/index.html.heex @@ -1,5 +1,5 @@
-

+

Manage chores

<.link patch={~p"/manage/chores/new"}> diff --git a/lib/chore_tracker_web/live/chore_live/show.html.heex b/lib/chore_tracker_web/live/chore_live/show.html.heex index d094d1c..13ab9e1 100644 --- a/lib/chore_tracker_web/live/chore_live/show.html.heex +++ b/lib/chore_tracker_web/live/chore_live/show.html.heex @@ -1,9 +1,9 @@ -
+
<%= @chore.emoji %> -

+

<%= @chore.name %>

@@ -50,19 +50,23 @@

Logs

- <.table id="chore_logs" rows={@chore.logs}> - <:col :let={chore_log} label="User"><%= chore_log.user.display_name %> - <:col :let={chore_log} label="Execution date"> - - - <%= chore_log.inserted_at |> Calendar.strftime("%Y-%m-%d") %> + <%= if @chore.logs == [] do %> +

There are no logs

+ <% else %> + <.table id="chore_logs" rows={@chore.logs}> + <:col :let={chore_log} label="User"><%= chore_log.user.display_name %> + <:col :let={chore_log} label="Execution date"> + + + <%= chore_log.inserted_at |> Calendar.strftime("%Y-%m-%d") %> + + + <%= chore_log.inserted_at |> Calendar.strftime("%H:%M") %> + - - <%= chore_log.inserted_at |> Calendar.strftime("%H:%M") %> - -
- - + + + <% end %>
diff --git a/lib/chore_tracker_web/live/overview_live.ex b/lib/chore_tracker_web/live/overview_live.ex index ac8f15b..e165b14 100644 --- a/lib/chore_tracker_web/live/overview_live.ex +++ b/lib/chore_tracker_web/live/overview_live.ex @@ -5,7 +5,7 @@ defmodule ChoreTrackerWeb.OverviewLive do def render(assigns) do ~H""" -

+

Chores overview