diff --git a/lib/music_library_web/live/record_live/form_component.ex b/lib/music_library_web/live/record_live/form_component.ex index 22775d31..a5cb95d6 100644 --- a/lib/music_library_web/live/record_live/form_component.ex +++ b/lib/music_library_web/live/record_live/form_component.ex @@ -43,7 +43,12 @@ defmodule MusicLibraryWeb.RecordLive.FormComponent do /> <.input field={@form[:release]} type="text" label={gettext("Release")} /> - <.input field={@form[:purchased_at]} type="datetime-local" label={gettext("Purchased at")} /> + <.input + :if={@show_purchased_at} + field={@form[:purchased_at]} + type="datetime-local" + label={gettext("Purchased at")} + />
<.label for={@uploads.cover_data.ref}> <%= gettext("Cover art") %> diff --git a/lib/music_library_web/live/record_live/index.html.heex b/lib/music_library_web/live/record_live/index.html.heex index c7d65a1a..b6f168eb 100644 --- a/lib/music_library_web/live/record_live/index.html.heex +++ b/lib/music_library_web/live/record_live/index.html.heex @@ -167,6 +167,7 @@ id={@record.id} title={@page_title} action={@live_action} + show_purchased_at={true} record={@record} patch={~p"/records"} /> diff --git a/lib/music_library_web/live/record_live/show.html.heex b/lib/music_library_web/live/record_live/show.html.heex index 4092ec6d..45c3600a 100644 --- a/lib/music_library_web/live/record_live/show.html.heex +++ b/lib/music_library_web/live/record_live/show.html.heex @@ -83,6 +83,7 @@ id={@record.id} title={@page_title} action={@live_action} + show_purchased_at={true} record={@record} patch={~p"/records/#{@record}"} /> diff --git a/lib/music_library_web/live/wishlist_live/index.html.heex b/lib/music_library_web/live/wishlist_live/index.html.heex index c499defc..7ca5463d 100644 --- a/lib/music_library_web/live/wishlist_live/index.html.heex +++ b/lib/music_library_web/live/wishlist_live/index.html.heex @@ -167,6 +167,7 @@ id={@record.id} title={@page_title} action={@live_action} + show_purchased_at={false} record={@record} patch={~p"/wishlist"} /> diff --git a/lib/music_library_web/live/wishlist_live/show.html.heex b/lib/music_library_web/live/wishlist_live/show.html.heex index 2310a9aa..bb964135 100644 --- a/lib/music_library_web/live/wishlist_live/show.html.heex +++ b/lib/music_library_web/live/wishlist_live/show.html.heex @@ -82,6 +82,7 @@ id={@record.id} title={@page_title} action={@live_action} + show_purchased_at={false} record={@record} patch={~p"/wishlist/#{@record}"} />