fix ammo type displays

This commit is contained in:
2022-02-18 23:25:44 -05:00
parent bf27511caa
commit 91ff0c14e4
10 changed files with 120 additions and 108 deletions

View File

@ -20,8 +20,8 @@
container_name: @container.name
)
] do %>
<%= tag.name %>
<i class="fa-fw fa-sm fas fa-trash"></i>
<%= tag.name %>
<i class="fa-fw fa-sm fas fa-trash"></i>
<% end %>
<% end %>
@ -34,7 +34,7 @@
</div>
<%= unless tag_options(@tags, @container) |> Enum.empty?() do %>
<hr class="hr">
<hr class="hr" />
<.form
let={f}
@ -44,7 +44,9 @@
phx-target={@myself}
phx-submit="save"
>
<%= select(f, :tag_id, tag_options(@tags, @container), class: "text-center col-span-2 input input-primary") %>
<%= select(f, :tag_id, tag_options(@tags, @container),
class: "text-center col-span-2 input input-primary"
) %>
<%= error_tag(f, :tag_id, "col-span-3 text-center") %>
<%= submit(dgettext("actions", "Add"),

View File

@ -31,7 +31,6 @@
<% end %>
</div>
</:tag_actions>
<%= live_patch to: Routes.container_index_path(Endpoint, :edit, container),
class: "text-primary-600 link",
data: [qa: "edit-#{container.id}"] do %>

View File

@ -86,7 +86,8 @@ defmodule CanneryWeb.ContainerLive.Show do
@spec render_container(Socket.t(), Container.id(), User.t()) :: Socket.t()
defp render_container(%{assigns: %{live_action: live_action}} = socket, id, current_user) do
%{name: container_name} = container =
%{name: container_name} =
container =
Containers.get_container!(id, current_user)
|> Repo.preload([:ammo_groups, :tags], force: true)