fix credo

This commit is contained in:
shibao 2022-03-04 22:27:09 -05:00
parent af4af84515
commit 0309e9d714
15 changed files with 265 additions and 255 deletions

View File

@ -1,4 +1,5 @@
# v0.4.0
- Make tables sortable
- Add link to changelog from version number
- Fix some elements flashing with black background
- Fix bug with moving ammo group to new container

View File

@ -106,33 +106,30 @@ defmodule CanneryWeb.Components.MoveAmmoGroupComponent do
defp get_rows_for_containers(containers, assigns, columns) do
containers
|> Enum.map(fn container ->
assigns = assigns |> Map.put(:container, container)
columns
|> Enum.into(%{}, fn %{key: key} ->
value =
case key do
"actions" ->
~H"""
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
<button
type="button"
class="btn btn-primary"
phx-click="move"
phx-target={@myself}
phx-value-container_id={container.id}
>
<%= dgettext("actions", "Select") %>
</button>
</div>
"""
key ->
container |> Map.get(key |> String.to_existing_atom())
end
{key, value}
end)
|> Enum.into(%{}, fn %{key: key} -> {key, get_row_value_by_key(key, container, assigns)} end)
end)
end
@spec get_row_value_by_key(String.t(), Container.t(), map()) :: any()
defp get_row_value_by_key("actions", container, assigns) do
assigns = assigns |> Map.put(:container, container)
~H"""
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
<button
type="button"
class="btn btn-primary"
phx-click="move"
phx-target={@myself}
phx-value-container_id={container.id}
>
<%= dgettext("actions", "Select") %>
</button>
</div>
"""
end
defp get_row_value_by_key(key, container, _assigns),
do: container |> Map.get(key |> String.to_existing_atom())
end

View File

@ -5,15 +5,19 @@
<%= for %{key: key, label: label} = column <- @columns do %>
<%= if column |> Map.get(:sortable, true) do %>
<th class={"p-2 #{column[:class]}"}>
<span class="cursor-pointer"
<span
class="cursor-pointer"
phx-click="sort_by"
phx-value-sort-key={key}
phx-target={@myself}>
phx-target={@myself}
>
<span class="underline"><%= label %></span>
<%= if @last_sort_key == key do %>
<%= case @sort_mode do %>
<% :asc -> %> <i class="fas fa-sm fa-chevron-down"></i>
<% :desc -> %> <i class="fas fa-sm fa-chevron-up"></i>
<% :asc -> %>
<i class="fas fa-sm fa-chevron-down"></i>
<% :desc -> %>
<i class="fas fa-sm fa-chevron-up"></i>
<% end %>
<% else %>
<i class="fas fa-sm fa-chevron-up opacity-0"></i>
@ -34,8 +38,10 @@
<%= for %{key: key} = value <- @columns do %>
<td class={"p-2 #{value[:class]}"}>
<%= case values |> Map.get(key) do %>
<%= {_custom_sort_value, value} -> %> <%= value %>
<% value -> %> <%= value %>
<% {_custom_sort_value, value} -> %>
<%= value %>
<% value -> %>
<%= value %>
<% end %>
</td>
<% end %>

View File

