diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3f444490..5eb872eb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
- Miscellanous code improvements
- Improve container index table
- Fix bug with ammo not updating after deleting shot group
+- Replace ammo "added on" with "purchased on"
# v0.7.1
- Add shading to table component
diff --git a/lib/cannery/ammo/ammo_group.ex b/lib/cannery/ammo/ammo_group.ex
index 31f4a7df..58ca747d 100644
--- a/lib/cannery/ammo/ammo_group.ex
+++ b/lib/cannery/ammo/ammo_group.ex
@@ -30,6 +30,7 @@ defmodule Cannery.Ammo.AmmoGroup do
field :notes, :string
field :price_paid, :float
field :staged, :boolean, default: false
+ field :purchased_on, :date
belongs_to :ammo_type, AmmoType
belongs_to :container, Container
@@ -46,6 +47,7 @@ defmodule Cannery.Ammo.AmmoGroup do
notes: String.t() | nil,
price_paid: float() | nil,
staged: boolean(),
+ purchased_on: Date.t(),
ammo_type: AmmoType.t() | nil,
ammo_type_id: AmmoType.id(),
container: Container.t() | nil,
@@ -79,9 +81,9 @@ defmodule Cannery.Ammo.AmmoGroup do
|> change(ammo_type_id: ammo_type_id)
|> change(user_id: user_id)
|> change(container_id: container_id)
- |> cast(attrs, [:count, :price_paid, :notes, :staged])
+ |> cast(attrs, [:count, :price_paid, :notes, :staged, :purchased_on])
|> validate_number(:count, greater_than: 0)
- |> validate_required([:count, :staged, :ammo_type_id, :container_id, :user_id])
+ |> validate_required([:count, :staged, :purchased_on, :ammo_type_id, :container_id, :user_id])
end
@doc """
@@ -99,10 +101,10 @@ defmodule Cannery.Ammo.AmmoGroup do
Changeset.t(t() | new_ammo_group())
def update_changeset(ammo_group, attrs, user) do
ammo_group
- |> cast(attrs, [:count, :price_paid, :notes, :staged, :container_id])
+ |> cast(attrs, [:count, :price_paid, :notes, :staged, :purchased_on, :container_id])
|> validate_number(:count, greater_than_or_equal_to: 0)
|> validate_container_id(user)
- |> validate_required([:count, :staged, :container_id])
+ |> validate_required([:count, :staged, :purchased_on, :container_id])
end
defp validate_container_id(changeset, user) do
diff --git a/lib/cannery_web/components/add_shot_group_component.html.heex b/lib/cannery_web/components/add_shot_group_component.html.heex
index 7f50081b..7e8d1b1d 100644
--- a/lib/cannery_web/components/add_shot_group_component.html.heex
+++ b/lib/cannery_web/components/add_shot_group_component.html.heex
@@ -42,7 +42,7 @@
) %>
<%= error_tag(f, :notes, "col-span-3") %>
- <%= label(f, :date, gettext("Date (UTC)"), class: "title text-lg text-primary-600") %>
+ <%= label(f, :date, gettext("Date"), class: "title text-lg text-primary-600") %>
<%= date_input(f, :date,
class: "input input-primary col-span-2",
phx_update: "ignore",
diff --git a/lib/cannery_web/components/ammo_group_card.ex b/lib/cannery_web/components/ammo_group_card.ex
index 10f01f51..def7c3b6 100644
--- a/lib/cannery_web/components/ammo_group_card.ex
+++ b/lib/cannery_web/components/ammo_group_card.ex
@@ -54,13 +54,13 @@ defmodule CanneryWeb.Components.AmmoGroupCard do
<% end %>
- <%= gettext("Added on:") %>
- <%= @ammo_group.inserted_at |> display_datetime() %>
+ <%= gettext("Purchased on:") %>
+ <%= @ammo_group.purchased_on |> display_date() %>
- <%= if @ammo_group.count == 0 do %>
+ <%= if @ammo_group |> Ammo.get_last_used_shot_group() do %>
- <%= gettext("Used up on:") %>
+ <%= gettext("Last used on:") %>
<%= @ammo_group |> Ammo.get_last_used_shot_group() |> Map.get(:date) |> display_date() %>
<% end %>
diff --git a/lib/cannery_web/components/ammo_group_table_component.ex b/lib/cannery_web/components/ammo_group_table_component.ex
index 9530ddf2..6c24bb31 100644
--- a/lib/cannery_web/components/ammo_group_table_component.ex
+++ b/lib/cannery_web/components/ammo_group_table_component.ex
@@ -13,7 +13,6 @@ defmodule CanneryWeb.Components.AmmoGroupTableComponent do
required(:id) => UUID.t(),
required(:current_user) => User.t(),
required(:ammo_groups) => [AmmoGroup.t()],
- optional(:show_used) => boolean(),
optional(:ammo_type) => Rendered.t(),
optional(:range) => Rendered.t(),
optional(:container) => Rendered.t(),
@@ -26,7 +25,6 @@ defmodule CanneryWeb.Components.AmmoGroupTableComponent do
socket =
socket
|> assign(assigns)
- |> assign_new(:show_used, fn -> false end)
|> assign_new(:ammo_type, fn -> [] end)
|> assign_new(:range, fn -> [] end)
|> assign_new(:container, fn -> [] end)
@@ -41,7 +39,6 @@ defmodule CanneryWeb.Components.AmmoGroupTableComponent do
assigns: %{
ammo_groups: ammo_groups,
current_user: current_user,
- show_used: show_used,
ammo_type: ammo_type,
range: range,
container: container,
@@ -56,14 +53,10 @@ defmodule CanneryWeb.Components.AmmoGroupTableComponent do
[%{label: nil, key: :actions, sortable: false}]
end
- columns =
- if show_used do
- [%{label: gettext("Used up on"), key: :used_up_on} | columns]
- else
- columns
- end
-
- columns = [%{label: gettext("Added on"), key: :added_on} | columns]
+ columns = [
+ %{label: gettext("Purchased on"), key: :purchased_on},
+ %{label: gettext("Last used on"), key: :used_up_on} | columns
+ ]
columns =
if container == [] do
@@ -158,12 +151,12 @@ defmodule CanneryWeb.Components.AmmoGroupTableComponent do
defp get_value_for_key(:price_paid, %{price_paid: price_paid}, _additional_data),
do: gettext("$%{amount}", amount: price_paid |> :erlang.float_to_binary(decimals: 2))
- defp get_value_for_key(:added_on, %{inserted_at: inserted_at}, _additional_data) do
- assigns = %{inserted_at: inserted_at}
+ defp get_value_for_key(:purchased_on, %{purchased_on: purchased_on}, _additional_data) do
+ assigns = %{purchased_on: purchased_on}
- {inserted_at,
+ {purchased_on,
~H"""
- <%= @inserted_at |> display_datetime() %>
+ <%= @purchased_on |> display_date() %>
"""}
end
@@ -178,7 +171,11 @@ defmodule CanneryWeb.Components.AmmoGroupTableComponent do
{last_shot_group_date,
~H"""
- <%= @last_shot_group_date |> display_date() %>
+ <%= if @last_shot_group_date do %>
+ <%= @last_shot_group_date |> display_date() %>
+ <% else %>
+ <%= gettext("Never used") %>
+ <% end %>
"""}
end
diff --git a/lib/cannery_web/live/ammo_group_live/form_component.html.heex b/lib/cannery_web/live/ammo_group_live/form_component.html.heex
index 7d90fa09..7957b2bb 100644
--- a/lib/cannery_web/live/ammo_group_live/form_component.html.heex
+++ b/lib/cannery_web/live/ammo_group_live/form_component.html.heex
@@ -38,6 +38,14 @@
) %>
<%= error_tag(f, :price_paid, "col-span-3 text-center") %>
+ <%= label(f, :purchased_on, gettext("Purchased on"), class: "title text-lg text-primary-600") %>
+ <%= date_input(f, :purchased_on,
+ class: "input input-primary col-span-2",
+ phx_update: "ignore",
+ value: @changeset |> Changeset.get_field(:purchased_on) || Date.utc_today()
+ ) %>
+ <%= error_tag(f, :purchased_on, "col-span-3 text-center") %>
+
<%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %>
<%= textarea(f, :notes,
class: "text-center col-span-2 input input-primary",
diff --git a/lib/cannery_web/live/ammo_group_live/index.html.heex b/lib/cannery_web/live/ammo_group_live/index.html.heex
index 93abb2c7..85c50f86 100644
--- a/lib/cannery_web/live/ammo_group_live/index.html.heex
+++ b/lib/cannery_web/live/ammo_group_live/index.html.heex
@@ -55,7 +55,6 @@
id="ammo-group-index-table"
ammo_groups={@ammo_groups}
current_user={@current_user}
- show_used={@show_used}
>
<:ammo_type :let={%{name: ammo_type_name} = ammo_type}>
<.link navigate={Routes.ammo_type_show_path(Endpoint, :show, ammo_type)} class="link">
diff --git a/lib/cannery_web/live/ammo_group_live/show.html.heex b/lib/cannery_web/live/ammo_group_live/show.html.heex
index d8568ae9..e538db43 100644
--- a/lib/cannery_web/live/ammo_group_live/show.html.heex
+++ b/lib/cannery_web/live/ammo_group_live/show.html.heex
@@ -27,8 +27,8 @@
<% end %>
- <%= gettext("Added on:") %>
- <%= @ammo_group.inserted_at |> display_datetime() %>
+ <%= gettext("Purchased on:") %>
+ <%= @ammo_group.purchased_on |> display_date() %>
<%= if @ammo_group.price_paid do %>
diff --git a/lib/cannery_web/live/ammo_type_live/show.html.heex b/lib/cannery_web/live/ammo_type_live/show.html.heex
index c40d084a..6aab027c 100644
--- a/lib/cannery_web/live/ammo_type_live/show.html.heex
+++ b/lib/cannery_web/live/ammo_type_live/show.html.heex
@@ -173,7 +173,6 @@
id="ammo-type-show-table"
ammo_groups={@ammo_groups}
current_user={@current_user}
- show_used={@show_used}
>
<:container :let={%{container: %{name: container_name} = container}}>
<.link
diff --git a/lib/cannery_web/live/container_live/show.html.heex b/lib/cannery_web/live/container_live/show.html.heex
index 7927444f..c361493d 100644
--- a/lib/cannery_web/live/container_live/show.html.heex
+++ b/lib/cannery_web/live/container_live/show.html.heex
@@ -125,7 +125,6 @@
id="ammo-type-show-table"
ammo_groups={@ammo_groups}
current_user={@current_user}
- show_used={@show_used}
>
<:ammo_type :let={%{name: ammo_type_name} = ammo_type}>
<.link navigate={Routes.ammo_type_show_path(Endpoint, :show, ammo_type)} class="link">
diff --git a/priv/gettext/actions.pot b/priv/gettext/actions.pot
index edf24993..8f3dc52c 100644
--- a/priv/gettext/actions.pot
+++ b/priv/gettext/actions.pot
@@ -121,7 +121,7 @@ msgid "Reset password"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:53
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
#: lib/cannery_web/live/container_live/form_component.html.heex:50
#: lib/cannery_web/live/invite_live/form_component.html.heex:31
@@ -156,7 +156,7 @@ msgstr ""
msgid "Why not get some ready to shoot?"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:80
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:79
#: lib/cannery_web/live/ammo_group_live/show.html.heex:101
#: lib/cannery_web/live/range_live/index.html.heex:38
#, elixir-autogen, elixir-format
@@ -188,7 +188,7 @@ msgstr ""
msgid "add a container first"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:66
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:74
#, elixir-autogen, elixir-format
msgid "Create"
msgstr ""
diff --git a/priv/gettext/de/LC_MESSAGES/actions.po b/priv/gettext/de/LC_MESSAGES/actions.po
index 2554f1f1..7b427afb 100644
--- a/priv/gettext/de/LC_MESSAGES/actions.po
+++ b/priv/gettext/de/LC_MESSAGES/actions.po
@@ -134,7 +134,7 @@ msgid "Reset password"
msgstr "Passwort zurücksetzen"
#: lib/cannery_web/components/add_shot_group_component.html.heex:53
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
#: lib/cannery_web/live/container_live/form_component.html.heex:50
#: lib/cannery_web/live/invite_live/form_component.html.heex:31
@@ -169,7 +169,7 @@ msgstr "Munition markieren"
msgid "Why not get some ready to shoot?"
msgstr "Warum nicht einige für den Schießstand auswählen?"
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:80
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:79
#: lib/cannery_web/live/ammo_group_live/show.html.heex:101
#: lib/cannery_web/live/range_live/index.html.heex:38
#, elixir-autogen, elixir-format
@@ -201,7 +201,7 @@ msgstr "In die Zwischenablage kopieren"
msgid "add a container first"
msgstr "Zuerst einen Behälter hinzufügen"
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:66
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:74
#, elixir-autogen, elixir-format
msgid "Create"
msgstr "Erstellen"
diff --git a/priv/gettext/de/LC_MESSAGES/default.po b/priv/gettext/de/LC_MESSAGES/default.po
index 79f3acaa..28f95534 100644
--- a/priv/gettext/de/LC_MESSAGES/default.po
+++ b/priv/gettext/de/LC_MESSAGES/default.po
@@ -52,7 +52,7 @@ msgstr "Admins:"
msgid "Ammo"
msgstr "Munition"
-#: lib/cannery_web/components/ammo_group_table_component.ex:96
+#: lib/cannery_web/components/ammo_group_table_component.ex:89
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:21
#, elixir-autogen, elixir-format
msgid "Ammo type"
@@ -104,9 +104,9 @@ msgstr "Patrone"
msgid "Case material"
msgstr "Gehäusematerial"
-#: lib/cannery_web/components/ammo_group_table_component.ex:72
+#: lib/cannery_web/components/ammo_group_table_component.ex:65
#: 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/form_component.html.heex:56
#, elixir-autogen, elixir-format
msgid "Container"
msgstr "Behälter"
@@ -125,7 +125,7 @@ msgstr "Behälter"
msgid "Corrosive"
msgstr "Korrosiv"
-#: lib/cannery_web/components/ammo_group_table_component.ex:83
+#: lib/cannery_web/components/ammo_group_table_component.ex:76
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:27
#, elixir-autogen, elixir-format
msgid "Count"
@@ -322,8 +322,8 @@ msgid "No tags"
msgstr "Keine Tags"
#: lib/cannery_web/components/add_shot_group_component.html.heex:37
-#: lib/cannery_web/components/ammo_group_table_component.ex:88
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
+#: lib/cannery_web/components/ammo_group_table_component.ex:81
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49
#: lib/cannery_web/live/ammo_group_live/show.ex:93
#: lib/cannery_web/live/range_live/form_component.html.heex:29
#: lib/cannery_web/live/range_live/index.ex:82
@@ -348,7 +348,7 @@ msgstr "Auf dem Bücherregal"
msgid "Pressure"
msgstr "Druck"
-#: lib/cannery_web/components/ammo_group_table_component.ex:85
+#: lib/cannery_web/components/ammo_group_table_component.ex:78
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Price paid"
@@ -475,7 +475,7 @@ msgstr "Ihre Daten bleiben bei Ihnen, Punkt"
msgid "No tags for this container"
msgstr "Keine Tags für diesen Behälter"
-#: lib/cannery_web/components/ammo_group_table_component.ex:79
+#: lib/cannery_web/components/ammo_group_table_component.ex:72
#: lib/cannery_web/components/topbar.ex:81
#, elixir-autogen, elixir-format
msgid "Range"
@@ -486,6 +486,7 @@ msgstr "Schießplatz"
msgid "Range day"
msgstr "Range Day"
+#: lib/cannery_web/components/add_shot_group_component.html.heex:45
#: lib/cannery_web/live/ammo_group_live/show.ex:94
#: lib/cannery_web/live/range_live/index.ex:83
#, elixir-autogen, elixir-format
@@ -513,7 +514,6 @@ msgstr "Schüsse dokumentieren"
msgid "Ammo groups"
msgstr "Munitionsgruppen"
-#: lib/cannery_web/components/add_shot_group_component.html.heex:45
#: lib/cannery_web/live/range_live/form_component.html.heex:36
#, elixir-autogen, elixir-format
msgid "Date (UTC)"
@@ -558,7 +558,7 @@ msgstr "Schießkladde"
msgid "Move Ammo group"
msgstr "Munitionsgruppe verschieben"
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:97
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:96
#, elixir-autogen, elixir-format
msgid "Move ammo"
msgstr "Munition verschieben"
@@ -575,8 +575,8 @@ msgstr "Schießkladde"
#: lib/cannery_web/components/ammo_group_card.ex:71
#: lib/cannery_web/components/ammo_group_card.ex:78
-#: lib/cannery_web/components/ammo_group_table_component.ex:159
-#: lib/cannery_web/components/ammo_group_table_component.ex:227
+#: lib/cannery_web/components/ammo_group_table_component.ex:152
+#: lib/cannery_web/components/ammo_group_table_component.ex:224
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
#: lib/cannery_web/live/ammo_type_live/index.ex:179
@@ -636,12 +636,12 @@ msgstr "Derzeitiges Passwort"
msgid "New password"
msgstr "Neues Passwort"
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
#, elixir-autogen, elixir-format
msgid "Stage"
msgstr "Markiert"
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
#, elixir-autogen, elixir-format
msgid "Unstage"
msgstr "Demarkiert"
@@ -681,14 +681,14 @@ msgstr "Editiere %{name} Tags"
msgid "Rounds:"
msgstr "Patronen:"
-#: lib/cannery_web/components/ammo_group_table_component.ex:224
+#: lib/cannery_web/components/ammo_group_table_component.ex:221
#: lib/cannery_web/live/ammo_type_live/index.ex:178
#: lib/cannery_web/live/ammo_type_live/show.html.heex:142
#, elixir-autogen, elixir-format
msgid "No cost information"
msgstr "Keine Preisinformationen"
-#: lib/cannery_web/components/ammo_group_table_component.ex:87
+#: lib/cannery_web/components/ammo_group_table_component.ex:80
#, elixir-autogen, elixir-format
msgid "% left"
msgstr "% verbleibend"
@@ -749,7 +749,7 @@ msgstr "Passwort zurücksetzen"
msgid "Record Shots"
msgstr "Schüsse dokumentieren"
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:58
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:66
#, elixir-autogen, elixir-format
msgid "Copies"
msgstr "Kopien"
@@ -759,13 +759,6 @@ msgstr "Kopien"
msgid "Ammo types"
msgstr "Munitionsart"
-#: lib/cannery_web/components/ammo_group_table_component.ex:66
-#, elixir-autogen, elixir-format
-msgid "Added on"
-msgstr "Hinzugefügt am"
-
-#: lib/cannery_web/components/ammo_group_card.ex:57
-#: lib/cannery_web/live/ammo_group_live/show.html.heex:30
#: lib/cannery_web/live/ammo_type_live/show.html.heex:123
#, elixir-autogen, elixir-format
msgid "Added on:"
@@ -886,17 +879,7 @@ msgstr "Behälter"
msgid "Show used"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:61
-#, elixir-autogen, elixir-format
-msgid "Used up on"
-msgstr ""
-
-#: lib/cannery_web/components/ammo_group_card.ex:63
-#, elixir-autogen, elixir-format
-msgid "Used up on:"
-msgstr ""
-
-#: lib/cannery_web/components/ammo_group_table_component.ex:195
+#: lib/cannery_web/components/ammo_group_table_component.ex:192
#: lib/cannery_web/live/ammo_group_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "%{percentage}%"
@@ -1083,12 +1066,12 @@ msgid "Edit %{ammo_type_name}"
msgstr "%{name} bearbeiten"
#: lib/cannery_web/components/ammo_group_card.ex:39
-#: lib/cannery_web/components/ammo_group_table_component.ex:233
+#: lib/cannery_web/components/ammo_group_table_component.ex:230
#, elixir-autogen, elixir-format
msgid "Empty"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:86
+#: lib/cannery_web/components/ammo_group_table_component.ex:79
#, elixir-autogen, elixir-format
msgid "CPR"
msgstr ""
@@ -1098,7 +1081,7 @@ msgstr ""
msgid "CPR:"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:84
+#: lib/cannery_web/components/ammo_group_table_component.ex:77
#, elixir-autogen, elixir-format, fuzzy
msgid "Original Count"
msgstr "Ursprüngliche Anzahl:"
@@ -1122,3 +1105,30 @@ msgstr ""
#, elixir-autogen, elixir-format, fuzzy
msgid "Total rounds:"
msgstr "Summe abgegebener Schüsse:"
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:58
+#, elixir-autogen, elixir-format
+msgid "Last used on"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_card.ex:63
+#, elixir-autogen, elixir-format
+msgid "Last used on:"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:177
+#, elixir-autogen, elixir-format
+msgid "Never used"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:57
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
+#, elixir-autogen, elixir-format
+msgid "Purchased on"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_card.ex:57
+#: lib/cannery_web/live/ammo_group_live/show.html.heex:30
+#, elixir-autogen, elixir-format
+msgid "Purchased on:"
+msgstr ""
diff --git a/priv/gettext/de/LC_MESSAGES/errors.po b/priv/gettext/de/LC_MESSAGES/errors.po
index e6687bc2..a91e2894 100644
--- a/priv/gettext/de/LC_MESSAGES/errors.po
+++ b/priv/gettext/de/LC_MESSAGES/errors.po
@@ -192,7 +192,7 @@ msgstr ""
msgid "Invalid multiplier"
msgstr ""
-#: lib/cannery/ammo/ammo_group.ex:94
+#: lib/cannery/ammo/ammo_group.ex:96
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr ""
diff --git a/priv/gettext/de/LC_MESSAGES/prompts.po b/priv/gettext/de/LC_MESSAGES/prompts.po
index 3d633df7..c680740c 100644
--- a/priv/gettext/de/LC_MESSAGES/prompts.po
+++ b/priv/gettext/de/LC_MESSAGES/prompts.po
@@ -100,7 +100,7 @@ msgstr "Sind Sie sicher, dass sie %{name} löschen möchten?"
msgid "Are you sure you want to delete the invite for %{name}?"
msgstr "Sind Sie sicher, dass sie die Einladung für %{name} löschen möchten?"
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:132
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:131
#: lib/cannery_web/live/ammo_group_live/show.html.heex:75
#, elixir-autogen, elixir-format
msgid "Are you sure you want to delete this ammo?"
@@ -166,7 +166,7 @@ msgid "Register to setup %{name}"
msgstr "Registrieren Sie sich, um %{name} zu bearbeiten"
#: lib/cannery_web/components/add_shot_group_component.html.heex:55
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:74
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:157
#: lib/cannery_web/live/container_live/form_component.html.heex:52
#: lib/cannery_web/live/invite_live/form_component.html.heex:33
@@ -256,7 +256,7 @@ msgstr "%{name} erfolgreich entfernt"
msgid "You'll need to"
msgstr "Sie müssen"
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:67
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:75
#, elixir-autogen, elixir-format
msgid "Creating..."
msgstr "Erstellen..."
diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot
index b491ebc2..fd72fd38 100644
--- a/priv/gettext/default.pot
+++ b/priv/gettext/default.pot
@@ -37,7 +37,7 @@ msgstr ""
msgid "Ammo"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:96
+#: lib/cannery_web/components/ammo_group_table_component.ex:89
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:21
#, elixir-autogen, elixir-format
msgid "Ammo type"
@@ -89,9 +89,9 @@ msgstr ""
msgid "Case material"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:72
+#: lib/cannery_web/components/ammo_group_table_component.ex:65
#: 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/form_component.html.heex:56
#, elixir-autogen, elixir-format
msgid "Container"
msgstr ""
@@ -110,7 +110,7 @@ msgstr ""
msgid "Corrosive"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:83
+#: lib/cannery_web/components/ammo_group_table_component.ex:76
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:27
#, elixir-autogen, elixir-format
msgid "Count"
@@ -307,8 +307,8 @@ msgid "No tags"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:37
-#: lib/cannery_web/components/ammo_group_table_component.ex:88
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
+#: lib/cannery_web/components/ammo_group_table_component.ex:81
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49
#: lib/cannery_web/live/ammo_group_live/show.ex:93
#: lib/cannery_web/live/range_live/form_component.html.heex:29
#: lib/cannery_web/live/range_live/index.ex:82
@@ -333,7 +333,7 @@ msgstr ""
msgid "Pressure"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:85
+#: lib/cannery_web/components/ammo_group_table_component.ex:78
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Price paid"
@@ -458,7 +458,7 @@ msgstr ""
msgid "No tags for this container"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:79
+#: lib/cannery_web/components/ammo_group_table_component.ex:72
#: lib/cannery_web/components/topbar.ex:81
#, elixir-autogen, elixir-format
msgid "Range"
@@ -469,6 +469,7 @@ msgstr ""
msgid "Range day"
msgstr ""
+#: lib/cannery_web/components/add_shot_group_component.html.heex:45
#: lib/cannery_web/live/ammo_group_live/show.ex:94
#: lib/cannery_web/live/range_live/index.ex:83
#, elixir-autogen, elixir-format
@@ -496,7 +497,6 @@ msgstr ""
msgid "Ammo groups"
msgstr ""
-#: lib/cannery_web/components/add_shot_group_component.html.heex:45
#: lib/cannery_web/live/range_live/form_component.html.heex:36
#, elixir-autogen, elixir-format
msgid "Date (UTC)"
@@ -541,7 +541,7 @@ msgstr ""
msgid "Move Ammo group"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:97
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:96
#, elixir-autogen, elixir-format
msgid "Move ammo"
msgstr ""
@@ -558,8 +558,8 @@ msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:71
#: lib/cannery_web/components/ammo_group_card.ex:78
-#: lib/cannery_web/components/ammo_group_table_component.ex:159
-#: lib/cannery_web/components/ammo_group_table_component.ex:227
+#: lib/cannery_web/components/ammo_group_table_component.ex:152
+#: lib/cannery_web/components/ammo_group_table_component.ex:224
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
#: lib/cannery_web/live/ammo_type_live/index.ex:179
@@ -619,12 +619,12 @@ msgstr ""
msgid "New password"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
#, elixir-autogen, elixir-format
msgid "Stage"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
#, elixir-autogen, elixir-format
msgid "Unstage"
msgstr ""
@@ -664,14 +664,14 @@ msgstr ""
msgid "Rounds:"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:224
+#: lib/cannery_web/components/ammo_group_table_component.ex:221
#: lib/cannery_web/live/ammo_type_live/index.ex:178
#: lib/cannery_web/live/ammo_type_live/show.html.heex:142
#, elixir-autogen, elixir-format
msgid "No cost information"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:87
+#: lib/cannery_web/components/ammo_group_table_component.ex:80
#, elixir-autogen, elixir-format
msgid "% left"
msgstr ""
@@ -732,7 +732,7 @@ msgstr ""
msgid "Record Shots"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:58
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:66
#, elixir-autogen, elixir-format
msgid "Copies"
msgstr ""
@@ -742,13 +742,6 @@ msgstr ""
msgid "Ammo types"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:66
-#, elixir-autogen, elixir-format
-msgid "Added on"
-msgstr ""
-
-#: lib/cannery_web/components/ammo_group_card.ex:57
-#: lib/cannery_web/live/ammo_group_live/show.html.heex:30
#: lib/cannery_web/live/ammo_type_live/show.html.heex:123
#, elixir-autogen, elixir-format
msgid "Added on:"
@@ -869,17 +862,7 @@ msgstr ""
msgid "Show used"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:61
-#, elixir-autogen, elixir-format
-msgid "Used up on"
-msgstr ""
-
-#: lib/cannery_web/components/ammo_group_card.ex:63
-#, elixir-autogen, elixir-format
-msgid "Used up on:"
-msgstr ""
-
-#: lib/cannery_web/components/ammo_group_table_component.ex:195
+#: lib/cannery_web/components/ammo_group_table_component.ex:192
#: lib/cannery_web/live/ammo_group_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "%{percentage}%"
@@ -1066,12 +1049,12 @@ msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:39
-#: lib/cannery_web/components/ammo_group_table_component.ex:233
+#: lib/cannery_web/components/ammo_group_table_component.ex:230
#, elixir-autogen, elixir-format
msgid "Empty"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:86
+#: lib/cannery_web/components/ammo_group_table_component.ex:79
#, elixir-autogen, elixir-format
msgid "CPR"
msgstr ""
@@ -1081,7 +1064,7 @@ msgstr ""
msgid "CPR:"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:84
+#: lib/cannery_web/components/ammo_group_table_component.ex:77
#, elixir-autogen, elixir-format
msgid "Original Count"
msgstr ""
@@ -1105,3 +1088,30 @@ msgstr ""
#, elixir-autogen, elixir-format
msgid "Total rounds:"
msgstr ""
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:58
+#, elixir-autogen, elixir-format
+msgid "Last used on"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_card.ex:63
+#, elixir-autogen, elixir-format
+msgid "Last used on:"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:177
+#, elixir-autogen, elixir-format
+msgid "Never used"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:57
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
+#, elixir-autogen, elixir-format
+msgid "Purchased on"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_card.ex:57
+#: lib/cannery_web/live/ammo_group_live/show.html.heex:30
+#, elixir-autogen, elixir-format
+msgid "Purchased on:"
+msgstr ""
diff --git a/priv/gettext/en/LC_MESSAGES/actions.po b/priv/gettext/en/LC_MESSAGES/actions.po
index 3147c607..8a73e03f 100644
--- a/priv/gettext/en/LC_MESSAGES/actions.po
+++ b/priv/gettext/en/LC_MESSAGES/actions.po
@@ -122,7 +122,7 @@ msgid "Reset password"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:53
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
#: lib/cannery_web/live/container_live/form_component.html.heex:50
#: lib/cannery_web/live/invite_live/form_component.html.heex:31
@@ -157,7 +157,7 @@ msgstr ""
msgid "Why not get some ready to shoot?"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:80
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:79
#: lib/cannery_web/live/ammo_group_live/show.html.heex:101
#: lib/cannery_web/live/range_live/index.html.heex:38
#, elixir-autogen, elixir-format
@@ -189,7 +189,7 @@ msgstr ""
msgid "add a container first"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:66
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:74
#, elixir-autogen, elixir-format, fuzzy
msgid "Create"
msgstr ""
diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po
index 2f86423a..cc20333e 100644
--- a/priv/gettext/en/LC_MESSAGES/default.po
+++ b/priv/gettext/en/LC_MESSAGES/default.po
@@ -38,7 +38,7 @@ msgstr ""
msgid "Ammo"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:96
+#: lib/cannery_web/components/ammo_group_table_component.ex:89
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:21
#, elixir-autogen, elixir-format
msgid "Ammo type"
@@ -90,9 +90,9 @@ msgstr ""
msgid "Case material"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:72
+#: lib/cannery_web/components/ammo_group_table_component.ex:65
#: 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/form_component.html.heex:56
#, elixir-autogen, elixir-format
msgid "Container"
msgstr ""
@@ -111,7 +111,7 @@ msgstr ""
msgid "Corrosive"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:83
+#: lib/cannery_web/components/ammo_group_table_component.ex:76
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:27
#, elixir-autogen, elixir-format
msgid "Count"
@@ -308,8 +308,8 @@ msgid "No tags"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:37
-#: lib/cannery_web/components/ammo_group_table_component.ex:88
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
+#: lib/cannery_web/components/ammo_group_table_component.ex:81
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49
#: lib/cannery_web/live/ammo_group_live/show.ex:93
#: lib/cannery_web/live/range_live/form_component.html.heex:29
#: lib/cannery_web/live/range_live/index.ex:82
@@ -334,7 +334,7 @@ msgstr ""
msgid "Pressure"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:85
+#: lib/cannery_web/components/ammo_group_table_component.ex:78
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Price paid"
@@ -459,7 +459,7 @@ msgstr ""
msgid "No tags for this container"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:79
+#: lib/cannery_web/components/ammo_group_table_component.ex:72
#: lib/cannery_web/components/topbar.ex:81
#, elixir-autogen, elixir-format
msgid "Range"
@@ -470,6 +470,7 @@ msgstr ""
msgid "Range day"
msgstr ""
+#: lib/cannery_web/components/add_shot_group_component.html.heex:45
#: lib/cannery_web/live/ammo_group_live/show.ex:94
#: lib/cannery_web/live/range_live/index.ex:83
#, elixir-autogen, elixir-format
@@ -497,7 +498,6 @@ msgstr ""
msgid "Ammo groups"
msgstr ""
-#: lib/cannery_web/components/add_shot_group_component.html.heex:45
#: lib/cannery_web/live/range_live/form_component.html.heex:36
#, elixir-autogen, elixir-format
msgid "Date (UTC)"
@@ -542,7 +542,7 @@ msgstr ""
msgid "Move Ammo group"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:97
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:96
#, elixir-autogen, elixir-format
msgid "Move ammo"
msgstr ""
@@ -559,8 +559,8 @@ msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:71
#: lib/cannery_web/components/ammo_group_card.ex:78
-#: lib/cannery_web/components/ammo_group_table_component.ex:159
-#: lib/cannery_web/components/ammo_group_table_component.ex:227
+#: lib/cannery_web/components/ammo_group_table_component.ex:152
+#: lib/cannery_web/components/ammo_group_table_component.ex:224
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
#: lib/cannery_web/live/ammo_type_live/index.ex:179
@@ -620,12 +620,12 @@ msgstr ""
msgid "New password"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
#, elixir-autogen, elixir-format
msgid "Stage"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
#, elixir-autogen, elixir-format
msgid "Unstage"
msgstr ""
@@ -665,14 +665,14 @@ msgstr ""
msgid "Rounds:"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:224
+#: lib/cannery_web/components/ammo_group_table_component.ex:221
#: lib/cannery_web/live/ammo_type_live/index.ex:178
#: lib/cannery_web/live/ammo_type_live/show.html.heex:142
#, elixir-autogen, elixir-format
msgid "No cost information"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:87
+#: lib/cannery_web/components/ammo_group_table_component.ex:80
#, elixir-autogen, elixir-format
msgid "% left"
msgstr ""
@@ -733,7 +733,7 @@ msgstr ""
msgid "Record Shots"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:58
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:66
#, elixir-autogen, elixir-format
msgid "Copies"
msgstr ""
@@ -743,13 +743,6 @@ msgstr ""
msgid "Ammo types"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:66
-#, elixir-autogen, elixir-format
-msgid "Added on"
-msgstr ""
-
-#: lib/cannery_web/components/ammo_group_card.ex:57
-#: lib/cannery_web/live/ammo_group_live/show.html.heex:30
#: lib/cannery_web/live/ammo_type_live/show.html.heex:123
#, elixir-autogen, elixir-format
msgid "Added on:"
@@ -870,17 +863,7 @@ msgstr ""
msgid "Show used"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:61
-#, elixir-autogen, elixir-format
-msgid "Used up on"
-msgstr ""
-
-#: lib/cannery_web/components/ammo_group_card.ex:63
-#, elixir-autogen, elixir-format
-msgid "Used up on:"
-msgstr ""
-
-#: lib/cannery_web/components/ammo_group_table_component.ex:195
+#: lib/cannery_web/components/ammo_group_table_component.ex:192
#: lib/cannery_web/live/ammo_group_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "%{percentage}%"
@@ -1067,12 +1050,12 @@ msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:39
-#: lib/cannery_web/components/ammo_group_table_component.ex:233
+#: lib/cannery_web/components/ammo_group_table_component.ex:230
#, elixir-autogen, elixir-format
msgid "Empty"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:86
+#: lib/cannery_web/components/ammo_group_table_component.ex:79
#, elixir-autogen, elixir-format
msgid "CPR"
msgstr ""
@@ -1082,7 +1065,7 @@ msgstr ""
msgid "CPR:"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:84
+#: lib/cannery_web/components/ammo_group_table_component.ex:77
#, elixir-autogen, elixir-format, fuzzy
msgid "Original Count"
msgstr ""
@@ -1106,3 +1089,30 @@ msgstr ""
#, elixir-autogen, elixir-format, fuzzy
msgid "Total rounds:"
msgstr ""
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:58
+#, elixir-autogen, elixir-format
+msgid "Last used on"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_card.ex:63
+#, elixir-autogen, elixir-format
+msgid "Last used on:"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:177
+#, elixir-autogen, elixir-format
+msgid "Never used"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:57
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
+#, elixir-autogen, elixir-format
+msgid "Purchased on"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_card.ex:57
+#: lib/cannery_web/live/ammo_group_live/show.html.heex:30
+#, elixir-autogen, elixir-format
+msgid "Purchased on:"
+msgstr ""
diff --git a/priv/gettext/en/LC_MESSAGES/errors.po b/priv/gettext/en/LC_MESSAGES/errors.po
index dfcfa38f..f5057136 100644
--- a/priv/gettext/en/LC_MESSAGES/errors.po
+++ b/priv/gettext/en/LC_MESSAGES/errors.po
@@ -175,7 +175,7 @@ msgstr ""
msgid "Invalid multiplier"
msgstr ""
-#: lib/cannery/ammo/ammo_group.ex:94
+#: lib/cannery/ammo/ammo_group.ex:96
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr ""
diff --git a/priv/gettext/en/LC_MESSAGES/prompts.po b/priv/gettext/en/LC_MESSAGES/prompts.po
index c5bd0e0d..d194c4d4 100644
--- a/priv/gettext/en/LC_MESSAGES/prompts.po
+++ b/priv/gettext/en/LC_MESSAGES/prompts.po
@@ -86,7 +86,7 @@ msgstr ""
msgid "Are you sure you want to delete the invite for %{name}?"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:132
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:131
#: lib/cannery_web/live/ammo_group_live/show.html.heex:75
#, elixir-autogen, elixir-format
msgid "Are you sure you want to delete this ammo?"
@@ -148,7 +148,7 @@ msgid "Register to setup %{name}"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:55
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:74
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:157
#: lib/cannery_web/live/container_live/form_component.html.heex:52
#: lib/cannery_web/live/invite_live/form_component.html.heex:33
@@ -236,7 +236,7 @@ msgstr ""
msgid "You'll need to"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:67
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:75
#, elixir-autogen, elixir-format, fuzzy
msgid "Creating..."
msgstr ""
diff --git a/priv/gettext/errors.pot b/priv/gettext/errors.pot
index f9eced11..3a4666d9 100644
--- a/priv/gettext/errors.pot
+++ b/priv/gettext/errors.pot
@@ -174,7 +174,7 @@ msgstr ""
msgid "Invalid multiplier"
msgstr ""
-#: lib/cannery/ammo/ammo_group.ex:94
+#: lib/cannery/ammo/ammo_group.ex:96
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr ""
diff --git a/priv/gettext/es/LC_MESSAGES/actions.po b/priv/gettext/es/LC_MESSAGES/actions.po
index fd9ba111..40a4fa93 100644
--- a/priv/gettext/es/LC_MESSAGES/actions.po
+++ b/priv/gettext/es/LC_MESSAGES/actions.po
@@ -134,7 +134,7 @@ msgid "Reset password"
msgstr "Resetear contraseña"
#: lib/cannery_web/components/add_shot_group_component.html.heex:53
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
#: lib/cannery_web/live/container_live/form_component.html.heex:50
#: lib/cannery_web/live/invite_live/form_component.html.heex:31
@@ -169,7 +169,7 @@ msgstr "Preparar munición"
msgid "Why not get some ready to shoot?"
msgstr "¿Por qué no preparar parte para disparar?"
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:80
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:79
#: lib/cannery_web/live/ammo_group_live/show.html.heex:101
#: lib/cannery_web/live/range_live/index.html.heex:38
#, elixir-autogen, elixir-format
@@ -201,7 +201,7 @@ msgstr "Copiar al portapapeles"
msgid "add a container first"
msgstr "añade primero un contenedor"
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:66
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:74
#, elixir-autogen, elixir-format
msgid "Create"
msgstr "Crear"
diff --git a/priv/gettext/es/LC_MESSAGES/default.po b/priv/gettext/es/LC_MESSAGES/default.po
index ff98b7ee..ae4b67b0 100644
--- a/priv/gettext/es/LC_MESSAGES/default.po
+++ b/priv/gettext/es/LC_MESSAGES/default.po
@@ -52,7 +52,7 @@ msgstr ""
msgid "Ammo"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:96
+#: lib/cannery_web/components/ammo_group_table_component.ex:89
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:21
#, elixir-autogen, elixir-format
msgid "Ammo type"
@@ -104,9 +104,9 @@ msgstr ""
msgid "Case material"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:72
+#: lib/cannery_web/components/ammo_group_table_component.ex:65
#: 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/form_component.html.heex:56
#, elixir-autogen, elixir-format
msgid "Container"
msgstr ""
@@ -125,7 +125,7 @@ msgstr ""
msgid "Corrosive"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:83
+#: lib/cannery_web/components/ammo_group_table_component.ex:76
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:27
#, elixir-autogen, elixir-format
msgid "Count"
@@ -322,8 +322,8 @@ msgid "No tags"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:37
-#: lib/cannery_web/components/ammo_group_table_component.ex:88
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
+#: lib/cannery_web/components/ammo_group_table_component.ex:81
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49
#: lib/cannery_web/live/ammo_group_live/show.ex:93
#: lib/cannery_web/live/range_live/form_component.html.heex:29
#: lib/cannery_web/live/range_live/index.ex:82
@@ -348,7 +348,7 @@ msgstr ""
msgid "Pressure"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:85
+#: lib/cannery_web/components/ammo_group_table_component.ex:78
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Price paid"
@@ -473,7 +473,7 @@ msgstr ""
msgid "No tags for this container"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:79
+#: lib/cannery_web/components/ammo_group_table_component.ex:72
#: lib/cannery_web/components/topbar.ex:81
#, elixir-autogen, elixir-format
msgid "Range"
@@ -484,6 +484,7 @@ msgstr ""
msgid "Range day"
msgstr ""
+#: lib/cannery_web/components/add_shot_group_component.html.heex:45
#: lib/cannery_web/live/ammo_group_live/show.ex:94
#: lib/cannery_web/live/range_live/index.ex:83
#, elixir-autogen, elixir-format
@@ -511,7 +512,6 @@ msgstr ""
msgid "Ammo groups"
msgstr ""
-#: lib/cannery_web/components/add_shot_group_component.html.heex:45
#: lib/cannery_web/live/range_live/form_component.html.heex:36
#, elixir-autogen, elixir-format
msgid "Date (UTC)"
@@ -556,7 +556,7 @@ msgstr ""
msgid "Move Ammo group"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:97
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:96
#, elixir-autogen, elixir-format
msgid "Move ammo"
msgstr ""
@@ -573,8 +573,8 @@ msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:71
#: lib/cannery_web/components/ammo_group_card.ex:78
-#: lib/cannery_web/components/ammo_group_table_component.ex:159
-#: lib/cannery_web/components/ammo_group_table_component.ex:227
+#: lib/cannery_web/components/ammo_group_table_component.ex:152
+#: lib/cannery_web/components/ammo_group_table_component.ex:224
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
#: lib/cannery_web/live/ammo_type_live/index.ex:179
@@ -634,12 +634,12 @@ msgstr ""
msgid "New password"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
#, elixir-autogen, elixir-format
msgid "Stage"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
#, elixir-autogen, elixir-format
msgid "Unstage"
msgstr ""
@@ -679,14 +679,14 @@ msgstr ""
msgid "Rounds:"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:224
+#: lib/cannery_web/components/ammo_group_table_component.ex:221
#: lib/cannery_web/live/ammo_type_live/index.ex:178
#: lib/cannery_web/live/ammo_type_live/show.html.heex:142
#, elixir-autogen, elixir-format
msgid "No cost information"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:87
+#: lib/cannery_web/components/ammo_group_table_component.ex:80
#, elixir-autogen, elixir-format
msgid "% left"
msgstr ""
@@ -747,7 +747,7 @@ msgstr ""
msgid "Record Shots"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:58
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:66
#, elixir-autogen, elixir-format
msgid "Copies"
msgstr ""
@@ -757,13 +757,6 @@ msgstr ""
msgid "Ammo types"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:66
-#, elixir-autogen, elixir-format
-msgid "Added on"
-msgstr ""
-
-#: lib/cannery_web/components/ammo_group_card.ex:57
-#: lib/cannery_web/live/ammo_group_live/show.html.heex:30
#: lib/cannery_web/live/ammo_type_live/show.html.heex:123
#, elixir-autogen, elixir-format
msgid "Added on:"
@@ -884,17 +877,7 @@ msgstr ""
msgid "Show used"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:61
-#, elixir-autogen, elixir-format
-msgid "Used up on"
-msgstr ""
-
-#: lib/cannery_web/components/ammo_group_card.ex:63
-#, elixir-autogen, elixir-format
-msgid "Used up on:"
-msgstr ""
-
-#: lib/cannery_web/components/ammo_group_table_component.ex:195
+#: lib/cannery_web/components/ammo_group_table_component.ex:192
#: lib/cannery_web/live/ammo_group_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "%{percentage}%"
@@ -1081,12 +1064,12 @@ msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:39
-#: lib/cannery_web/components/ammo_group_table_component.ex:233
+#: lib/cannery_web/components/ammo_group_table_component.ex:230
#, elixir-autogen, elixir-format
msgid "Empty"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:86
+#: lib/cannery_web/components/ammo_group_table_component.ex:79
#, elixir-autogen, elixir-format
msgid "CPR"
msgstr ""
@@ -1096,7 +1079,7 @@ msgstr ""
msgid "CPR:"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:84
+#: lib/cannery_web/components/ammo_group_table_component.ex:77
#, elixir-autogen, elixir-format, fuzzy
msgid "Original Count"
msgstr ""
@@ -1120,3 +1103,30 @@ msgstr ""
#, elixir-autogen, elixir-format, fuzzy
msgid "Total rounds:"
msgstr ""
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:58
+#, elixir-autogen, elixir-format
+msgid "Last used on"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_card.ex:63
+#, elixir-autogen, elixir-format
+msgid "Last used on:"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:177
+#, elixir-autogen, elixir-format
+msgid "Never used"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:57
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
+#, elixir-autogen, elixir-format
+msgid "Purchased on"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_card.ex:57
+#: lib/cannery_web/live/ammo_group_live/show.html.heex:30
+#, elixir-autogen, elixir-format
+msgid "Purchased on:"
+msgstr ""
diff --git a/priv/gettext/es/LC_MESSAGES/errors.po b/priv/gettext/es/LC_MESSAGES/errors.po
index 27872009..1a5e6a1f 100644
--- a/priv/gettext/es/LC_MESSAGES/errors.po
+++ b/priv/gettext/es/LC_MESSAGES/errors.po
@@ -190,7 +190,7 @@ msgstr "Número inválido de copias, debe ser entre 1 y %{max}. Fue %{multiplier
msgid "Invalid multiplier"
msgstr "Multiplicador inválido"
-#: lib/cannery/ammo/ammo_group.ex:94
+#: lib/cannery/ammo/ammo_group.ex:96
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr ""
diff --git a/priv/gettext/es/LC_MESSAGES/prompts.po b/priv/gettext/es/LC_MESSAGES/prompts.po
index c1df6a1a..d2918fae 100644
--- a/priv/gettext/es/LC_MESSAGES/prompts.po
+++ b/priv/gettext/es/LC_MESSAGES/prompts.po
@@ -100,7 +100,7 @@ msgstr "Está seguro que desea eliminar %{name}?"
msgid "Are you sure you want to delete the invite for %{name}?"
msgstr "Está seguro que quiere eliminar la invitación para %{name}?"
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:132
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:131
#: lib/cannery_web/live/ammo_group_live/show.html.heex:75
#, elixir-autogen, elixir-format
msgid "Are you sure you want to delete this ammo?"
@@ -166,7 +166,7 @@ msgid "Register to setup %{name}"
msgstr "Regístrese para configurar %{name}"
#: lib/cannery_web/components/add_shot_group_component.html.heex:55
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:74
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:157
#: lib/cannery_web/live/container_live/form_component.html.heex:52
#: lib/cannery_web/live/invite_live/form_component.html.heex:33
@@ -255,7 +255,7 @@ msgstr ""
msgid "You'll need to"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:67
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:75
#, elixir-autogen, elixir-format
msgid "Creating..."
msgstr ""
diff --git a/priv/gettext/fr/LC_MESSAGES/actions.po b/priv/gettext/fr/LC_MESSAGES/actions.po
index 8212901d..4903c0dc 100644
--- a/priv/gettext/fr/LC_MESSAGES/actions.po
+++ b/priv/gettext/fr/LC_MESSAGES/actions.po
@@ -134,7 +134,7 @@ msgid "Reset password"
msgstr "Réinitialisé le mot de passe"
#: lib/cannery_web/components/add_shot_group_component.html.heex:53
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
#: lib/cannery_web/live/container_live/form_component.html.heex:50
#: lib/cannery_web/live/invite_live/form_component.html.heex:31
@@ -169,7 +169,7 @@ msgstr "Munition préparée"
msgid "Why not get some ready to shoot?"
msgstr "Pourquoi pas en préparer pour tirer ?"
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:80
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:79
#: lib/cannery_web/live/ammo_group_live/show.html.heex:101
#: lib/cannery_web/live/range_live/index.html.heex:38
#, elixir-autogen, elixir-format
@@ -201,7 +201,7 @@ msgstr "Copier dans le presse-papier"
msgid "add a container first"
msgstr "ajouter un conteneur en premier"
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:66
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:74
#, elixir-autogen, elixir-format
msgid "Create"
msgstr "Créer"
diff --git a/priv/gettext/fr/LC_MESSAGES/default.po b/priv/gettext/fr/LC_MESSAGES/default.po
index 76f9f19a..debe48fd 100644
--- a/priv/gettext/fr/LC_MESSAGES/default.po
+++ b/priv/gettext/fr/LC_MESSAGES/default.po
@@ -52,7 +52,7 @@ msgstr "Administrateur·ices :"
msgid "Ammo"
msgstr "Munition"
-#: lib/cannery_web/components/ammo_group_table_component.ex:96
+#: lib/cannery_web/components/ammo_group_table_component.ex:89
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:21
#, elixir-autogen, elixir-format
msgid "Ammo type"
@@ -104,9 +104,9 @@ msgstr "Cartouche"
msgid "Case material"
msgstr "Matériau de la caisse"
-#: lib/cannery_web/components/ammo_group_table_component.ex:72
+#: lib/cannery_web/components/ammo_group_table_component.ex:65
#: 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/form_component.html.heex:56
#, elixir-autogen, elixir-format
msgid "Container"
msgstr "Conteneur"
@@ -125,7 +125,7 @@ msgstr "Conteneurs"
msgid "Corrosive"
msgstr "Corrosive"
-#: lib/cannery_web/components/ammo_group_table_component.ex:83
+#: lib/cannery_web/components/ammo_group_table_component.ex:76
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:27
#, elixir-autogen, elixir-format
msgid "Count"
@@ -322,8 +322,8 @@ msgid "No tags"
msgstr "Aucun tag"
#: lib/cannery_web/components/add_shot_group_component.html.heex:37
-#: lib/cannery_web/components/ammo_group_table_component.ex:88
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
+#: lib/cannery_web/components/ammo_group_table_component.ex:81
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49
#: lib/cannery_web/live/ammo_group_live/show.ex:93
#: lib/cannery_web/live/range_live/form_component.html.heex:29
#: lib/cannery_web/live/range_live/index.ex:82
@@ -348,7 +348,7 @@ msgstr "Sur l’étagère"
msgid "Pressure"
msgstr "Pression"
-#: lib/cannery_web/components/ammo_group_table_component.ex:85
+#: lib/cannery_web/components/ammo_group_table_component.ex:78
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Price paid"
@@ -477,7 +477,7 @@ msgstr "Vos données restent avec vous, point final"
msgid "No tags for this container"
msgstr "Aucun tag pour ce conteneur"
-#: lib/cannery_web/components/ammo_group_table_component.ex:79
+#: lib/cannery_web/components/ammo_group_table_component.ex:72
#: lib/cannery_web/components/topbar.ex:81
#, elixir-autogen, elixir-format
msgid "Range"
@@ -488,6 +488,7 @@ msgstr "Portée"
msgid "Range day"
msgstr "Journée de stand"
+#: lib/cannery_web/components/add_shot_group_component.html.heex:45
#: lib/cannery_web/live/ammo_group_live/show.ex:94
#: lib/cannery_web/live/range_live/index.ex:83
#, elixir-autogen, elixir-format
@@ -515,7 +516,6 @@ msgstr "Tirs enregistrés"
msgid "Ammo groups"
msgstr "Groupes de munition"
-#: lib/cannery_web/components/add_shot_group_component.html.heex:45
#: lib/cannery_web/live/range_live/form_component.html.heex:36
#, elixir-autogen, elixir-format
msgid "Date (UTC)"
@@ -560,7 +560,7 @@ msgstr "Enregistrements de tir"
msgid "Move Ammo group"
msgstr "Déplacer le groupe de munition"
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:97
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:96
#, elixir-autogen, elixir-format
msgid "Move ammo"
msgstr "Déplacer munition"
@@ -577,8 +577,8 @@ msgstr "Évènements de tir"
#: lib/cannery_web/components/ammo_group_card.ex:71
#: lib/cannery_web/components/ammo_group_card.ex:78
-#: lib/cannery_web/components/ammo_group_table_component.ex:159
-#: lib/cannery_web/components/ammo_group_table_component.ex:227
+#: lib/cannery_web/components/ammo_group_table_component.ex:152
+#: lib/cannery_web/components/ammo_group_table_component.ex:224
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
#: lib/cannery_web/live/ammo_type_live/index.ex:179
@@ -638,12 +638,12 @@ msgstr "Mot de passe actuel"
msgid "New password"
msgstr "Nouveau mot de passe"
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
#, elixir-autogen, elixir-format
msgid "Stage"
msgstr "Sélectionné"
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
#, elixir-autogen, elixir-format
msgid "Unstage"
msgstr "Désélectionner"
@@ -683,14 +683,14 @@ msgstr "Éditer les tags de %{name}"
msgid "Rounds:"
msgstr "Cartouches :"
-#: lib/cannery_web/components/ammo_group_table_component.ex:224
+#: lib/cannery_web/components/ammo_group_table_component.ex:221
#: lib/cannery_web/live/ammo_type_live/index.ex:178
#: lib/cannery_web/live/ammo_type_live/show.html.heex:142
#, elixir-autogen, elixir-format
msgid "No cost information"
msgstr "Aucune information de prix"
-#: lib/cannery_web/components/ammo_group_table_component.ex:87
+#: lib/cannery_web/components/ammo_group_table_component.ex:80
#, elixir-autogen, elixir-format
msgid "% left"
msgstr "% restante"
@@ -751,7 +751,7 @@ msgstr "Réinitialiser votre mot de passe"
msgid "Record Shots"
msgstr "Enregistrer des tirs"
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:58
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:66
#, elixir-autogen, elixir-format
msgid "Copies"
msgstr "Exemplaires"
@@ -761,13 +761,6 @@ msgstr "Exemplaires"
msgid "Ammo types"
msgstr "Types de munition"
-#: lib/cannery_web/components/ammo_group_table_component.ex:66
-#, elixir-autogen, elixir-format
-msgid "Added on"
-msgstr "Ajouté le"
-
-#: lib/cannery_web/components/ammo_group_card.ex:57
-#: lib/cannery_web/live/ammo_group_live/show.html.heex:30
#: lib/cannery_web/live/ammo_type_live/show.html.heex:123
#, elixir-autogen, elixir-format
msgid "Added on:"
@@ -889,17 +882,7 @@ msgstr "Conteneur"
msgid "Show used"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:61
-#, elixir-autogen, elixir-format
-msgid "Used up on"
-msgstr ""
-
-#: lib/cannery_web/components/ammo_group_card.ex:63
-#, elixir-autogen, elixir-format
-msgid "Used up on:"
-msgstr ""
-
-#: lib/cannery_web/components/ammo_group_table_component.ex:195
+#: lib/cannery_web/components/ammo_group_table_component.ex:192
#: lib/cannery_web/live/ammo_group_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "%{percentage}%"
@@ -1086,12 +1069,12 @@ msgid "Edit %{ammo_type_name}"
msgstr "Éditer %{name}"
#: lib/cannery_web/components/ammo_group_card.ex:39
-#: lib/cannery_web/components/ammo_group_table_component.ex:233
+#: lib/cannery_web/components/ammo_group_table_component.ex:230
#, elixir-autogen, elixir-format
msgid "Empty"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:86
+#: lib/cannery_web/components/ammo_group_table_component.ex:79
#, elixir-autogen, elixir-format
msgid "CPR"
msgstr ""
@@ -1101,7 +1084,7 @@ msgstr ""
msgid "CPR:"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:84
+#: lib/cannery_web/components/ammo_group_table_component.ex:77
#, elixir-autogen, elixir-format, fuzzy
msgid "Original Count"
msgstr "Nombre original :"
@@ -1125,3 +1108,30 @@ msgstr ""
#, elixir-autogen, elixir-format, fuzzy
msgid "Total rounds:"
msgstr "Nombre totale de cartouches tirées :"
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:58
+#, elixir-autogen, elixir-format
+msgid "Last used on"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_card.ex:63
+#, elixir-autogen, elixir-format
+msgid "Last used on:"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:177
+#, elixir-autogen, elixir-format
+msgid "Never used"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:57
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
+#, elixir-autogen, elixir-format
+msgid "Purchased on"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_card.ex:57
+#: lib/cannery_web/live/ammo_group_live/show.html.heex:30
+#, elixir-autogen, elixir-format
+msgid "Purchased on:"
+msgstr ""
diff --git a/priv/gettext/fr/LC_MESSAGES/errors.po b/priv/gettext/fr/LC_MESSAGES/errors.po
index 30b3ba1e..507c0df4 100644
--- a/priv/gettext/fr/LC_MESSAGES/errors.po
+++ b/priv/gettext/fr/LC_MESSAGES/errors.po
@@ -191,7 +191,7 @@ msgstr "Nombre de copies invalide, doit être 1 et %{max}. Été %{multiplier}"
msgid "Invalid multiplier"
msgstr "Multiplicateur invalide"
-#: lib/cannery/ammo/ammo_group.ex:94
+#: lib/cannery/ammo/ammo_group.ex:96
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr "Veuillez choisir un type de munitions et un conteneur"
diff --git a/priv/gettext/fr/LC_MESSAGES/prompts.po b/priv/gettext/fr/LC_MESSAGES/prompts.po
index 04552408..5aedba98 100644
--- a/priv/gettext/fr/LC_MESSAGES/prompts.po
+++ b/priv/gettext/fr/LC_MESSAGES/prompts.po
@@ -101,7 +101,7 @@ msgstr "Êtes-vous certain·e de supprimer %{name} ?"
msgid "Are you sure you want to delete the invite for %{name}?"
msgstr "Êtes-vous certain·e de supprimer l’invitation pour %{name} ?"
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:132
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:131
#: lib/cannery_web/live/ammo_group_live/show.html.heex:75
#, elixir-autogen, elixir-format
msgid "Are you sure you want to delete this ammo?"
@@ -167,7 +167,7 @@ msgid "Register to setup %{name}"
msgstr "S’enregistrer pour mettre en place %{name}"
#: lib/cannery_web/components/add_shot_group_component.html.heex:55
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:74
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:157
#: lib/cannery_web/live/container_live/form_component.html.heex:52
#: lib/cannery_web/live/invite_live/form_component.html.heex:33
@@ -257,7 +257,7 @@ msgstr "%{name} retiré avec succès"
msgid "You'll need to"
msgstr "Vous aurez besoin de"
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:67
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:75
#, elixir-autogen, elixir-format
msgid "Creating..."
msgstr "Création en cours…"
diff --git a/priv/gettext/ga/LC_MESSAGES/actions.po b/priv/gettext/ga/LC_MESSAGES/actions.po
index a8694edf..1aabbe08 100644
--- a/priv/gettext/ga/LC_MESSAGES/actions.po
+++ b/priv/gettext/ga/LC_MESSAGES/actions.po
@@ -132,7 +132,7 @@ msgid "Reset password"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:53
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
#: lib/cannery_web/live/container_live/form_component.html.heex:50
#: lib/cannery_web/live/invite_live/form_component.html.heex:31
@@ -167,7 +167,7 @@ msgstr ""
msgid "Why not get some ready to shoot?"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:80
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:79
#: lib/cannery_web/live/ammo_group_live/show.html.heex:101
#: lib/cannery_web/live/range_live/index.html.heex:38
#, elixir-autogen, elixir-format
@@ -199,7 +199,7 @@ msgstr ""
msgid "add a container first"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:66
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:74
#, elixir-autogen, elixir-format
msgid "Create"
msgstr ""
diff --git a/priv/gettext/ga/LC_MESSAGES/default.po b/priv/gettext/ga/LC_MESSAGES/default.po
index 7940c23d..5a2ace77 100644
--- a/priv/gettext/ga/LC_MESSAGES/default.po
+++ b/priv/gettext/ga/LC_MESSAGES/default.po
@@ -48,7 +48,7 @@ msgstr ""
msgid "Ammo"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:96
+#: lib/cannery_web/components/ammo_group_table_component.ex:89
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:21
#, elixir-autogen, elixir-format
msgid "Ammo type"
@@ -100,9 +100,9 @@ msgstr ""
msgid "Case material"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:72
+#: lib/cannery_web/components/ammo_group_table_component.ex:65
#: 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/form_component.html.heex:56
#, elixir-autogen, elixir-format
msgid "Container"
msgstr ""
@@ -121,7 +121,7 @@ msgstr ""
msgid "Corrosive"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:83
+#: lib/cannery_web/components/ammo_group_table_component.ex:76
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:27
#, elixir-autogen, elixir-format
msgid "Count"
@@ -318,8 +318,8 @@ msgid "No tags"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:37
-#: lib/cannery_web/components/ammo_group_table_component.ex:88
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
+#: lib/cannery_web/components/ammo_group_table_component.ex:81
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49
#: lib/cannery_web/live/ammo_group_live/show.ex:93
#: lib/cannery_web/live/range_live/form_component.html.heex:29
#: lib/cannery_web/live/range_live/index.ex:82
@@ -344,7 +344,7 @@ msgstr ""
msgid "Pressure"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:85
+#: lib/cannery_web/components/ammo_group_table_component.ex:78
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Price paid"
@@ -469,7 +469,7 @@ msgstr ""
msgid "No tags for this container"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:79
+#: lib/cannery_web/components/ammo_group_table_component.ex:72
#: lib/cannery_web/components/topbar.ex:81
#, elixir-autogen, elixir-format
msgid "Range"
@@ -480,6 +480,7 @@ msgstr ""
msgid "Range day"
msgstr ""
+#: lib/cannery_web/components/add_shot_group_component.html.heex:45
#: lib/cannery_web/live/ammo_group_live/show.ex:94
#: lib/cannery_web/live/range_live/index.ex:83
#, elixir-autogen, elixir-format
@@ -507,7 +508,6 @@ msgstr ""
msgid "Ammo groups"
msgstr ""
-#: lib/cannery_web/components/add_shot_group_component.html.heex:45
#: lib/cannery_web/live/range_live/form_component.html.heex:36
#, elixir-autogen, elixir-format
msgid "Date (UTC)"
@@ -552,7 +552,7 @@ msgstr ""
msgid "Move Ammo group"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:97
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:96
#, elixir-autogen, elixir-format
msgid "Move ammo"
msgstr ""
@@ -569,8 +569,8 @@ msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:71
#: lib/cannery_web/components/ammo_group_card.ex:78
-#: lib/cannery_web/components/ammo_group_table_component.ex:159
-#: lib/cannery_web/components/ammo_group_table_component.ex:227
+#: lib/cannery_web/components/ammo_group_table_component.ex:152
+#: lib/cannery_web/components/ammo_group_table_component.ex:224
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
#: lib/cannery_web/live/ammo_type_live/index.ex:179
@@ -630,12 +630,12 @@ msgstr ""
msgid "New password"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
#, elixir-autogen, elixir-format
msgid "Stage"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:73
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
#, elixir-autogen, elixir-format
msgid "Unstage"
msgstr ""
@@ -675,14 +675,14 @@ msgstr ""
msgid "Rounds:"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:224
+#: lib/cannery_web/components/ammo_group_table_component.ex:221
#: lib/cannery_web/live/ammo_type_live/index.ex:178
#: lib/cannery_web/live/ammo_type_live/show.html.heex:142
#, elixir-autogen, elixir-format
msgid "No cost information"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:87
+#: lib/cannery_web/components/ammo_group_table_component.ex:80
#, elixir-autogen, elixir-format
msgid "% left"
msgstr ""
@@ -743,7 +743,7 @@ msgstr ""
msgid "Record Shots"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:58
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:66
#, elixir-autogen, elixir-format
msgid "Copies"
msgstr ""
@@ -753,13 +753,6 @@ msgstr ""
msgid "Ammo types"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:66
-#, elixir-autogen, elixir-format
-msgid "Added on"
-msgstr ""
-
-#: lib/cannery_web/components/ammo_group_card.ex:57
-#: lib/cannery_web/live/ammo_group_live/show.html.heex:30
#: lib/cannery_web/live/ammo_type_live/show.html.heex:123
#, elixir-autogen, elixir-format
msgid "Added on:"
@@ -880,17 +873,7 @@ msgstr ""
msgid "Show used"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:61
-#, elixir-autogen, elixir-format
-msgid "Used up on"
-msgstr ""
-
-#: lib/cannery_web/components/ammo_group_card.ex:63
-#, elixir-autogen, elixir-format
-msgid "Used up on:"
-msgstr ""
-
-#: lib/cannery_web/components/ammo_group_table_component.ex:195
+#: lib/cannery_web/components/ammo_group_table_component.ex:192
#: lib/cannery_web/live/ammo_group_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "%{percentage}%"
@@ -1077,12 +1060,12 @@ msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:39
-#: lib/cannery_web/components/ammo_group_table_component.ex:233
+#: lib/cannery_web/components/ammo_group_table_component.ex:230
#, elixir-autogen, elixir-format
msgid "Empty"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:86
+#: lib/cannery_web/components/ammo_group_table_component.ex:79
#, elixir-autogen, elixir-format
msgid "CPR"
msgstr ""
@@ -1092,7 +1075,7 @@ msgstr ""
msgid "CPR:"
msgstr ""
-#: lib/cannery_web/components/ammo_group_table_component.ex:84
+#: lib/cannery_web/components/ammo_group_table_component.ex:77
#, elixir-autogen, elixir-format, fuzzy
msgid "Original Count"
msgstr ""
@@ -1116,3 +1099,30 @@ msgstr ""
#, elixir-autogen, elixir-format, fuzzy
msgid "Total rounds:"
msgstr ""
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:58
+#, elixir-autogen, elixir-format
+msgid "Last used on"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_card.ex:63
+#, elixir-autogen, elixir-format
+msgid "Last used on:"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:177
+#, elixir-autogen, elixir-format
+msgid "Never used"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_table_component.ex:57
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
+#, elixir-autogen, elixir-format
+msgid "Purchased on"
+msgstr ""
+
+#: lib/cannery_web/components/ammo_group_card.ex:57
+#: lib/cannery_web/live/ammo_group_live/show.html.heex:30
+#, elixir-autogen, elixir-format
+msgid "Purchased on:"
+msgstr ""
diff --git a/priv/gettext/ga/LC_MESSAGES/errors.po b/priv/gettext/ga/LC_MESSAGES/errors.po
index fcd05d90..97a1554d 100644
--- a/priv/gettext/ga/LC_MESSAGES/errors.po
+++ b/priv/gettext/ga/LC_MESSAGES/errors.po
@@ -190,7 +190,7 @@ msgstr ""
msgid "Invalid multiplier"
msgstr ""
-#: lib/cannery/ammo/ammo_group.ex:94
+#: lib/cannery/ammo/ammo_group.ex:96
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr ""
diff --git a/priv/gettext/ga/LC_MESSAGES/prompts.po b/priv/gettext/ga/LC_MESSAGES/prompts.po
index d32b4c19..54fb8539 100644
--- a/priv/gettext/ga/LC_MESSAGES/prompts.po
+++ b/priv/gettext/ga/LC_MESSAGES/prompts.po
@@ -96,7 +96,7 @@ msgstr ""
msgid "Are you sure you want to delete the invite for %{name}?"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:132
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:131
#: lib/cannery_web/live/ammo_group_live/show.html.heex:75
#, elixir-autogen, elixir-format
msgid "Are you sure you want to delete this ammo?"
@@ -158,7 +158,7 @@ msgid "Register to setup %{name}"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:55
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:74
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:157
#: lib/cannery_web/live/container_live/form_component.html.heex:52
#: lib/cannery_web/live/invite_live/form_component.html.heex:33
@@ -246,7 +246,7 @@ msgstr ""
msgid "You'll need to"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:67
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:75
#, elixir-autogen, elixir-format
msgid "Creating..."
msgstr ""
diff --git a/priv/gettext/prompts.pot b/priv/gettext/prompts.pot
index a9616cdb..27747c6c 100644
--- a/priv/gettext/prompts.pot
+++ b/priv/gettext/prompts.pot
@@ -85,7 +85,7 @@ msgstr ""
msgid "Are you sure you want to delete the invite for %{name}?"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/index.html.heex:132
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:131
#: lib/cannery_web/live/ammo_group_live/show.html.heex:75
#, elixir-autogen, elixir-format
msgid "Are you sure you want to delete this ammo?"
@@ -147,7 +147,7 @@ msgid "Register to setup %{name}"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:55
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:74
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:157
#: lib/cannery_web/live/container_live/form_component.html.heex:52
#: lib/cannery_web/live/invite_live/form_component.html.heex:33
@@ -235,7 +235,7 @@ msgstr ""
msgid "You'll need to"
msgstr ""
-#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:67
+#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:75
#, elixir-autogen, elixir-format
msgid "Creating..."
msgstr ""
diff --git a/priv/repo/migrations/20221119192131_add_purchase_date_to_ammo_group.exs b/priv/repo/migrations/20221119192131_add_purchase_date_to_ammo_group.exs
new file mode 100644
index 00000000..2102c187
--- /dev/null
+++ b/priv/repo/migrations/20221119192131_add_purchase_date_to_ammo_group.exs
@@ -0,0 +1,19 @@
+defmodule Cannery.Repo.Migrations.AddPurchaseDateToAmmoGroup do
+ use Ecto.Migration
+
+ def up do
+ alter table(:ammo_groups) do
+ add :purchased_on, :date
+ end
+
+ flush()
+
+ execute("UPDATE ammo_groups SET purchased_on = inserted_at::DATE WHERE purchased_on IS NULL")
+ end
+
+ def down do
+ alter table(:ammo_groups) do
+ remove :purchased_on
+ end
+ end
+end
diff --git a/test/cannery/ammo_test.exs b/test/cannery/ammo_test.exs
index e7117688..9b316ed3 100644
--- a/test/cannery/ammo_test.exs
+++ b/test/cannery/ammo_test.exs
@@ -224,9 +224,22 @@ defmodule Cannery.AmmoTest do
end
describe "ammo_groups" do
- @valid_attrs %{"count" => 42, "notes" => "some notes", "price_paid" => 120.5}
- @update_attrs %{"count" => 43, "notes" => "some updated notes", "price_paid" => 456.7}
- @invalid_attrs %{"count" => nil, "notes" => nil, "price_paid" => nil}
+ @valid_attrs %{
+ "count" => 42,
+ "notes" => "some notes",
+ "price_paid" => 120.5,
+ "purchased_on" => ~D[2022-11-19]
+ }
+ @update_attrs %{
+ "count" => 43,
+ "notes" => "some updated notes",
+ "price_paid" => 456.7
+ }
+ @invalid_attrs %{
+ "count" => nil,
+ "notes" => nil,
+ "price_paid" => nil
+ }
setup do
current_user = user_fixture()
diff --git a/test/support/fixtures.ex b/test/support/fixtures.ex
index f3fac63c..80ddfa9f 100644
--- a/test/support/fixtures.ex
+++ b/test/support/fixtures.ex
@@ -133,7 +133,8 @@ defmodule Cannery.Fixtures do
|> Enum.into(%{
"ammo_type_id" => ammo_type_id,
"container_id" => container_id,
- "count" => 20
+ "count" => 20,
+ "purchased_on" => Date.utc_today()
})
|> Ammo.create_ammo_groups(multiplier, user)
|> unwrap_ok_tuple()