add more ammo type fields, filter index columns
This commit is contained in:
parent
f30acd7fe2
commit
2ac379adaf
@ -23,6 +23,10 @@ defmodule Cannery.Ammo.AmmoType do
|
|||||||
field :cartridge, :string
|
field :cartridge, :string
|
||||||
field :caliber, :string
|
field :caliber, :string
|
||||||
field :case_material, :string
|
field :case_material, :string
|
||||||
|
field :jacket_type, :string
|
||||||
|
field :muzzle_velocity, :integer
|
||||||
|
field :powder_type, :string
|
||||||
|
field :powder_grains_per_charge, :integer
|
||||||
field :grains, :integer
|
field :grains, :integer
|
||||||
field :pressure, :string
|
field :pressure, :string
|
||||||
field :primer_type, :string
|
field :primer_type, :string
|
||||||
@ -33,7 +37,7 @@ defmodule Cannery.Ammo.AmmoType do
|
|||||||
field :corrosive, :boolean, null: false, default: false
|
field :corrosive, :boolean, null: false, default: false
|
||||||
|
|
||||||
field :manufacturer, :string
|
field :manufacturer, :string
|
||||||
field :sku, :string
|
field :upc, :string
|
||||||
|
|
||||||
belongs_to :user, User
|
belongs_to :user, User
|
||||||
|
|
||||||
@ -51,6 +55,10 @@ defmodule Cannery.Ammo.AmmoType do
|
|||||||
cartridge: String.t() | nil,
|
cartridge: String.t() | nil,
|
||||||
caliber: String.t() | nil,
|
caliber: String.t() | nil,
|
||||||
case_material: String.t() | nil,
|
case_material: String.t() | nil,
|
||||||
|
jacket_type: String.t() | nil,
|
||||||
|
muzzle_velocity: integer() | nil,
|
||||||
|
powder_type: String.t() | nil,
|
||||||
|
powder_grains_per_charge: integer() | nil,
|
||||||
grains: integer() | nil,
|
grains: integer() | nil,
|
||||||
pressure: String.t() | nil,
|
pressure: String.t() | nil,
|
||||||
primer_type: String.t() | nil,
|
primer_type: String.t() | nil,
|
||||||
@ -60,7 +68,7 @@ defmodule Cannery.Ammo.AmmoType do
|
|||||||
blank: boolean(),
|
blank: boolean(),
|
||||||
corrosive: boolean(),
|
corrosive: boolean(),
|
||||||
manufacturer: String.t() | nil,
|
manufacturer: String.t() | nil,
|
||||||
sku: String.t() | nil,
|
upc: String.t() | nil,
|
||||||
user_id: User.id(),
|
user_id: User.id(),
|
||||||
user: User.t() | nil,
|
user: User.t() | nil,
|
||||||
ammo_groups: [AmmoGroup.t()] | nil,
|
ammo_groups: [AmmoGroup.t()] | nil,
|
||||||
@ -80,6 +88,10 @@ defmodule Cannery.Ammo.AmmoType do
|
|||||||
:cartridge,
|
:cartridge,
|
||||||
:caliber,
|
:caliber,
|
||||||
:case_material,
|
:case_material,
|
||||||
|
:jacket_type,
|
||||||
|
:muzzle_velocity,
|
||||||
|
:powder_type,
|
||||||
|
:powder_grains_per_charge,
|
||||||
:grains,
|
:grains,
|
||||||
:pressure,
|
:pressure,
|
||||||
:primer_type,
|
:primer_type,
|
||||||
@ -89,7 +101,7 @@ defmodule Cannery.Ammo.AmmoType do
|
|||||||
:blank,
|
:blank,
|
||||||
:corrosive,
|
:corrosive,
|
||||||
:manufacturer,
|
:manufacturer,
|
||||||
:sku
|
:upc
|
||||||
]
|
]
|
||||||
|
|
||||||
@doc false
|
@doc false
|
||||||
|
@ -38,7 +38,8 @@ defmodule CanneryWeb.Components.AmmoGroupCard do
|
|||||||
|
|
||||||
<%= if @ammo_group.price_paid do %>
|
<%= if @ammo_group.price_paid do %>
|
||||||
<span class="rounded-lg title text-lg">
|
<span class="rounded-lg title text-lg">
|
||||||
<%= gettext("Price paid:") %> <%= gettext("$%{amount}", amount: @ammo_group.price_paid |> :erlang.float_to_binary(decimals: 2)) %>
|
<%= gettext("Price paid:") %>
|
||||||
|
<%= gettext("$%{amount}", amount: @ammo_group.price_paid |> :erlang.float_to_binary(decimals: 2)) %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
|
|
||||||
<%= if @ammo_group.price_paid do %>
|
<%= if @ammo_group.price_paid do %>
|
||||||
<span class="rounded-lg title text-lg">
|
<span class="rounded-lg title text-lg">
|
||||||
<%= gettext("Price paid:") %> <%= gettext("$%{amount}", amount: @ammo_group.price_paid |> :erlang.float_to_binary(decimals: 2)) %>
|
<%= gettext("Price paid:") %>
|
||||||
|
<%= gettext("$%{amount}", amount: @ammo_group.price_paid |> :erlang.float_to_binary(decimals: 2)) %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -69,6 +69,40 @@
|
|||||||
) %>
|
) %>
|
||||||
<%= error_tag(f, :case_material, "col-span-3 text-center") %>
|
<%= error_tag(f, :case_material, "col-span-3 text-center") %>
|
||||||
|
|
||||||
|
<%= label(f, :jacket_type, gettext("Jacket type"), class: "mr-4 title text-lg text-primary-500") %>
|
||||||
|
<%= text_input(f, :jacket_type,
|
||||||
|
class: "text-center col-span-2 input input-primary",
|
||||||
|
placeholder: gettext("Bimetal")
|
||||||
|
) %>
|
||||||
|
<%= error_tag(f, :case_material, "col-span-3 text-center") %>
|
||||||
|
|
||||||
|
<%= label(f, :muzzle_velocity, gettext("Muzzle velocity"),
|
||||||
|
class: "mr-4 title text-lg text-primary-500"
|
||||||
|
) %>
|
||||||
|
<%= number_input(f, :muzzle_velocity,
|
||||||
|
step: "1",
|
||||||
|
class: "text-center col-span-2 input input-primary",
|
||||||
|
min: 1
|
||||||
|
) %>
|
||||||
|
<%= error_tag(f, :muzzle_velocity, "col-span-3 text-center") %>
|
||||||
|
|
||||||
|
<%= label(f, :powder_type, gettext("Powder type"), class: "mr-4 title text-lg text-primary-500") %>
|
||||||
|
<%= text_input(f, :powder_type,
|
||||||
|
class: "text-center col-span-2 input input-primary",
|
||||||
|
placeholder: gettext("Brass")
|
||||||
|
) %>
|
||||||
|
<%= error_tag(f, :powder_type, "col-span-3 text-center") %>
|
||||||
|
|
||||||
|
<%= label(f, :powder_grains_per_charge, gettext("Powder grains per charge"),
|
||||||
|
class: "mr-4 title text-lg text-primary-500"
|
||||||
|
) %>
|
||||||
|
<%= number_input(f, :powder_grains_per_charge,
|
||||||
|
step: "1",
|
||||||
|
class: "text-center col-span-2 input input-primary",
|
||||||
|
min: 1
|
||||||
|
) %>
|
||||||
|
<%= error_tag(f, :powder_grains_per_charge, "col-span-3 text-center") %>
|
||||||
|
|
||||||
<%= label(f, :grains, gettext("Grains"), class: "mr-4 title text-lg text-primary-500") %>
|
<%= label(f, :grains, gettext("Grains"), class: "mr-4 title text-lg text-primary-500") %>
|
||||||
<%= number_input(f, :grains,
|
<%= number_input(f, :grains,
|
||||||
step: "1",
|
step: "1",
|
||||||
@ -115,9 +149,9 @@
|
|||||||
<%= text_input(f, :manufacturer, class: "text-center col-span-2 input input-primary") %>
|
<%= text_input(f, :manufacturer, class: "text-center col-span-2 input input-primary") %>
|
||||||
<%= error_tag(f, :manufacturer, "col-span-3 text-center") %>
|
<%= error_tag(f, :manufacturer, "col-span-3 text-center") %>
|
||||||
|
|
||||||
<%= label(f, :sku, gettext("SKU"), class: "mr-4 title text-lg text-primary-500") %>
|
<%= label(f, :upc, gettext("UPC"), class: "mr-4 title text-lg text-primary-500") %>
|
||||||
<%= text_input(f, :sku, class: "text-center col-span-2 input input-primary") %>
|
<%= text_input(f, :upc, class: "text-center col-span-2 input input-primary") %>
|
||||||
<%= error_tag(f, :sku, "col-span-3 text-center") %>
|
<%= error_tag(f, :upc, "col-span-3 text-center") %>
|
||||||
|
|
||||||
<%= submit(dgettext("actions", "Save"),
|
<%= submit(dgettext("actions", "Save"),
|
||||||
phx_disable_with: dgettext("prompts", "Saving..."),
|
phx_disable_with: dgettext("prompts", "Saving..."),
|
||||||
|
@ -44,6 +44,36 @@ defmodule CanneryWeb.AmmoTypeLive.Index do
|
|||||||
end
|
end
|
||||||
|
|
||||||
defp list_ammo_types(%{assigns: %{current_user: current_user}} = socket) do
|
defp list_ammo_types(%{assigns: %{current_user: current_user}} = socket) do
|
||||||
socket |> assign(:ammo_types, Ammo.list_ammo_types(current_user))
|
ammo_types = Ammo.list_ammo_types(current_user)
|
||||||
|
|
||||||
|
columns_to_display =
|
||||||
|
[
|
||||||
|
{gettext("Name"), :name, :string},
|
||||||
|
{gettext("Bullet type"), :bullet_type, :string},
|
||||||
|
{gettext("Bullet core"), :bullet_core, :string},
|
||||||
|
{gettext("Cartridge"), :cartridge, :string},
|
||||||
|
{gettext("Caliber"), :caliber, :string},
|
||||||
|
{gettext("Case material"), :case_material, :string},
|
||||||
|
{gettext("Jacket type"), :jacket_type, :string},
|
||||||
|
{gettext("Muzzle velocity"), :muzzle_velocity, :string},
|
||||||
|
{gettext("Powder type"), :powder_type, :string},
|
||||||
|
{gettext("Powder grains per charge"), :powder_grains_per_charge, :string},
|
||||||
|
{gettext("Grains"), :grains, :string},
|
||||||
|
{gettext("Pressure"), :pressure, :string},
|
||||||
|
{gettext("Primer type"), :primer_type, :string},
|
||||||
|
{gettext("Rimfire"), :rimfire, :boolean},
|
||||||
|
{gettext("Tracer"), :tracer, :boolean},
|
||||||
|
{gettext("Incendiary"), :incendiary, :boolean},
|
||||||
|
{gettext("Blank"), :blank, :boolean},
|
||||||
|
{gettext("Corrosive"), :corrosive, :boolean},
|
||||||
|
{gettext("Manufacturer"), :manufacturer, :string},
|
||||||
|
{gettext("UPC"), :upc, :string}
|
||||||
|
]
|
||||||
|
# filter columns to only used ones
|
||||||
|
|> Enum.filter(fn {_label, field, _type} ->
|
||||||
|
ammo_types |> Enum.any?(fn ammo_type -> not (ammo_type |> Map.get(field) |> is_nil()) end)
|
||||||
|
end)
|
||||||
|
|
||||||
|
socket |> assign(ammo_types: ammo_types, columns_to_display: columns_to_display)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -22,24 +22,7 @@
|
|||||||
<table class="min-w-full table-auto text-center bg-white">
|
<table class="min-w-full table-auto text-center bg-white">
|
||||||
<thead class="border-b border-primary-600">
|
<thead class="border-b border-primary-600">
|
||||||
<tr>
|
<tr>
|
||||||
<%= for field_name <- [
|
<%= for {field_name, _field, _type} <- @columns_to_display do %>
|
||||||
gettext("Name"),
|
|
||||||
gettext("Bullet type"),
|
|
||||||
gettext("Bullet core"),
|
|
||||||
gettext("Cartridge"),
|
|
||||||
gettext("Caliber"),
|
|
||||||
gettext("Case material"),
|
|
||||||
gettext("Grains"),
|
|
||||||
gettext("Pressure"),
|
|
||||||
gettext("Primer type"),
|
|
||||||
gettext("Rimfire"),
|
|
||||||
gettext("Tracer"),
|
|
||||||
gettext("Incendiary"),
|
|
||||||
gettext("Blank"),
|
|
||||||
gettext("Corrosive"),
|
|
||||||
gettext("Manufacturer"),
|
|
||||||
gettext("Sku")
|
|
||||||
] do %>
|
|
||||||
<th class="p-2">
|
<th class="p-2">
|
||||||
<%= field_name %>
|
<%= field_name %>
|
||||||
</th>
|
</th>
|
||||||
@ -51,37 +34,14 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<%= for ammo_type <- @ammo_types do %>
|
<%= for ammo_type <- @ammo_types do %>
|
||||||
<tr id={"ammo_type-#{ammo_type.id}"}>
|
<tr id={"ammo_type-#{ammo_type.id}"}>
|
||||||
<%= for field <- [
|
<%= for {_label, field, type} <- @columns_to_display do %>
|
||||||
:name,
|
|
||||||
:bullet_type,
|
|
||||||
:bullet_core,
|
|
||||||
:cartridge,
|
|
||||||
:caliber,
|
|
||||||
:case_material,
|
|
||||||
:grains,
|
|
||||||
:pressure,
|
|
||||||
:primer_type
|
|
||||||
] do %>
|
|
||||||
<td class="p-2">
|
|
||||||
<%= ammo_type |> Map.get(field) %>
|
|
||||||
</td>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= for field <- [
|
|
||||||
:rimfire,
|
|
||||||
:tracer,
|
|
||||||
:incendiary,
|
|
||||||
:blank,
|
|
||||||
:corrosive
|
|
||||||
] do %>
|
|
||||||
<td class="p-2">
|
<td class="p-2">
|
||||||
|
<%= case type do %>
|
||||||
|
<% :boolean -> %>
|
||||||
<%= ammo_type |> Map.get(field) |> humanize() %>
|
<%= ammo_type |> Map.get(field) |> humanize() %>
|
||||||
</td>
|
<% _other -> %>
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= for field <- [:manufacturer, :sku] do %>
|
|
||||||
<td class="p-2">
|
|
||||||
<%= ammo_type |> Map.get(field) %>
|
<%= ammo_type |> Map.get(field) %>
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
@ -38,6 +38,10 @@
|
|||||||
{gettext("Cartridge"), :cartridge},
|
{gettext("Cartridge"), :cartridge},
|
||||||
{gettext("Caliber"), :caliber},
|
{gettext("Caliber"), :caliber},
|
||||||
{gettext("Case material"), :case_material},
|
{gettext("Case material"), :case_material},
|
||||||
|
{gettext("Jacket type"), :jacket_type},
|
||||||
|
{gettext("Muzzle velocity"), :muzzle_velocity},
|
||||||
|
{gettext("Powder type"), :powder_type},
|
||||||
|
{gettext("Powder grains per charge"), :powder_grains_per_charge},
|
||||||
{gettext("Grains"), :grains},
|
{gettext("Grains"), :grains},
|
||||||
{gettext("Pressure"), :pressure},
|
{gettext("Pressure"), :pressure},
|
||||||
{gettext("Primer type"), :primer_type}
|
{gettext("Primer type"), :primer_type}
|
||||||
@ -69,7 +73,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= for {field_name, field} <- [{"Manufacturer", :manufacturer}, {"Sku", :sku}] do %>
|
<%= for {field_name, field} <- [{"Manufacturer", :manufacturer}, {"UPC", :upc}] do %>
|
||||||
<%= if @ammo_type |> Map.get(field) do %>
|
<%= if @ammo_type |> Map.get(field) do %>
|
||||||
<h3 class="mb-2 sm:mr-4 title text-lg">
|
<h3 class="mb-2 sm:mr-4 title text-lg">
|
||||||
<%= field_name %> :
|
<%= field_name %> :
|
||||||
|
@ -126,7 +126,7 @@ msgstr ""
|
|||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:42
|
#: lib/cannery_web/components/add_shot_group_component.html.heex:42
|
||||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:54
|
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:54
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:122
|
#: 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/container_live/form_component.html.heex:50
|
||||||
#: lib/cannery_web/live/invite_live/form_component.html.heex:28
|
#: lib/cannery_web/live/invite_live/form_component.html.heex:28
|
||||||
#: lib/cannery_web/live/range_live/form_component.html.heex:40
|
#: lib/cannery_web/live/range_live/form_component.html.heex:40
|
||||||
@ -165,7 +165,7 @@ msgid "Record shots"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:27
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:28
|
||||||
msgid "Ammo Details"
|
msgid "Ammo Details"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ msgid "Add another container!"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:48
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:49
|
||||||
msgid "Move to different container"
|
msgid "Move to different container"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ msgid "Ammo type"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:86
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:90
|
||||||
msgid "Average Price paid"
|
msgid "Average Price paid"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -54,47 +54,48 @@ msgid "Background color"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:106
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:140
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:38
|
#: lib/cannery_web/live/ammo_type_live/index.ex:67
|
||||||
msgid "Blank"
|
msgid "Blank"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:92
|
||||||
msgid "Brass"
|
msgid "Brass"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:44
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:44
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:28
|
#: lib/cannery_web/live/ammo_type_live/index.ex:53
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:37
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:37
|
||||||
msgid "Bullet core"
|
msgid "Bullet core"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:37
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:37
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:27
|
#: lib/cannery_web/live/ammo_type_live/index.ex:52
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:36
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:36
|
||||||
msgid "Bullet type"
|
msgid "Bullet type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:58
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:58
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:30
|
#: lib/cannery_web/live/ammo_type_live/index.ex:55
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:39
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:39
|
||||||
msgid "Caliber"
|
msgid "Caliber"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:51
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:51
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:29
|
#: lib/cannery_web/live/ammo_type_live/index.ex:54
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:38
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:38
|
||||||
msgid "Cartridge"
|
msgid "Cartridge"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:65
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:65
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:31
|
#: lib/cannery_web/live/ammo_type_live/index.ex:56
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:40
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:40
|
||||||
msgid "Case material"
|
msgid "Case material"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -113,8 +114,8 @@ msgid "Containers"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:110
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:39
|
#: lib/cannery_web/live/ammo_type_live/index.ex:68
|
||||||
msgid "Corrosive"
|
msgid "Corrosive"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -196,15 +197,15 @@ msgid "FMJ"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:72
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:106
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:32
|
#: lib/cannery_web/live/ammo_type_live/index.ex:61
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:41
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:45
|
||||||
msgid "Grains"
|
msgid "Grains"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:102
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:136
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:37
|
#: lib/cannery_web/live/ammo_type_live/index.ex:66
|
||||||
msgid "Incendiary"
|
msgid "Incendiary"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -277,8 +278,8 @@ msgid "Manage"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:114
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:148
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:40
|
#: lib/cannery_web/live/ammo_type_live/index.ex:69
|
||||||
msgid "Manufacturer"
|
msgid "Manufacturer"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -294,7 +295,7 @@ msgstr ""
|
|||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:20
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:20
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:26
|
#: lib/cannery_web/live/ammo_type_live/index.ex:51
|
||||||
#: lib/cannery_web/live/container_live/form_component.html.heex:20
|
#: lib/cannery_web/live/container_live/form_component.html.heex:20
|
||||||
#: lib/cannery_web/live/invite_live/form_component.html.heex:20
|
#: lib/cannery_web/live/invite_live/form_component.html.heex:20
|
||||||
#: lib/cannery_web/live/tag_live/form_component.ex:50
|
#: lib/cannery_web/live/tag_live/form_component.ex:50
|
||||||
@ -332,7 +333,7 @@ msgid "No Ammo Types"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:99
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:103
|
||||||
msgid "No ammo for this type"
|
msgid "No ammo for this type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -377,9 +378,9 @@ msgid "On the bookshelf"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:114
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:33
|
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:42
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:46
|
||||||
msgid "Pressure"
|
msgid "Pressure"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -396,9 +397,9 @@ msgid "Price paid:"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:87
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:34
|
#: lib/cannery_web/live/ammo_type_live/index.ex:63
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:43
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:47
|
||||||
msgid "Primer type"
|
msgid "Primer type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -408,16 +409,11 @@ msgid "Public Signups"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:94
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:128
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:35
|
#: lib/cannery_web/live/ammo_type_live/index.ex:64
|
||||||
msgid "Rimfire"
|
msgid "Rimfire"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:118
|
|
||||||
msgid "SKU"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/home_live.ex:63
|
#: lib/cannery_web/live/home_live.ex:63
|
||||||
msgid "Secure:"
|
msgid "Secure:"
|
||||||
@ -458,18 +454,13 @@ msgstr ""
|
|||||||
msgid "Simple:"
|
msgid "Simple:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:41
|
|
||||||
msgid "Sku"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:47
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:47
|
||||||
msgid "Steel"
|
msgid "Steel"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:59
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:60
|
||||||
msgid "Stored in"
|
msgid "Stored in"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -496,13 +487,13 @@ msgid "The self-hosted firearm tracker website"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:64
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:65
|
||||||
msgid "This ammo group is not in a container"
|
msgid "This ammo group is not in a container"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:98
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:132
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:36
|
#: lib/cannery_web/live/ammo_type_live/index.ex:65
|
||||||
msgid "Tracer"
|
msgid "Tracer"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -580,14 +571,14 @@ msgstr ""
|
|||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:78
|
#: lib/cannery_web/live/ammo_group_live/index.html.heex:78
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:45
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:46
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:30
|
#: lib/cannery_web/live/range_live/index.html.heex:30
|
||||||
msgid "Stage for range"
|
msgid "Stage for range"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:78
|
#: lib/cannery_web/live/ammo_group_live/index.html.heex:78
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:45
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:46
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:30
|
#: lib/cannery_web/live/range_live/index.html.heex:30
|
||||||
msgid "Unstage from range"
|
msgid "Unstage from range"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -674,3 +665,50 @@ msgstr ""
|
|||||||
#: lib/cannery_web/live/range_live/index.html.heex:49
|
#: lib/cannery_web/live/range_live/index.html.heex:49
|
||||||
msgid "Shot log"
|
msgid "Shot log"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/components/ammo_group_card.ex:42
|
||||||
|
#: lib/cannery_web/live/ammo_group_live/index.html.heex:63
|
||||||
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:22
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:94
|
||||||
|
msgid "$%{amount}"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75
|
||||||
|
msgid "Bimetal"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:72
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/index.ex:57
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:41
|
||||||
|
msgid "Jacket type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:79
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/index.ex:58
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:42
|
||||||
|
msgid "Muzzle velocity"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/index.ex:60
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:44
|
||||||
|
msgid "Powder grains per charge"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/index.ex:59
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:43
|
||||||
|
msgid "Powder type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:152
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/index.ex:70
|
||||||
|
msgid "UPC"
|
||||||
|
msgstr ""
|
||||||
|
@ -98,8 +98,8 @@ msgstr ""
|
|||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:107
|
#: lib/cannery_web/live/ammo_group_live/index.html.heex:107
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:40
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:41
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:104
|
#: lib/cannery_web/live/ammo_type_live/index.html.heex:64
|
||||||
msgid "Are you sure you want to delete this ammo?"
|
msgid "Are you sure you want to delete this ammo?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ msgstr ""
|
|||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:44
|
#: lib/cannery_web/components/add_shot_group_component.html.heex:44
|
||||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:55
|
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:55
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:123
|
#: 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/container_live/form_component.html.heex:52
|
||||||
#: lib/cannery_web/live/invite_live/form_component.html.heex:30
|
#: lib/cannery_web/live/invite_live/form_component.html.heex:30
|
||||||
#: lib/cannery_web/live/range_live/form_component.html.heex:42
|
#: lib/cannery_web/live/range_live/form_component.html.heex:42
|
||||||
|
@ -13,6 +13,10 @@ defmodule Cannery.Repo.Migrations.CreateAmmoTypes do
|
|||||||
add :cartridge, :string
|
add :cartridge, :string
|
||||||
add :caliber, :string
|
add :caliber, :string
|
||||||
add :case_material, :string
|
add :case_material, :string
|
||||||
|
add :jacket_type, :string
|
||||||
|
add :muzzle_velocity, :integer
|
||||||
|
add :powder_type, :string
|
||||||
|
add :powder_grains_per_charge, :integer
|
||||||
add :grains, :integer
|
add :grains, :integer
|
||||||
add :pressure, :string
|
add :pressure, :string
|
||||||
add :primer_type, :string
|
add :primer_type, :string
|
||||||
@ -23,7 +27,7 @@ defmodule Cannery.Repo.Migrations.CreateAmmoTypes do
|
|||||||
add :corrosive, :boolean, null: false, default: false
|
add :corrosive, :boolean, null: false, default: false
|
||||||
|
|
||||||
add :manufacturer, :string
|
add :manufacturer, :string
|
||||||
add :sku, :string
|
add :upc, :string
|
||||||
|
|
||||||
add :user_id, references(:users, on_delete: :delete_all, type: :binary_id)
|
add :user_id, references(:users, on_delete: :delete_all, type: :binary_id)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user