@ -88,98 +88,99 @@ defmodule CanneryWeb.AmmoGroupLive.Index do
rows =
ammo_groups
|> Enum.map(fn ammo_group ->
assigns = %{ammo_group: ammo_group}
columns
|> Enum.into(%{}, fn %{key: key} ->
value =
case key do
"ammo_type" ->
{ammo_group.ammo_type.name,
live_patch(ammo_group.ammo_type.name,
to: Routes.ammo_type_show_path(Endpoint, :show, ammo_group.ammo_type),
class: "link"
)}
"price_paid" ->
if ammo_group.price_paid do
gettext("$%{amount}",
amount: ammo_group.price_paid |> :erlang.float_to_binary(decimals: 2)
)
else
{"a", nil}
end
"remaining" ->
"#{ammo_group |> Ammo.get_percentage_remaining()}%"
"range" ->
{ammo_group.staged,
~H"""
<button
type="button"
class="btn btn-primary"
phx-click="toggle_staged"
phx-value-ammo_group_id={ammo_group.id}
>
<%= if ammo_group.staged, do: gettext("Unstage"), else: gettext("Stage") %>
</button>
<%= live_patch(dgettext("actions", "Record shots"),
to: Routes.ammo_group_index_path(Endpoint, :add_shot_group, ammo_group),
class: "btn btn-primary"
) %>
"""}
"container" ->
if ammo_group.container do
{ammo_group.container.name,
live_patch(ammo_group.container.name,
to: Routes.ammo_group_index_path(Endpoint, :move, ammo_group),
class: "btn btn-primary"
)}
else
{nil, nil}
end
"actions" ->
~H"""
<div class="py-2 px-4 h-full space-x-4 flex justify-center items-center">
<%= live_redirect to: Routes.ammo_group_show_path(Endpoint, :show, ammo_group),
class: "text-primary-600 link",
data: [qa: "view-#{ammo_group.id}"] do %>
<i class="fa-fw fa-lg fas fa-eye"></i>
<% end %>
<%= live_patch to: Routes.ammo_group_index_path(Endpoint, :edit, ammo_group),
class: "text-primary-600 link",
data: [qa: "edit-#{ammo_group.id}"] do %>
<i class="fa-fw fa-lg fas fa-edit"></i>
<% end %>
<%= link to: "#",
class: "text-primary-600 link",
phx_click: "delete",
phx_value_id: ammo_group.id,
data: [
confirm: dgettext("prompts", "Are you sure you want to delete this ammo?"),
qa: "delete-#{ammo_group.id}"
] do %>
<i class="fa-fw fa-lg fas fa-trash"></i>
<% end %>
</div>
"""
_ ->
ammo_group |> Map.get(key |> String.to_existing_atom())
end
{key, value}
end)
end)
|> Enum.map(fn ammo_group -> ammo_group |> get_row_data_for_ammo_group(columns) end)
socket
|> assign(ammo_groups: ammo_groups, containers: containers, columns: columns, rows: rows)
end
@spec get_row_data_for_ammo_group(AmmoGroup.t(), [map()]) :: [map()]
defp get_row_data_for_ammo_group(ammo_group, columns) do
ammo_group = ammo_group |> Repo.preload([:ammo_type, :container])
columns
|> Enum.into(%{}, fn %{key: key} -> {key, get_value_for_key(key, ammo_group)} end)
end
@spec get_value_for_key(String.t(), AmmoGroup.t()) :: any()
defp get_value_for_key("ammo_type", %{ammo_type: ammo_type}) do
{ammo_type.name,
live_patch(ammo_type.name,
to: Routes.ammo_type_show_path(Endpoint, :show, ammo_type),
class: "link"
)}
end
defp get_value_for_key("price_paid", %{price_paid: nil}), do: {"a", nil}
defp get_value_for_key("price_paid", %{price_paid: price_paid}),
do: gettext("$%{amount}", amount: price_paid |> :erlang.float_to_binary(decimals: 2))
defp get_value_for_key("range", %{staged: staged} = ammo_group) do
assigns = %{ammo_group: ammo_group}
{staged,
~H"""
<button
type="button"
class="btn btn-primary"
phx-click="toggle_staged"
phx-value-ammo_group_id={ammo_group.id}
>
<%= if ammo_group.staged, do: gettext("Unstage"), else: gettext("Stage") %>
</button>
<%= live_patch(dgettext("actions", "Record shots"),
to: Routes.ammo_group_index_path(Endpoint, :add_shot_group, ammo_group),
class: "btn btn-primary"
) %>
"""}
end
defp get_value_for_key("remaining", ammo_group),
do: "#{ammo_group |> Ammo.get_percentage_remaining()}%"
defp get_value_for_key("actions", ammo_group) do
assigns = %{ammo_group: ammo_group}
~H"""
<div class="py-2 px-4 h-full space-x-4 flex justify-center items-center">
<%= live_redirect to: Routes.ammo_group_show_path(Endpoint, :show, ammo_group),
class: "text-primary-600 link",
data: [qa: "view-#{ammo_group.id}"] do %>
<i class="fa-fw fa-lg fas fa-eye"></i>
<% end %>
<%= live_patch to: Routes.ammo_group_index_path(Endpoint, :edit, ammo_group),
class: "text-primary-600 link",
data: [qa: "edit-#{ammo_group.id}"] do %>
<i class="fa-fw fa-lg fas fa-edit"></i>
<% end %>
<%= link to: "#",
class: "text-primary-600 link",
phx_click: "delete",
phx_value_id: ammo_group.id,
data: [
confirm: dgettext("prompts", "Are you sure you want to delete this ammo?"),
qa: "delete-#{ammo_group.id}"
] do %>
<i class="fa-fw fa-lg fas fa-trash"></i>
<% end %>
</div>
"""
end
defp get_value_for_key("container", %{container: nil}), do: {nil, nil}
defp get_value_for_key("container", %{container: %{name: container_name}} = ammo_group) do
{container_name,
live_patch(container_name,
to: Routes.ammo_group_index_path(Endpoint, :move, ammo_group),
class: "btn btn-primary"
)}
end
defp get_value_for_key(key, ammo_group),
do: ammo_group |> Map.get(key |> String.to_existing_atom())
end

