Add format to online store templates

This commit is contained in:
Claudio Ortolina
2025-07-15 10:08:40 +01:00
parent 7d23e7a597
commit f329d66fb1
4 changed files with 21 additions and 1 deletions
@@ -59,6 +59,10 @@ defmodule MusicLibraryWeb.OnlineStoreTemplateLive.FormComponent do
<code class="bg-gray-200 dark:bg-gray-700 px-1 rounded">{"{title}"}</code>
- {gettext("Record title")}
</p>
<p>
<code class="bg-gray-200 dark:bg-gray-700 px-1 rounded">{"{format}"}</code>
- {gettext("Record format")}
</p>
</div>
</div>
@@ -74,7 +78,11 @@ defmodule MusicLibraryWeb.OnlineStoreTemplateLive.FormComponent do
@impl true
def update(%{template: template} = assigns, socket) do
test_record = %Record{title: "Dark Side of the Moon", artists: [%Artist{name: "Pink Floyd"}]}
test_record = %Record{
title: "Dark Side of the Moon",
artists: [%Artist{name: "Pink Floyd"}],
format: :vinyl
}
{:ok,
socket