View File

@ -47,7 +47,7 @@
<.live_component
module={CanneryWeb.Components.TableComponent}
id="ammo_groups_index"
id="ammo_groups_index_table"
action={@live_action}
columns={@columns}
rows={@rows}
@ -93,5 +93,6 @@
current_user={@current_user}
/>
</.modal>
<% true -> %> <%= nil %>
<% true -> %>
<%= nil %>
<% end %>

View File

@ -113,7 +113,7 @@
<.live_component
module={CanneryWeb.Components.TableComponent}
id="shot_groups_table"
id="ammo_group_shot_groups_table"
columns={@columns}
rows={@rows}
/>

View File

@ -21,7 +21,7 @@
<.live_component
module={CanneryWeb.Components.TableComponent}
id="ammo_types_index"
id="ammo_types_index_table"
action={@live_action}
columns={@columns}
rows={@rows}

View File

@ -88,54 +88,58 @@ defmodule CanneryWeb.RangeLive.Index do
rows =
shot_groups
|> Enum.map(fn %{date: date} = shot_group ->
assigns = %{shot_group: shot_group}
columns
|> Enum.into(%{}, fn %{key: key} ->
value =
case key do
"name" ->
{shot_group.ammo_group.ammo_type.name,
live_patch(shot_group.ammo_group.ammo_type.name,
to: Routes.ammo_group_show_path(Endpoint, :show, shot_group.ammo_group),
class: "link"
)}
"date" ->
date |> display_date()
"actions" ->
~H"""
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
<%= live_patch to: Routes.range_index_path(Endpoint, :edit, shot_group),
class: "text-primary-600 link",
data: [qa: "edit-#{shot_group.id}"] do %>
<i class="fa-fw fa-lg fas fa-edit"></i>
<% end %>
<%= link to: "#",
class: "text-primary-600 link",
phx_click: "delete",
phx_value_id: shot_group.id,
data: [
confirm: dgettext("prompts", "Are you sure you want to delete this shot record?"),
qa: "delete-#{shot_group.id}"
] do %>
<i class="fa-fw fa-lg fas fa-trash"></i>
<% end %>
</div>
"""
value ->
shot_group |> Map.get(key |> String.to_existing_atom())
end
{key, value}
end)
end)
|> Enum.map(fn shot_group -> shot_group |> get_row_data_for_shot_group(columns) end)
socket
|> assign(ammo_groups: ammo_groups, columns: columns, rows: rows, shot_groups: shot_groups)
end
@spec get_row_data_for_shot_group(ShotGroup.t(), [map()]) :: [map()]
defp get_row_data_for_shot_group(%{date: date} = shot_group, columns) do
shot_group = shot_group |> Repo.preload(ammo_group: :ammo_type)
assigns = %{shot_group: shot_group}
columns
|> Enum.into(%{}, fn %{key: key} ->
value =
case key do
"name" ->
{shot_group.ammo_group.ammo_type.name,
live_patch(shot_group.ammo_group.ammo_type.name,
to: Routes.ammo_group_show_path(Endpoint, :show, shot_group.ammo_group),
class: "link"
)}
"date" ->
date |> display_date()
"actions" ->
~H"""
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
<%= live_patch to: Routes.range_index_path(Endpoint, :edit, shot_group),
class: "text-primary-600 link",
data: [qa: "edit-#{shot_group.id}"] do %>
<i class="fa-fw fa-lg fas fa-edit"></i>
<% end %>
<%= link to: "#",
class: "text-primary-600 link",
phx_click: "delete",
phx_value_id: shot_group.id,
data: [
confirm: dgettext("prompts", "Are you sure you want to delete this shot record?"),
qa: "delete-#{shot_group.id}"
] do %>
<i class="fa-fw fa-lg fas fa-trash"></i>
<% end %>
</div>
"""
key ->
shot_group |> Map.get(key |> String.to_existing_atom())
end
{key, value}
end)
end
end

View File

@ -55,7 +55,7 @@
<.live_component
module={CanneryWeb.Components.TableComponent}
id="shot_groups_table"
id="shot_groups_index_table"
columns={@columns}
rows={@rows}
/>

View File

@ -160,7 +160,7 @@ msgid "Why not get some ready to shoot?"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/index.html.heex:111
#: lib/cannery_web/live/ammo_group_live/index.ex:133
#: lib/cannery_web/live/ammo_group_live/show.html.heex:86
#: lib/cannery_web/live/range_live/index.html.heex:36
msgid "Record shots"
@ -172,7 +172,7 @@ msgid "Ammo Details"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/move_ammo_group_component.html.heex:12
#: lib/cannery_web/components/move_ammo_group_component.ex:89
msgid "Add another container!"
msgstr ""
@ -182,7 +182,7 @@ msgid "Move containers"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/move_ammo_group_component.html.heex:60
#: lib/cannery_web/components/move_ammo_group_component.ex:127
msgid "Select"
msgstr ""

View File

@ -33,13 +33,13 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:52
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
#: lib/cannery_web/live/range_live/index.html.heex:61
#: lib/cannery_web/live/range_live/index.ex:82
msgid "Ammo"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:21
#: lib/cannery_web/live/ammo_group_live/index.html.heex:53
#: lib/cannery_web/live/ammo_group_live/index.ex:80
msgid "Ammo type"
msgstr ""
@ -55,7 +55,7 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:140
#: lib/cannery_web/live/ammo_type_live/index.ex:67
#: lib/cannery_web/live/ammo_type_live/index.ex:71
#: lib/cannery_web/live/ammo_type_live/show.html.heex:55
msgid "Blank"
msgstr ""
@ -101,9 +101,9 @@ msgid "Case material"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/move_ammo_group_component.html.heex:22
#: lib/cannery_web/components/move_ammo_group_component.ex:67
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:48
#: lib/cannery_web/live/ammo_group_live/index.html.heex:68
#: lib/cannery_web/live/ammo_group_live/index.ex:85
msgid "Container"
msgstr ""
@ -116,14 +116,14 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
#: lib/cannery_web/live/ammo_type_live/index.ex:68
#: lib/cannery_web/live/ammo_type_live/index.ex:72
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
msgid "Corrosive"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:27
#: lib/cannery_web/live/ammo_group_live/index.html.heex:56
#: lib/cannery_web/live/ammo_group_live/index.ex:81
msgid "Count"
msgstr ""
@ -194,14 +194,14 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:103
#: lib/cannery_web/live/ammo_type_live/index.ex:61
#: lib/cannery_web/live/ammo_type_live/index.ex:65
#: lib/cannery_web/live/ammo_type_live/show.html.heex:49
msgid "Grains"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:136
#: lib/cannery_web/live/ammo_type_live/index.ex:66
#: lib/cannery_web/live/ammo_type_live/index.ex:70
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
msgid "Incendiary"
msgstr ""
@ -234,7 +234,7 @@ msgid "Keep me logged in for 60 days"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/move_ammo_group_component.html.heex:30
#: lib/cannery_web/components/move_ammo_group_component.ex:69
#: lib/cannery_web/live/container_live/form_component.html.heex:42
msgid "Location"
msgstr ""
@ -257,7 +257,7 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:148
#: lib/cannery_web/live/ammo_type_live/index.ex:69
#: lib/cannery_web/live/ammo_type_live/index.ex:73
#: lib/cannery_web/live/ammo_type_live/show.html.heex:57
msgid "Manufacturer"
msgstr ""
@ -340,9 +340,9 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/add_shot_group_component.html.heex:30
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
#: lib/cannery_web/live/ammo_group_live/show.html.heex:122
#: lib/cannery_web/live/ammo_group_live/show.ex:90
#: lib/cannery_web/live/range_live/form_component.html.heex:29
#: lib/cannery_web/live/range_live/index.html.heex:67
#: lib/cannery_web/live/range_live/index.ex:84
msgid "Notes"
msgstr ""
@ -359,14 +359,14 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:111
#: lib/cannery_web/live/ammo_type_live/index.ex:62
#: lib/cannery_web/live/ammo_type_live/index.ex:66
#: lib/cannery_web/live/ammo_type_live/show.html.heex:50
msgid "Pressure"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:34
#: lib/cannery_web/live/ammo_group_live/index.html.heex:59
#: lib/cannery_web/live/ammo_group_live/index.ex:82
msgid "Price paid"
msgstr ""
@ -377,7 +377,7 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:118
#: lib/cannery_web/live/ammo_type_live/index.ex:63
#: lib/cannery_web/live/ammo_type_live/index.ex:67
#: lib/cannery_web/live/ammo_type_live/show.html.heex:51
msgid "Primer type"
msgstr ""
@ -462,13 +462,13 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:132
#: lib/cannery_web/live/ammo_type_live/index.ex:65
#: lib/cannery_web/live/ammo_type_live/index.ex:69
#: lib/cannery_web/live/ammo_type_live/show.html.heex:53
msgid "Tracer"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/move_ammo_group_component.html.heex:26
#: lib/cannery_web/components/move_ammo_group_component.ex:68
#: lib/cannery_web/live/container_live/form_component.html.heex:35
msgid "Type"
msgstr ""
@ -511,7 +511,7 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:64
#: lib/cannery_web/live/ammo_group_live/index.html.heex:65
#: lib/cannery_web/live/ammo_group_live/index.ex:84
msgid "Range"
msgstr ""
@ -521,8 +521,8 @@ msgid "Range day"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:125
#: lib/cannery_web/live/range_live/index.html.heex:70
#: lib/cannery_web/live/ammo_group_live/show.ex:91
#: lib/cannery_web/live/range_live/index.ex:85
msgid "Date"
msgstr ""
@ -592,8 +592,8 @@ msgid "Rounds left"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:119
#: lib/cannery_web/live/range_live/index.html.heex:64
#: lib/cannery_web/live/ammo_group_live/show.ex:89
#: lib/cannery_web/live/range_live/index.ex:83
msgid "Rounds shot"
msgstr ""
@ -609,12 +609,12 @@ msgid "Move Ammo group"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/move_ammo_group_component.html.heex:3
#: lib/cannery_web/components/move_ammo_group_component.ex:80
msgid "Move ammo"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/move_ammo_group_component.html.heex:8
#: lib/cannery_web/components/move_ammo_group_component.ex:85
msgid "No other containers"
msgstr ""
@ -625,7 +625,7 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/ammo_group_card.ex:43
#: lib/cannery_web/live/ammo_group_live/index.html.heex:90
#: lib/cannery_web/live/ammo_group_live/index.ex:117
#: lib/cannery_web/live/ammo_group_live/show.html.heex:32
#: lib/cannery_web/live/ammo_group_live/show.html.heex:39
#: lib/cannery_web/live/ammo_type_live/show.html.heex:98
@ -653,7 +653,7 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:93
#: lib/cannery_web/live/ammo_type_live/index.ex:60
#: lib/cannery_web/live/ammo_type_live/index.ex:61
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
msgid "Powder grains per charge"
msgstr ""
@ -667,7 +667,7 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:152
#: lib/cannery_web/live/ammo_type_live/index.ex:70
#: lib/cannery_web/live/ammo_type_live/index.ex:74
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
msgid "UPC"
msgstr ""
@ -689,18 +689,18 @@ msgid "New password"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/index.html.heex:108
#: lib/cannery_web/live/ammo_group_live/index.ex:130
msgid "Stage"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/index.html.heex:108
#: lib/cannery_web/live/ammo_group_live/index.ex:130
msgid "Unstage"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:125
#: lib/cannery_web/live/ammo_type_live/index.ex:64
#: lib/cannery_web/live/ammo_type_live/index.ex:68
#: lib/cannery_web/live/ammo_type_live/show.html.heex:52
msgid "Firing type"
msgstr ""
@ -743,7 +743,7 @@ msgid "No cost information"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/index.html.heex:62
#: lib/cannery_web/live/ammo_group_live/index.ex:83
msgid "% left"
msgstr ""
@ -778,7 +778,7 @@ msgid "Current # of rounds:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/index.html.heex:32
#: lib/cannery_web/live/ammo_type_live/index.ex:86
msgid "Total # of rounds"
msgstr ""

View File

@ -161,7 +161,7 @@ msgid "Why not get some ready to shoot?"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/index.html.heex:111
#: lib/cannery_web/live/ammo_group_live/index.ex:133
#: lib/cannery_web/live/ammo_group_live/show.html.heex:86
#: lib/cannery_web/live/range_live/index.html.heex:36
msgid "Record shots"
@ -173,7 +173,7 @@ msgid "Ammo Details"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/move_ammo_group_component.html.heex:12
#: lib/cannery_web/components/move_ammo_group_component.ex:89
msgid "Add another container!"
msgstr ""
@ -183,7 +183,7 @@ msgid "Move containers"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/move_ammo_group_component.html.heex:60
#: lib/cannery_web/components/move_ammo_group_component.ex:127
msgid "Select"
msgstr ""

View File

@ -34,13 +34,13 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:52
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
#: lib/cannery_web/live/range_live/index.html.heex:61
#: lib/cannery_web/live/range_live/index.ex:82
msgid "Ammo"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:21
#: lib/cannery_web/live/ammo_group_live/index.html.heex:53
#: lib/cannery_web/live/ammo_group_live/index.ex:80
msgid "Ammo type"
msgstr ""
@ -56,7 +56,7 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:140
#: lib/cannery_web/live/ammo_type_live/index.ex:67
#: lib/cannery_web/live/ammo_type_live/index.ex:71
#: lib/cannery_web/live/ammo_type_live/show.html.heex:55
msgid "Blank"
msgstr ""
@ -102,9 +102,9 @@ msgid "Case material"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/move_ammo_group_component.html.heex:22
#: lib/cannery_web/components/move_ammo_group_component.ex:67
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:48
#: lib/cannery_web/live/ammo_group_live/index.html.heex:68
#: lib/cannery_web/live/ammo_group_live/index.ex:85
msgid "Container"
msgstr ""
@ -117,14 +117,14 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
#: lib/cannery_web/live/ammo_type_live/index.ex:68
#: lib/cannery_web/live/ammo_type_live/index.ex:72
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
msgid "Corrosive"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:27
#: lib/cannery_web/live/ammo_group_live/index.html.heex:56
#: lib/cannery_web/live/ammo_group_live/index.ex:81
msgid "Count"
msgstr ""
@ -195,14 +195,14 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:103
#: lib/cannery_web/live/ammo_type_live/index.ex:61
#: lib/cannery_web/live/ammo_type_live/index.ex:65
#: lib/cannery_web/live/ammo_type_live/show.html.heex:49
msgid "Grains"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:136
#: lib/cannery_web/live/ammo_type_live/index.ex:66
#: lib/cannery_web/live/ammo_type_live/index.ex:70
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
msgid "Incendiary"
msgstr ""
@ -235,7 +235,7 @@ msgid "Keep me logged in for 60 days"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/move_ammo_group_component.html.heex:30
#: lib/cannery_web/components/move_ammo_group_component.ex:69
#: lib/cannery_web/live/container_live/form_component.html.heex:42
msgid "Location"
msgstr ""
@ -258,7 +258,7 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:148
#: lib/cannery_web/live/ammo_type_live/index.ex:69
#: lib/cannery_web/live/ammo_type_live/index.ex:73
#: lib/cannery_web/live/ammo_type_live/show.html.heex:57
msgid "Manufacturer"
msgstr ""
@ -341,9 +341,9 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/add_shot_group_component.html.heex:30
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
#: lib/cannery_web/live/ammo_group_live/show.html.heex:122
#: lib/cannery_web/live/ammo_group_live/show.ex:90
#: lib/cannery_web/live/range_live/form_component.html.heex:29
#: lib/cannery_web/live/range_live/index.html.heex:67
#: lib/cannery_web/live/range_live/index.ex:84
msgid "Notes"
msgstr ""
@ -360,14 +360,14 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:111
#: lib/cannery_web/live/ammo_type_live/index.ex:62
#: lib/cannery_web/live/ammo_type_live/index.ex:66
#: lib/cannery_web/live/ammo_type_live/show.html.heex:50
msgid "Pressure"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:34
#: lib/cannery_web/live/ammo_group_live/index.html.heex:59
#: lib/cannery_web/live/ammo_group_live/index.ex:82
msgid "Price paid"
msgstr ""
@ -378,7 +378,7 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:118
#: lib/cannery_web/live/ammo_type_live/index.ex:63
#: lib/cannery_web/live/ammo_type_live/index.ex:67
#: lib/cannery_web/live/ammo_type_live/show.html.heex:51
msgid "Primer type"
msgstr ""
@ -463,13 +463,13 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:132
#: lib/cannery_web/live/ammo_type_live/index.ex:65
#: lib/cannery_web/live/ammo_type_live/index.ex:69
#: lib/cannery_web/live/ammo_type_live/show.html.heex:53
msgid "Tracer"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/move_ammo_group_component.html.heex:26
#: lib/cannery_web/components/move_ammo_group_component.ex:68
#: lib/cannery_web/live/container_live/form_component.html.heex:35
msgid "Type"
msgstr ""
@ -512,7 +512,7 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:64
#: lib/cannery_web/live/ammo_group_live/index.html.heex:65
#: lib/cannery_web/live/ammo_group_live/index.ex:84
msgid "Range"
msgstr ""
@ -522,8 +522,8 @@ msgid "Range day"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:125
#: lib/cannery_web/live/range_live/index.html.heex:70
#: lib/cannery_web/live/ammo_group_live/show.ex:91
#: lib/cannery_web/live/range_live/index.ex:85
msgid "Date"
msgstr ""
@ -593,8 +593,8 @@ msgid "Rounds left"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:119
#: lib/cannery_web/live/range_live/index.html.heex:64
#: lib/cannery_web/live/ammo_group_live/show.ex:89
#: lib/cannery_web/live/range_live/index.ex:83
msgid "Rounds shot"
msgstr ""
@ -610,12 +610,12 @@ msgid "Move Ammo group"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/move_ammo_group_component.html.heex:3
#: lib/cannery_web/components/move_ammo_group_component.ex:80
msgid "Move ammo"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/move_ammo_group_component.html.heex:8
#: lib/cannery_web/components/move_ammo_group_component.ex:85
msgid "No other containers"
msgstr ""
@ -626,7 +626,7 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/ammo_group_card.ex:43
#: lib/cannery_web/live/ammo_group_live/index.html.heex:90
#: lib/cannery_web/live/ammo_group_live/index.ex:117
#: lib/cannery_web/live/ammo_group_live/show.html.heex:32
#: lib/cannery_web/live/ammo_group_live/show.html.heex:39
#: lib/cannery_web/live/ammo_type_live/show.html.heex:98
@ -654,7 +654,7 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:93
#: lib/cannery_web/live/ammo_type_live/index.ex:60
#: lib/cannery_web/live/ammo_type_live/index.ex:61
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
msgid "Powder grains per charge"
msgstr ""
@ -668,7 +668,7 @@ msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:152
#: lib/cannery_web/live/ammo_type_live/index.ex:70
#: lib/cannery_web/live/ammo_type_live/index.ex:74
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
msgid "UPC"
msgstr ""
@ -690,18 +690,18 @@ msgid "New password"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/index.html.heex:108
#: lib/cannery_web/live/ammo_group_live/index.ex:130
msgid "Stage"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/index.html.heex:108
#: lib/cannery_web/live/ammo_group_live/index.ex:130
msgid "Unstage"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:125
#: lib/cannery_web/live/ammo_type_live/index.ex:64
#: lib/cannery_web/live/ammo_type_live/index.ex:68
#: lib/cannery_web/live/ammo_type_live/show.html.heex:52
msgid "Firing type"
msgstr ""
@ -744,7 +744,7 @@ msgid "No cost information"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/index.html.heex:62
#: lib/cannery_web/live/ammo_group_live/index.ex:83
msgid "% left"
msgstr ""
@ -779,7 +779,7 @@ msgid "Current # of rounds:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/index.html.heex:32
#: lib/cannery_web/live/ammo_type_live/index.ex:86
msgid "Total # of rounds"
msgstr ""

View File

@ -93,9 +93,9 @@ msgid "Are you sure you want to delete the invite for %{name}?"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/index.html.heex:146
#: lib/cannery_web/live/ammo_group_live/index.ex:165
#: lib/cannery_web/live/ammo_group_live/show.html.heex:66
#: lib/cannery_web/live/ammo_type_live/index.html.heex:75
#: lib/cannery_web/live/ammo_type_live/index.ex:130
msgid "Are you sure you want to delete this ammo?"
msgstr ""
@ -206,8 +206,8 @@ msgid "Ammo group unstaged succesfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:159
#: lib/cannery_web/live/range_live/index.html.heex:108
#: lib/cannery_web/live/ammo_group_live/show.ex:132
#: lib/cannery_web/live/range_live/index.ex:130
msgid "Are you sure you want to delete this shot record?"
msgstr ""
@ -228,7 +228,7 @@ msgid "%{email} confirmed successfully."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/move_ammo_group_component.ex:47
#: lib/cannery_web/components/move_ammo_group_component.ex:53
msgid "Ammo moved to %{name} successfully"
msgstr ""

View File

@ -92,9 +92,9 @@ msgid "Are you sure you want to delete the invite for %{name}?"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/index.html.heex:146
#: lib/cannery_web/live/ammo_group_live/index.ex:165
#: lib/cannery_web/live/ammo_group_live/show.html.heex:66
#: lib/cannery_web/live/ammo_type_live/index.html.heex:75
#: lib/cannery_web/live/ammo_type_live/index.ex:130
msgid "Are you sure you want to delete this ammo?"
msgstr ""
@ -205,8 +205,8 @@ msgid "Ammo group unstaged succesfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:159
#: lib/cannery_web/live/range_live/index.html.heex:108
#: lib/cannery_web/live/ammo_group_live/show.ex:132
#: lib/cannery_web/live/range_live/index.ex:130
msgid "Are you sure you want to delete this shot record?"
msgstr ""
@ -227,7 +227,7 @@ msgid "%{email} confirmed successfully."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/move_ammo_group_component.ex:47
#: lib/cannery_web/components/move_ammo_group_component.ex:53
msgid "Ammo moved to %{name} successfully"
msgstr ""