Compare commits

..

11 Commits

Author SHA1 Message Date
9835fe3f5e bump version
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-30 22:32:53 -04:00
4dee8808f3 improve migrations 2023-03-30 22:24:29 -04:00
65c70ca398 fix name collisions 2023-03-30 22:23:54 -04:00
550f6a6420 add migration for ammo type table and column 2023-03-30 22:02:44 -04:00
88c3f15fc8 rename ammo type files to type 2023-03-30 22:02:36 -04:00
c33f15603b rename ammo type to type 2023-03-30 22:02:36 -04:00
98775359af rename shot groups to shot records in database 2023-03-30 21:39:08 -04:00
e0e7b25bc4 add more text replacements 2023-03-30 21:38:56 -04:00
bdddf65685 remove unnecessary index churn 2023-03-30 21:38:09 -04:00
6f50702b11 rename shot group files to shot record 2023-03-30 20:44:41 -04:00
5f8d1a917f shot groups to shot records 2023-03-30 20:43:30 -04:00
72 changed files with 3551 additions and 3646 deletions

View File

@ -1,6 +1,7 @@
# v0.9.1
- Rename ammo type's "type" to "class" to avoid confusion
- Fixes ammo type search
- Rename "ammo type" to "type" to avoid confusion
- Fixes type search
- Fixes shot records table disappearing after selecting an empty ammo class
- Code quality improvements
@ -57,7 +58,7 @@
# v0.8.0
- Add search to catalog, ammo, container, tag and range index pages
- Tweak urls for catalog, ammo, containers, tags and shot records
- Fix bug with shot group chart not drawing lines between days correctly
- Fix bug with shot record chart not drawing lines between days correctly
- Improve cards across app (make them line up with each other)
- Update translations and add spanish!!! (thank you Brea and Hannah!)
@ -69,7 +70,7 @@
- Fix toggle button styling
- Miscellanous code improvements
- Improve container index table
- Fix bug with ammo not updating after deleting shot group
- Fix bug with ammo not updating after deleting shot record
- Replace ammo "added on" with "purchased on"
- Miscellaneous wording improvements
- Update translations
@ -103,7 +104,7 @@
- Add ammo type cloning
- Add container cloning
- Fix bug with moving ammo packs between containers
- Add button to set rounds left to 0 when creating a shot group
- Add button to set rounds left to 0 when creating a shot record
- Update project dependencies
# v0.5.4
@ -155,8 +156,8 @@
# v0.3.0
- Fix ammo type counts not showing when count is 0
- Add prompt to create first container before first ammo group
- Edit and delete shot groups from ammo group show page
- Use today's date when adding new shot groups
- Edit and delete shot records from ammo group show page
- Use today's date when adding new shot records
- Create multiple ammo groups at one time
# v0.2.3

View File

@ -13,8 +13,8 @@ The self-hosted firearm tracker website.
# Features
- Create containers to store your ammunition, and tag them with custom tags
- Add ammunition types to Cannery, and then ammunition groups to your containers
- Stage groups of ammo for range day and record your ammo usage
- Add ammunition types to Cannery, and then ammo packs to your containers
- Stage ammo packs for range day and track your usage with shot records
- Invitations via invite tokens or public registration
# Installation

View File

@ -4,50 +4,50 @@ defmodule Cannery.ActivityLog do
"""
import Ecto.Query, warn: false
alias Cannery.Ammo.{AmmoType, Pack}
alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Repo}
alias Cannery.Ammo.{Pack, Type}
alias Cannery.{Accounts.User, ActivityLog.ShotRecord, Repo}
alias Ecto.{Multi, Queryable}
@doc """
Returns the list of shot_groups.
Returns the list of shot_records.
## Examples
iex> list_shot_groups(:all, %User{id: 123})
[%ShotGroup{}, ...]
iex> list_shot_records(:all, %User{id: 123})
[%ShotRecord{}, ...]
iex> list_shot_groups("cool", :all, %User{id: 123})
[%ShotGroup{notes: "My cool shot group"}, ...]
iex> list_shot_records("cool", :all, %User{id: 123})
[%ShotRecord{notes: "My cool shot record"}, ...]
iex> list_shot_groups("cool", :rifle, %User{id: 123})
[%ShotGroup{notes: "Shot some rifle rounds"}, ...]
iex> list_shot_records("cool", :rifle, %User{id: 123})
[%ShotRecord{notes: "Shot some rifle rounds"}, ...]
"""
@spec list_shot_groups(AmmoType.class() | :all, User.t()) :: [ShotGroup.t()]
@spec list_shot_groups(search :: nil | String.t(), AmmoType.class() | :all, User.t()) ::
[ShotGroup.t()]
def list_shot_groups(search \\ nil, type, %{id: user_id}) do
from(sg in ShotGroup,
@spec list_shot_records(Type.class() | :all, User.t()) :: [ShotRecord.t()]
@spec list_shot_records(search :: nil | String.t(), Type.class() | :all, User.t()) ::
[ShotRecord.t()]
def list_shot_records(search \\ nil, type, %{id: user_id}) do
from(sg in ShotRecord,
as: :sg,
left_join: ag in Pack,
as: :ag,
on: sg.pack_id == ag.id,
left_join: at in AmmoType,
left_join: at in Type,
as: :at,
on: ag.ammo_type_id == at.id,
on: ag.type_id == at.id,
where: sg.user_id == ^user_id,
distinct: sg.id
)
|> list_shot_groups_search(search)
|> list_shot_groups_filter_type(type)
|> list_shot_records_search(search)
|> list_shot_records_filter_type(type)
|> Repo.all()
end
@spec list_shot_groups_search(Queryable.t(), search :: String.t() | nil) ::
@spec list_shot_records_search(Queryable.t(), search :: String.t() | nil) ::
Queryable.t()
defp list_shot_groups_search(query, search) when search in ["", nil], do: query
defp list_shot_records_search(query, search) when search in ["", nil], do: query
defp list_shot_groups_search(query, search) when search |> is_binary() do
defp list_shot_records_search(query, search) when search |> is_binary() do
trimmed_search = String.trim(search)
query
@ -79,18 +79,18 @@ defmodule Cannery.ActivityLog do
})
end
@spec list_shot_groups_filter_type(Queryable.t(), AmmoType.class() | :all) ::
@spec list_shot_records_filter_type(Queryable.t(), Type.class() | :all) ::
Queryable.t()
defp list_shot_groups_filter_type(query, :rifle),
defp list_shot_records_filter_type(query, :rifle),
do: query |> where([at: at], at.class == :rifle)
defp list_shot_groups_filter_type(query, :pistol),
defp list_shot_records_filter_type(query, :pistol),
do: query |> where([at: at], at.class == :pistol)
defp list_shot_groups_filter_type(query, :shotgun),
defp list_shot_records_filter_type(query, :shotgun),
do: query |> where([at: at], at.class == :shotgun)
defp list_shot_groups_filter_type(query, _all), do: query
defp list_shot_records_filter_type(query, _all), do: query
@doc """
Returns a count of shot records.
@ -104,43 +104,43 @@ defmodule Cannery.ActivityLog do
@spec get_shot_record_count!(User.t()) :: integer()
def get_shot_record_count!(%User{id: user_id}) do
Repo.one(
from sg in ShotGroup,
from sg in ShotRecord,
where: sg.user_id == ^user_id,
select: count(sg.id),
distinct: true
) || 0
end
@spec list_shot_groups_for_pack(Pack.t(), User.t()) :: [ShotGroup.t()]
def list_shot_groups_for_pack(
@spec list_shot_records_for_pack(Pack.t(), User.t()) :: [ShotRecord.t()]
def list_shot_records_for_pack(
%Pack{id: pack_id, user_id: user_id},
%User{id: user_id}
) do
Repo.all(
from sg in ShotGroup,
from sg in ShotRecord,
where: sg.pack_id == ^pack_id,
where: sg.user_id == ^user_id
)
end
@doc """
Gets a single shot_group.
Gets a single shot_record.
Raises `Ecto.NoResultsError` if the Shot group does not exist.
Raises `Ecto.NoResultsError` if the shot record does not exist.
## Examples
iex> get_shot_group!(123, %User{id: 123})
%ShotGroup{}
iex> get_shot_record!(123, %User{id: 123})
%ShotRecord{}
iex> get_shot_group!(456, %User{id: 123})
iex> get_shot_record!(456, %User{id: 123})
** (Ecto.NoResultsError)
"""
@spec get_shot_group!(ShotGroup.id(), User.t()) :: ShotGroup.t()
def get_shot_group!(id, %User{id: user_id}) do
@spec get_shot_record!(ShotRecord.id(), User.t()) :: ShotRecord.t()
def get_shot_record!(id, %User{id: user_id}) do
Repo.one!(
from sg in ShotGroup,
from sg in ShotRecord,
where: sg.id == ^id,
where: sg.user_id == ^user_id,
order_by: sg.date
@ -148,28 +148,28 @@ defmodule Cannery.ActivityLog do
end
@doc """
Creates a shot_group.
Creates a shot_record.
## Examples
iex> create_shot_group(%{field: value}, %User{id: 123})
{:ok, %ShotGroup{}}
iex> create_shot_record(%{field: value}, %User{id: 123})
{:ok, %ShotRecord{}}
iex> create_shot_group(%{field: bad_value}, %User{id: 123})
iex> create_shot_record(%{field: bad_value}, %User{id: 123})
{:error, %Ecto.Changeset{}}
"""
@spec create_shot_group(attrs :: map(), User.t(), Pack.t()) ::
{:ok, ShotGroup.t()} | {:error, ShotGroup.changeset() | nil}
def create_shot_group(attrs, user, pack) do
@spec create_shot_record(attrs :: map(), User.t(), Pack.t()) ::
{:ok, ShotRecord.t()} | {:error, ShotRecord.changeset() | nil}
def create_shot_record(attrs, user, pack) do
Multi.new()
|> Multi.insert(
:create_shot_group,
%ShotGroup{} |> ShotGroup.create_changeset(user, pack, attrs)
:create_shot_record,
%ShotRecord{} |> ShotRecord.create_changeset(user, pack, attrs)
)
|> Multi.run(
:pack,
fn _repo, %{create_shot_group: %{pack_id: pack_id, user_id: user_id}} ->
fn _repo, %{create_shot_record: %{pack_id: pack_id, user_id: user_id}} ->
pack =
Repo.one(
from ag in Pack,
@ -182,52 +182,52 @@ defmodule Cannery.ActivityLog do
)
|> Multi.update(
:update_pack,
fn %{create_shot_group: %{count: shot_group_count}, pack: %{count: pack_count}} ->
pack |> Pack.range_changeset(%{"count" => pack_count - shot_group_count})
fn %{create_shot_record: %{count: shot_record_count}, pack: %{count: pack_count}} ->
pack |> Pack.range_changeset(%{"count" => pack_count - shot_record_count})
end
)
|> Repo.transaction()
|> case do
{:ok, %{create_shot_group: shot_group}} -> {:ok, shot_group}
{:error, :create_shot_group, changeset, _changes_so_far} -> {:error, changeset}
{:ok, %{create_shot_record: shot_record}} -> {:ok, shot_record}
{:error, :create_shot_record, changeset, _changes_so_far} -> {:error, changeset}
{:error, _other_transaction, _value, _changes_so_far} -> {:error, nil}
end
end
@doc """
Updates a shot_group.
Updates a shot_record.
## Examples
iex> update_shot_group(shot_group, %{field: new_value}, %User{id: 123})
{:ok, %ShotGroup{}}
iex> update_shot_record(shot_record, %{field: new_value}, %User{id: 123})
{:ok, %ShotRecord{}}
iex> update_shot_group(shot_group, %{field: bad_value}, %User{id: 123})
iex> update_shot_record(shot_record, %{field: bad_value}, %User{id: 123})
{:error, %Ecto.Changeset{}}
"""
@spec update_shot_group(ShotGroup.t(), attrs :: map(), User.t()) ::
{:ok, ShotGroup.t()} | {:error, ShotGroup.changeset() | nil}
def update_shot_group(
%ShotGroup{count: count, user_id: user_id} = shot_group,
@spec update_shot_record(ShotRecord.t(), attrs :: map(), User.t()) ::
{:ok, ShotRecord.t()} | {:error, ShotRecord.changeset() | nil}
def update_shot_record(
%ShotRecord{count: count, user_id: user_id} = shot_record,
attrs,
%User{id: user_id} = user
) do
Multi.new()
|> Multi.update(
:update_shot_group,
shot_group |> ShotGroup.update_changeset(user, attrs)
:update_shot_record,
shot_record |> ShotRecord.update_changeset(user, attrs)
)
|> Multi.run(
:pack,
fn repo, %{update_shot_group: %{pack_id: pack_id, user_id: user_id}} ->
fn repo, %{update_shot_record: %{pack_id: pack_id, user_id: user_id}} ->
{:ok, repo.one(from ag in Pack, where: ag.id == ^pack_id and ag.user_id == ^user_id)}
end
)
|> Multi.update(
:update_pack,
fn %{
update_shot_group: %{count: new_count},
update_shot_record: %{count: new_count},
pack: %{count: pack_count} = pack
} ->
shot_diff_to_add = new_count - count
@ -237,42 +237,42 @@ defmodule Cannery.ActivityLog do
)
|> Repo.transaction()
|> case do
{:ok, %{update_shot_group: shot_group}} -> {:ok, shot_group}
{:error, :update_shot_group, changeset, _changes_so_far} -> {:error, changeset}
{:ok, %{update_shot_record: shot_record}} -> {:ok, shot_record}
{:error, :update_shot_record, changeset, _changes_so_far} -> {:error, changeset}
{:error, _other_transaction, _value, _changes_so_far} -> {:error, nil}
end
end
@doc """
Deletes a shot_group.
Deletes a shot_record.
## Examples
iex> delete_shot_group(shot_group, %User{id: 123})
{:ok, %ShotGroup{}}
iex> delete_shot_record(shot_record, %User{id: 123})
{:ok, %ShotRecord{}}
iex> delete_shot_group(shot_group, %User{id: 123})
iex> delete_shot_record(shot_record, %User{id: 123})
{:error, %Ecto.Changeset{}}
"""
@spec delete_shot_group(ShotGroup.t(), User.t()) ::
{:ok, ShotGroup.t()} | {:error, ShotGroup.changeset()}
def delete_shot_group(
%ShotGroup{user_id: user_id} = shot_group,
@spec delete_shot_record(ShotRecord.t(), User.t()) ::
{:ok, ShotRecord.t()} | {:error, ShotRecord.changeset()}
def delete_shot_record(
%ShotRecord{user_id: user_id} = shot_record,
%User{id: user_id}
) do
Multi.new()
|> Multi.delete(:delete_shot_group, shot_group)
|> Multi.delete(:delete_shot_record, shot_record)
|> Multi.run(
:pack,
fn repo, %{delete_shot_group: %{pack_id: pack_id, user_id: user_id}} ->
fn repo, %{delete_shot_record: %{pack_id: pack_id, user_id: user_id}} ->
{:ok, repo.one(from ag in Pack, where: ag.id == ^pack_id and ag.user_id == ^user_id)}
end
)
|> Multi.update(
:update_pack,
fn %{
delete_shot_group: %{count: count},
delete_shot_record: %{count: count},
pack: %{count: pack_count} = pack
} ->
new_pack_count = pack_count + count
@ -281,8 +281,8 @@ defmodule Cannery.ActivityLog do
)
|> Repo.transaction()
|> case do
{:ok, %{delete_shot_group: shot_group}} -> {:ok, shot_group}
{:error, :delete_shot_group, changeset, _changes_so_far} -> {:error, changeset}
{:ok, %{delete_shot_record: shot_record}} -> {:ok, shot_record}
{:error, :delete_shot_record, changeset, _changes_so_far} -> {:error, changeset}
{:error, _other_transaction, _value, _changes_so_far} -> {:error, nil}
end
end
@ -308,7 +308,7 @@ defmodule Cannery.ActivityLog do
|> Enum.map(fn %{id: pack_id} -> pack_id end)
Repo.all(
from sg in ShotGroup,
from sg in ShotRecord,
where: sg.pack_id in ^pack_ids,
where: sg.user_id == ^user_id,
group_by: sg.pack_id,
@ -318,7 +318,7 @@ defmodule Cannery.ActivityLog do
end
@doc """
Returns the last entered shot group date for a pack
Returns the last entered shot record date for a pack
"""
@spec get_last_used_date(Pack.t(), User.t()) :: Date.t() | nil
def get_last_used_date(%Pack{id: pack_id} = pack, user) do
@ -328,7 +328,7 @@ defmodule Cannery.ActivityLog do
end
@doc """
Returns the last entered shot group date for a pack
Returns the last entered shot record date for a pack
"""
@spec get_last_used_dates([Pack.t()], User.t()) :: %{optional(Pack.id()) => Date.t()}
def get_last_used_dates(packs, %User{id: user_id}) do
@ -337,7 +337,7 @@ defmodule Cannery.ActivityLog do
|> Enum.map(fn %Pack{id: pack_id, user_id: ^user_id} -> pack_id end)
Repo.all(
from sg in ShotGroup,
from sg in ShotRecord,
where: sg.pack_id in ^pack_ids,
where: sg.user_id == ^user_id,
group_by: sg.pack_id,
@ -347,50 +347,50 @@ defmodule Cannery.ActivityLog do
end
@doc """
Gets the total number of rounds shot for an ammo type
Gets the total number of rounds shot for a type
Raises `Ecto.NoResultsError` if the Ammo type does not exist.
Raises `Ecto.NoResultsError` if the type does not exist.
## Examples
iex> get_used_count_for_ammo_type(123, %User{id: 123})
iex> get_used_count_for_type(123, %User{id: 123})
35
iex> get_used_count_for_ammo_type(456, %User{id: 123})
iex> get_used_count_for_type(456, %User{id: 123})
** (Ecto.NoResultsError)
"""
@spec get_used_count_for_ammo_type(AmmoType.t(), User.t()) :: non_neg_integer()
def get_used_count_for_ammo_type(%AmmoType{id: ammo_type_id} = ammo_type, user) do
[ammo_type]
|> get_used_count_for_ammo_types(user)
|> Map.get(ammo_type_id, 0)
@spec get_used_count_for_type(Type.t(), User.t()) :: non_neg_integer()
def get_used_count_for_type(%Type{id: type_id} = type, user) do
[type]
|> get_used_count_for_types(user)
|> Map.get(type_id, 0)
end
@doc """
Gets the total number of rounds shot for multiple ammo types
Gets the total number of rounds shot for multiple types
## Examples
iex> get_used_count_for_ammo_types(123, %User{id: 123})
iex> get_used_count_for_types(123, %User{id: 123})
35
"""
@spec get_used_count_for_ammo_types([AmmoType.t()], User.t()) ::
%{optional(AmmoType.id()) => non_neg_integer()}
def get_used_count_for_ammo_types(ammo_types, %User{id: user_id}) do
ammo_type_ids =
ammo_types
|> Enum.map(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} -> ammo_type_id end)
@spec get_used_count_for_types([Type.t()], User.t()) ::
%{optional(Type.id()) => non_neg_integer()}
def get_used_count_for_types(types, %User{id: user_id}) do
type_ids =
types
|> Enum.map(fn %Type{id: type_id, user_id: ^user_id} -> type_id end)
Repo.all(
from ag in Pack,
left_join: sg in ShotGroup,
left_join: sg in ShotRecord,
on: ag.id == sg.pack_id,
where: ag.ammo_type_id in ^ammo_type_ids,
where: ag.type_id in ^type_ids,
where: not (sg.count |> is_nil()),
group_by: ag.ammo_type_id,
select: {ag.ammo_type_id, sum(sg.count)}
group_by: ag.type_id,
select: {ag.type_id, sum(sg.count)}
)
|> Map.new()
end

View File

@ -1,6 +1,6 @@
defmodule Cannery.ActivityLog.ShotGroup do
defmodule Cannery.ActivityLog.ShotRecord do
@moduledoc """
A shot group records a group of ammo shot during a range trip
A shot record records a group of ammo shot during a range trip
"""
use Ecto.Schema
@ -19,7 +19,7 @@ defmodule Cannery.ActivityLog.ShotGroup do
]}
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id
schema "shot_groups" do
schema "shot_records" do
field :count, :integer
field :date, :date
field :notes, :string
@ -40,41 +40,41 @@ defmodule Cannery.ActivityLog.ShotGroup do
inserted_at: NaiveDateTime.t(),
updated_at: NaiveDateTime.t()
}
@type new_shot_group :: %__MODULE__{}
@type new_shot_record :: %__MODULE__{}
@type id :: UUID.t()
@type changeset :: Changeset.t(t() | new_shot_group())
@type changeset :: Changeset.t(t() | new_shot_record())
@doc false
@spec create_changeset(
new_shot_group(),
new_shot_record(),
User.t() | any(),
Pack.t() | any(),
attrs :: map()
) :: changeset()
def create_changeset(
shot_group,
shot_record,
%User{id: user_id},
%Pack{id: pack_id, user_id: user_id} = pack,
attrs
) do
shot_group
shot_record
|> change(user_id: user_id)
|> change(pack_id: pack_id)
|> cast(attrs, [:count, :notes, :date])
|> validate_length(:notes, max: 255)
|> validate_create_shot_group_count(pack)
|> validate_create_shot_record_count(pack)
|> validate_required([:date, :pack_id, :user_id])
end
def create_changeset(shot_group, _invalid_user, _invalid_pack, attrs) do
shot_group
def create_changeset(shot_record, _invalid_user, _invalid_pack, attrs) do
shot_record
|> cast(attrs, [:count, :notes, :date])
|> validate_length(:notes, max: 255)
|> validate_required([:pack_id, :user_id])
|> add_error(:invalid, dgettext("errors", "Please select a valid user and ammo pack"))
end
defp validate_create_shot_group_count(changeset, %Pack{count: pack_count}) do
defp validate_create_shot_record_count(changeset, %Pack{count: pack_count}) do
case changeset |> Changeset.get_field(:count) do
nil ->
changeset |> Changeset.add_error(:ammo_left, dgettext("errors", "can't be blank"))
@ -95,25 +95,25 @@ defmodule Cannery.ActivityLog.ShotGroup do
end
@doc false
@spec update_changeset(t() | new_shot_group(), User.t(), attrs :: map()) :: changeset()
def update_changeset(%__MODULE__{} = shot_group, user, attrs) do
shot_group
@spec update_changeset(t() | new_shot_record(), User.t(), attrs :: map()) :: changeset()
def update_changeset(%__MODULE__{} = shot_record, user, attrs) do
shot_record
|> cast(attrs, [:count, :notes, :date])
|> validate_length(:notes, max: 255)
|> validate_number(:count, greater_than: 0)
|> validate_required([:count, :date])
|> validate_update_shot_group_count(shot_group, user)
|> validate_update_shot_record_count(shot_record, user)
end
defp validate_update_shot_group_count(
defp validate_update_shot_record_count(
changeset,
%__MODULE__{pack_id: pack_id, count: count},
user
) do
%{count: pack_count} = Ammo.get_pack!(pack_id, user)
new_shot_group_count = changeset |> Changeset.get_field(:count)
shot_diff_to_add = new_shot_group_count - count
new_shot_record_count = changeset |> Changeset.get_field(:count)
shot_diff_to_add = new_shot_record_count - count
if shot_diff_to_add > pack_count do
error = dgettext("errors", "Count can be at most %{count} shots", count: pack_count + count)

View File

@ -7,47 +7,47 @@ defmodule Cannery.Ammo do
import Ecto.Query, warn: false
alias Cannery.{Accounts.User, Containers, Repo}
alias Cannery.Containers.{Container, ContainerTag, Tag}
alias Cannery.{ActivityLog, ActivityLog.ShotGroup}
alias Cannery.Ammo.{AmmoType, Pack}
alias Cannery.{ActivityLog, ActivityLog.ShotRecord}
alias Cannery.Ammo.{Pack, Type}
alias Ecto.{Changeset, Queryable}
@pack_create_limit 10_000
@pack_preloads [:ammo_type]
@ammo_type_preloads [:packs]
@pack_preloads [:type]
@type_preloads [:packs]
@doc """
Returns the list of ammo_types.
Returns the list of types.
## Examples
iex> list_ammo_types(%User{id: 123}, :all)
[%AmmoType{}, ...]
iex> list_types(%User{id: 123}, :all)
[%Type{}, ...]
iex> list_ammo_types("cool", %User{id: 123}, :shotgun)
[%AmmoType{name: "My cool ammo type", class: :shotgun}, ...]
iex> list_types("cool", %User{id: 123}, :shotgun)
[%Type{name: "My cool type", class: :shotgun}, ...]
"""
@spec list_ammo_types(User.t(), AmmoType.class() | :all) :: [AmmoType.t()]
@spec list_ammo_types(search :: nil | String.t(), User.t(), AmmoType.class() | :all) ::
[AmmoType.t()]
def list_ammo_types(search \\ nil, user, type)
@spec list_types(User.t(), Type.class() | :all) :: [Type.t()]
@spec list_types(search :: nil | String.t(), User.t(), Type.class() | :all) ::
[Type.t()]
def list_types(search \\ nil, user, type)
def list_ammo_types(search, %{id: user_id}, type) do
from(at in AmmoType,
def list_types(search, %{id: user_id}, type) do
from(at in Type,
as: :at,
where: at.user_id == ^user_id,
preload: ^@ammo_type_preloads
preload: ^@type_preloads
)
|> list_ammo_types_filter_type(type)
|> list_ammo_types_filter_search(search)
|> list_types_filter_type(type)
|> list_types_filter_search(search)
|> Repo.all()
end
@spec list_ammo_types_filter_search(Queryable.t(), search :: String.t() | nil) :: Queryable.t()
defp list_ammo_types_filter_search(query, search) when search in ["", nil],
@spec list_types_filter_search(Queryable.t(), search :: String.t() | nil) :: Queryable.t()
defp list_types_filter_search(query, search) when search in ["", nil],
do: query |> order_by([at: at], at.name)
defp list_ammo_types_filter_search(query, search) when search |> is_binary() do
defp list_types_filter_search(query, search) when search |> is_binary() do
trimmed_search = String.trim(search)
query
@ -72,31 +72,31 @@ defmodule Cannery.Ammo do
)
end
@spec list_ammo_types_filter_type(Queryable.t(), AmmoType.class() | :all) :: Queryable.t()
defp list_ammo_types_filter_type(query, :rifle),
@spec list_types_filter_type(Queryable.t(), Type.class() | :all) :: Queryable.t()
defp list_types_filter_type(query, :rifle),
do: query |> where([at: at], at.class == :rifle)
defp list_ammo_types_filter_type(query, :pistol),
defp list_types_filter_type(query, :pistol),
do: query |> where([at: at], at.class == :pistol)
defp list_ammo_types_filter_type(query, :shotgun),
defp list_types_filter_type(query, :shotgun),
do: query |> where([at: at], at.class == :shotgun)
defp list_ammo_types_filter_type(query, _all), do: query
defp list_types_filter_type(query, _all), do: query
@doc """
Returns a count of ammo_types.
Returns a count of types.
## Examples
iex> get_ammo_types_count!(%User{id: 123})
iex> get_types_count!(%User{id: 123})
3
"""
@spec get_ammo_types_count!(User.t()) :: integer()
def get_ammo_types_count!(%User{id: user_id}) do
@spec get_types_count!(User.t()) :: integer()
def get_types_count!(%User{id: user_id}) do
Repo.one(
from at in AmmoType,
from at in Type,
where: at.user_id == ^user_id,
select: count(at.id),
distinct: true
@ -104,70 +104,70 @@ defmodule Cannery.Ammo do
end
@doc """
Gets a single ammo_type.
Gets a single type.
Raises `Ecto.NoResultsError` if the Ammo type does not exist.
Raises `Ecto.NoResultsError` if the type does not exist.
## Examples
iex> get_ammo_type!(123, %User{id: 123})
%AmmoType{}
iex> get_type!(123, %User{id: 123})
%Type{}
iex> get_ammo_type!(456, %User{id: 123})
iex> get_type!(456, %User{id: 123})
** (Ecto.NoResultsError)
"""
@spec get_ammo_type!(AmmoType.id(), User.t()) :: AmmoType.t()
def get_ammo_type!(id, %User{id: user_id}) do
@spec get_type!(Type.id(), User.t()) :: Type.t()
def get_type!(id, %User{id: user_id}) do
Repo.one!(
from at in AmmoType,
from at in Type,
where: at.id == ^id,
where: at.user_id == ^user_id,
preload: ^@ammo_type_preloads
preload: ^@type_preloads
)
end
@doc """
Gets the average cost of an ammo type from packs with price information.
Gets the average cost of a type from packs with price information.
## Examples
iex> get_average_cost_for_ammo_type(
...> %AmmoType{id: 123, user_id: 456},
iex> get_average_cost_for_type(
...> %Type{id: 123, user_id: 456},
...> %User{id: 456}
...> )
1.50
"""
@spec get_average_cost_for_ammo_type(AmmoType.t(), User.t()) :: float() | nil
def get_average_cost_for_ammo_type(%AmmoType{id: ammo_type_id} = ammo_type, user) do
[ammo_type]
|> get_average_cost_for_ammo_types(user)
|> Map.get(ammo_type_id)
@spec get_average_cost_for_type(Type.t(), User.t()) :: float() | nil
def get_average_cost_for_type(%Type{id: type_id} = type, user) do
[type]
|> get_average_cost_for_types(user)
|> Map.get(type_id)
end
@doc """
Gets the average cost of ammo types from packs with price information
for multiple ammo types.
Gets the average cost of types from packs with price information
for multiple types.
## Examples
iex> get_average_cost_for_ammo_types(
...> [%AmmoType{id: 123, user_id: 456}],
iex> get_average_cost_for_types(
...> [%Type{id: 123, user_id: 456}],
...> %User{id: 456}
...> )
1.50
"""
@spec get_average_cost_for_ammo_types([AmmoType.t()], User.t()) ::
%{optional(AmmoType.id()) => float()}
def get_average_cost_for_ammo_types(ammo_types, %User{id: user_id}) do
ammo_type_ids =
ammo_types
|> Enum.map(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} -> ammo_type_id end)
@spec get_average_cost_for_types([Type.t()], User.t()) ::
%{optional(Type.id()) => float()}
def get_average_cost_for_types(types, %User{id: user_id}) do
type_ids =
types
|> Enum.map(fn %Type{id: type_id, user_id: ^user_id} -> type_id end)
sg_total_query =
from sg in ShotGroup,
from sg in ShotRecord,
where: not (sg.count |> is_nil()),
group_by: sg.pack_id,
select: %{pack_id: sg.pack_id, total: sum(sg.count)}
@ -177,202 +177,200 @@ defmodule Cannery.Ammo do
as: :pack,
left_join: sg_query in subquery(sg_total_query),
on: ag.id == sg_query.pack_id,
where: ag.ammo_type_id in ^ammo_type_ids,
group_by: ag.ammo_type_id,
where: ag.type_id in ^type_ids,
group_by: ag.type_id,
where: not (ag.price_paid |> is_nil()),
select:
{ag.ammo_type_id, sum(ag.price_paid) / sum(ag.count + coalesce(sg_query.total, 0))}
select: {ag.type_id, sum(ag.price_paid) / sum(ag.count + coalesce(sg_query.total, 0))}
)
|> Map.new()
end
@doc """
Gets the total number of rounds for an ammo type
Gets the total number of rounds for a type
## Examples
iex> get_round_count_for_ammo_type(
...> %AmmoType{id: 123, user_id: 456},
iex> get_round_count_for_type(
...> %Type{id: 123, user_id: 456},
...> %User{id: 456}
...> )
35
"""
@spec get_round_count_for_ammo_type(AmmoType.t(), User.t()) :: non_neg_integer()
def get_round_count_for_ammo_type(%AmmoType{id: ammo_type_id} = ammo_type, user) do
[ammo_type]
|> get_round_count_for_ammo_types(user)
|> Map.get(ammo_type_id, 0)
@spec get_round_count_for_type(Type.t(), User.t()) :: non_neg_integer()
def get_round_count_for_type(%Type{id: type_id} = type, user) do
[type]
|> get_round_count_for_types(user)
|> Map.get(type_id, 0)
end
@doc """
Gets the total number of rounds for multiple ammo types
Gets the total number of rounds for multiple types
## Examples
iex> get_round_count_for_ammo_types(
...> [%AmmoType{id: 123, user_id: 456}],
iex> get_round_count_for_types(
...> [%Type{id: 123, user_id: 456}],
...> %User{id: 456}
...> )
%{123 => 35}
"""
@spec get_round_count_for_ammo_types([AmmoType.t()], User.t()) ::
%{optional(AmmoType.id()) => non_neg_integer()}
def get_round_count_for_ammo_types(ammo_types, %User{id: user_id}) do
ammo_type_ids =
ammo_types
|> Enum.map(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} -> ammo_type_id end)
@spec get_round_count_for_types([Type.t()], User.t()) ::
%{optional(Type.id()) => non_neg_integer()}
def get_round_count_for_types(types, %User{id: user_id}) do
type_ids =
types
|> Enum.map(fn %Type{id: type_id, user_id: ^user_id} -> type_id end)
Repo.all(
from ag in Pack,
where: ag.ammo_type_id in ^ammo_type_ids,
where: ag.type_id in ^type_ids,
where: ag.user_id == ^user_id,
group_by: ag.ammo_type_id,
select: {ag.ammo_type_id, sum(ag.count)}
group_by: ag.type_id,
select: {ag.type_id, sum(ag.count)}
)
|> Map.new()
end
@doc """
Gets the total number of ammo ever bought for an ammo type
Gets the total number of ammo ever bought for a type
## Examples
iex> get_historical_count_for_ammo_type(
...> %AmmoType{id: 123, user_id: 456},
iex> get_historical_count_for_type(
...> %Type{id: 123, user_id: 456},
...> %User{id: 456}
...> )
5
"""
@spec get_historical_count_for_ammo_type(AmmoType.t(), User.t()) :: non_neg_integer()
def get_historical_count_for_ammo_type(%AmmoType{id: ammo_type_id} = ammo_type, user) do
[ammo_type]
|> get_historical_count_for_ammo_types(user)
|> Map.get(ammo_type_id, 0)
@spec get_historical_count_for_type(Type.t(), User.t()) :: non_neg_integer()
def get_historical_count_for_type(%Type{id: type_id} = type, user) do
[type]
|> get_historical_count_for_types(user)
|> Map.get(type_id, 0)
end
@doc """
Gets the total number of ammo ever bought for multiple ammo types
Gets the total number of ammo ever bought for multiple types
## Examples
iex> get_historical_count_for_ammo_types(
...> [%AmmoType{id: 123, user_id: 456}],
iex> get_historical_count_for_types(
...> [%Type{id: 123, user_id: 456}],
...> %User{id: 456}
...> )
%{123 => 5}
"""
@spec get_historical_count_for_ammo_types([AmmoType.t()], User.t()) ::
%{optional(AmmoType.id()) => non_neg_integer()}
def get_historical_count_for_ammo_types(ammo_types, %User{id: user_id} = user) do
used_counts = ammo_types |> ActivityLog.get_used_count_for_ammo_types(user)
round_counts = ammo_types |> get_round_count_for_ammo_types(user)
@spec get_historical_count_for_types([Type.t()], User.t()) ::
%{optional(Type.id()) => non_neg_integer()}
def get_historical_count_for_types(types, %User{id: user_id} = user) do
used_counts = types |> ActivityLog.get_used_count_for_types(user)
round_counts = types |> get_round_count_for_types(user)
ammo_types
|> Enum.filter(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} ->
Map.has_key?(used_counts, ammo_type_id) or Map.has_key?(round_counts, ammo_type_id)
types
|> Enum.filter(fn %Type{id: type_id, user_id: ^user_id} ->
Map.has_key?(used_counts, type_id) or Map.has_key?(round_counts, type_id)
end)
|> Map.new(fn %{id: ammo_type_id} ->
historical_count =
Map.get(used_counts, ammo_type_id, 0) + Map.get(round_counts, ammo_type_id, 0)
|> Map.new(fn %{id: type_id} ->
historical_count = Map.get(used_counts, type_id, 0) + Map.get(round_counts, type_id, 0)
{ammo_type_id, historical_count}
{type_id, historical_count}
end)
end
@doc """
Creates a ammo_type.
Creates a type.
## Examples
iex> create_ammo_type(%{field: value}, %User{id: 123})
{:ok, %AmmoType{}}
iex> create_type(%{field: value}, %User{id: 123})
{:ok, %Type{}}
iex> create_ammo_type(%{field: bad_value}, %User{id: 123})
iex> create_type(%{field: bad_value}, %User{id: 123})
{:error, %Changeset{}}
"""
@spec create_ammo_type(attrs :: map(), User.t()) ::
{:ok, AmmoType.t()} | {:error, AmmoType.changeset()}
def create_ammo_type(attrs \\ %{}, %User{} = user) do
%AmmoType{}
|> AmmoType.create_changeset(user, attrs)
@spec create_type(attrs :: map(), User.t()) ::
{:ok, Type.t()} | {:error, Type.changeset()}
def create_type(attrs \\ %{}, %User{} = user) do
%Type{}
|> Type.create_changeset(user, attrs)
|> Repo.insert()
|> case do
{:ok, ammo_type} -> {:ok, ammo_type |> preload_ammo_type()}
{:ok, type} -> {:ok, type |> preload_type()}
{:error, changeset} -> {:error, changeset}
end
end
@spec preload_ammo_type(AmmoType.t()) :: AmmoType.t()
@spec preload_ammo_type([AmmoType.t()]) :: [AmmoType.t()]
defp preload_ammo_type(ammo_type_or_ammo_types) do
ammo_type_or_ammo_types |> Repo.preload(@ammo_type_preloads)
@spec preload_type(Type.t()) :: Type.t()
@spec preload_type([Type.t()]) :: [Type.t()]
defp preload_type(type_or_types) do
type_or_types |> Repo.preload(@type_preloads)
end
@doc """
Updates a ammo_type.
Updates a type.
## Examples
iex> update_ammo_type(ammo_type, %{field: new_value}, %User{id: 123})
{:ok, %AmmoType{}}
iex> update_type(type, %{field: new_value}, %User{id: 123})
{:ok, %Type{}}
iex> update_ammo_type(ammo_type, %{field: bad_value}, %User{id: 123})
iex> update_type(type, %{field: bad_value}, %User{id: 123})
{:error, %Changeset{}}
"""
@spec update_ammo_type(AmmoType.t(), attrs :: map(), User.t()) ::
{:ok, AmmoType.t()} | {:error, AmmoType.changeset()}
def update_ammo_type(%AmmoType{user_id: user_id} = ammo_type, attrs, %User{id: user_id}) do
ammo_type
|> AmmoType.update_changeset(attrs)
@spec update_type(Type.t(), attrs :: map(), User.t()) ::
{:ok, Type.t()} | {:error, Type.changeset()}
def update_type(%Type{user_id: user_id} = type, attrs, %User{id: user_id}) do
type
|> Type.update_changeset(attrs)
|> Repo.update()
|> case do
{:ok, ammo_type} -> {:ok, ammo_type |> preload_ammo_type()}
{:ok, type} -> {:ok, type |> preload_type()}
{:error, changeset} -> {:error, changeset}
end
end
@doc """
Deletes a ammo_type.
Deletes a type.
## Examples
iex> delete_ammo_type(ammo_type, %User{id: 123})
{:ok, %AmmoType{}}
iex> delete_type(type, %User{id: 123})
{:ok, %Type{}}
iex> delete_ammo_type(ammo_type, %User{id: 123})
iex> delete_type(type, %User{id: 123})
{:error, %Changeset{}}
"""
@spec delete_ammo_type(AmmoType.t(), User.t()) ::
{:ok, AmmoType.t()} | {:error, AmmoType.changeset()}
def delete_ammo_type(%AmmoType{user_id: user_id} = ammo_type, %User{id: user_id}) do
ammo_type
@spec delete_type(Type.t(), User.t()) ::
{:ok, Type.t()} | {:error, Type.changeset()}
def delete_type(%Type{user_id: user_id} = type, %User{id: user_id}) do
type
|> Repo.delete()
|> case do
{:ok, ammo_type} -> {:ok, ammo_type |> preload_ammo_type()}
{:ok, type} -> {:ok, type |> preload_type()}
{:error, changeset} -> {:error, changeset}
end
end
@doc """
Deletes a ammo_type.
Deletes a type.
## Examples
iex> delete_ammo_type!(ammo_type, %User{id: 123})
%AmmoType{}
iex> delete_type!(type, %User{id: 123})
%Type{}
"""
@spec delete_ammo_type!(AmmoType.t(), User.t()) :: AmmoType.t()
def delete_ammo_type!(ammo_type, user) do
{:ok, ammo_type} = delete_ammo_type(ammo_type, user)
ammo_type
@spec delete_type!(Type.t(), User.t()) :: Type.t()
def delete_type!(type, user) do
{:ok, type} = delete_type(type, user)
type
end
@doc """
@ -381,32 +379,32 @@ defmodule Cannery.Ammo do
## Examples
iex> list_packs_for_type(
...> %AmmoType{id: 123, user_id: 456},
...> %Type{id: 123, user_id: 456},
...> %User{id: 456}
...> )
[%Pack{}, ...]
iex> list_packs_for_type(
...> %AmmoType{id: 123, user_id: 456},
...> %Type{id: 123, user_id: 456},
...> %User{id: 456},
...> true
...> )
[%Pack{}, %Pack{}, ...]
"""
@spec list_packs_for_type(AmmoType.t(), User.t()) :: [Pack.t()]
@spec list_packs_for_type(AmmoType.t(), User.t(), show_used :: boolean()) ::
@spec list_packs_for_type(Type.t(), User.t()) :: [Pack.t()]
@spec list_packs_for_type(Type.t(), User.t(), show_used :: boolean()) ::
[Pack.t()]
def list_packs_for_type(ammo_type, user, show_used \\ false)
def list_packs_for_type(type, user, show_used \\ false)
def list_packs_for_type(
%AmmoType{id: ammo_type_id, user_id: user_id},
%Type{id: type_id, user_id: user_id},
%User{id: user_id},
show_used
) do
from(ag in Pack,
as: :ag,
where: ag.ammo_type_id == ^ammo_type_id,
where: ag.type_id == ^type_id,
where: ag.user_id == ^user_id,
preload: ^@pack_preloads
)
@ -443,7 +441,7 @@ defmodule Cannery.Ammo do
"""
@spec list_packs_for_container(
Container.t(),
AmmoType.t() | :all,
Type.t() | :all,
User.t()
) :: [Pack.t()]
def list_packs_for_container(
@ -453,7 +451,7 @@ defmodule Cannery.Ammo do
) do
from(ag in Pack,
as: :ag,
join: at in assoc(ag, :ammo_type),
join: at in assoc(ag, :type),
as: :at,
where: ag.container_id == ^container_id,
where: ag.user_id == ^user_id,
@ -464,7 +462,7 @@ defmodule Cannery.Ammo do
|> Repo.all()
end
@spec list_packs_for_container_filter_type(Queryable.t(), AmmoType.class() | :all) ::
@spec list_packs_for_container_filter_type(Queryable.t(), Type.class() | :all) ::
Queryable.t()
defp list_packs_for_container_filter_type(query, :rifle),
do: query |> where([at: at], at.class == :rifle)
@ -509,71 +507,71 @@ defmodule Cannery.Ammo do
defp get_packs_count_show_used(query, _true), do: query
@doc """
Returns the count of packs for an ammo type.
Returns the count of packs for a type.
## Examples
iex> get_packs_count_for_type(
...> %AmmoType{id: 123, user_id: 456},
...> %Type{id: 123, user_id: 456},
...> %User{id: 456}
...> )
3
iex> get_packs_count_for_type(
...> %AmmoType{id: 123, user_id: 456},
...> %Type{id: 123, user_id: 456},
...> %User{id: 456},
...> true
...> )
5
"""
@spec get_packs_count_for_type(AmmoType.t(), User.t()) :: non_neg_integer()
@spec get_packs_count_for_type(AmmoType.t(), User.t(), show_used :: boolean()) ::
@spec get_packs_count_for_type(Type.t(), User.t()) :: non_neg_integer()
@spec get_packs_count_for_type(Type.t(), User.t(), show_used :: boolean()) ::
non_neg_integer()
def get_packs_count_for_type(
%AmmoType{id: ammo_type_id} = ammo_type,
%Type{id: type_id} = type,
user,
show_used \\ false
) do
[ammo_type]
[type]
|> get_packs_count_for_types(user, show_used)
|> Map.get(ammo_type_id, 0)
|> Map.get(type_id, 0)
end
@doc """
Returns the count of packs for multiple ammo types.
Returns the count of packs for multiple types.
## Examples
iex> get_packs_count_for_types(
...> [%AmmoType{id: 123, user_id: 456}],
...> [%Type{id: 123, user_id: 456}],
...> %User{id: 456}
...> )
3
iex> get_packs_count_for_types(
...> [%AmmoType{id: 123, user_id: 456}],
...> [%Type{id: 123, user_id: 456}],
...> %User{id: 456},
...> true
...> )
5
"""
@spec get_packs_count_for_types([AmmoType.t()], User.t()) ::
%{optional(AmmoType.id()) => non_neg_integer()}
@spec get_packs_count_for_types([AmmoType.t()], User.t(), show_used :: boolean()) ::
%{optional(AmmoType.id()) => non_neg_integer()}
def get_packs_count_for_types(ammo_types, %User{id: user_id}, show_used \\ false) do
ammo_type_ids =
ammo_types
|> Enum.map(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} -> ammo_type_id end)
@spec get_packs_count_for_types([Type.t()], User.t()) ::
%{optional(Type.id()) => non_neg_integer()}
@spec get_packs_count_for_types([Type.t()], User.t(), show_used :: boolean()) ::
%{optional(Type.id()) => non_neg_integer()}
def get_packs_count_for_types(types, %User{id: user_id}, show_used \\ false) do
type_ids =
types
|> Enum.map(fn %Type{id: type_id, user_id: ^user_id} -> type_id end)
from(ag in Pack,
as: :ag,
where: ag.user_id == ^user_id,
where: ag.ammo_type_id in ^ammo_type_ids,
group_by: ag.ammo_type_id,
select: {ag.ammo_type_id, count(ag.id)}
where: ag.type_id in ^type_ids,
group_by: ag.type_id,
select: {ag.type_id, count(ag.id)}
)
|> get_packs_count_for_types_maybe_show_used(show_used)
|> Repo.all()
@ -589,50 +587,50 @@ defmodule Cannery.Ammo do
end
@doc """
Returns the count of used packs for an ammo type.
Returns the count of used packs for a type.
## Examples
iex> get_used_packs_count_for_type(
...> %AmmoType{id: 123, user_id: 456},
...> %Type{id: 123, user_id: 456},
...> %User{id: 456}
...> )
3
"""
@spec get_used_packs_count_for_type(AmmoType.t(), User.t()) :: non_neg_integer()
def get_used_packs_count_for_type(%AmmoType{id: ammo_type_id} = ammo_type, user) do
[ammo_type]
@spec get_used_packs_count_for_type(Type.t(), User.t()) :: non_neg_integer()
def get_used_packs_count_for_type(%Type{id: type_id} = type, user) do
[type]
|> get_used_packs_count_for_types(user)
|> Map.get(ammo_type_id, 0)
|> Map.get(type_id, 0)
end
@doc """
Returns the count of used packs for multiple ammo types.
Returns the count of used packs for multiple types.
## Examples
iex> get_used_packs_count_for_types(
...> [%AmmoType{id: 123, user_id: 456}],
...> [%Type{id: 123, user_id: 456}],
...> %User{id: 456}
...> )
%{123 => 3}
"""
@spec get_used_packs_count_for_types([AmmoType.t()], User.t()) ::
%{optional(AmmoType.id()) => non_neg_integer()}
def get_used_packs_count_for_types(ammo_types, %User{id: user_id}) do
ammo_type_ids =
ammo_types
|> Enum.map(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} -> ammo_type_id end)
@spec get_used_packs_count_for_types([Type.t()], User.t()) ::
%{optional(Type.id()) => non_neg_integer()}
def get_used_packs_count_for_types(types, %User{id: user_id}) do
type_ids =
types
|> Enum.map(fn %Type{id: type_id, user_id: ^user_id} -> type_id end)
Repo.all(
from ag in Pack,
where: ag.user_id == ^user_id,
where: ag.ammo_type_id in ^ammo_type_ids,
where: ag.type_id in ^type_ids,
where: ag.count == 0,
group_by: ag.ammo_type_id,
select: {ag.ammo_type_id, count(ag.id)}
group_by: ag.type_id,
select: {ag.type_id, count(ag.id)}
)
|> Map.new()
end
@ -748,18 +746,18 @@ defmodule Cannery.Ammo do
[%Pack{notes: "My cool pack"}, ...]
"""
@spec list_packs(search :: String.t() | nil, AmmoType.class() | :all, User.t()) ::
@spec list_packs(search :: String.t() | nil, Type.class() | :all, User.t()) ::
[Pack.t()]
@spec list_packs(
search :: nil | String.t(),
AmmoType.class() | :all,
Type.class() | :all,
User.t(),
show_used :: boolean()
) :: [Pack.t()]
def list_packs(search, type, %{id: user_id}, show_used \\ false) do
from(ag in Pack,
as: :ag,
join: at in assoc(ag, :ammo_type),
join: at in assoc(ag, :type),
as: :at,
join: c in Container,
on: ag.container_id == c.id,
@ -781,7 +779,7 @@ defmodule Cannery.Ammo do
|> Repo.all()
end
@spec list_packs_filter_on_type(Queryable.t(), AmmoType.class() | :all) :: Queryable.t()
@spec list_packs_filter_on_type(Queryable.t(), Type.class() | :all) :: Queryable.t()
defp list_packs_filter_on_type(query, :rifle),
do: query |> where([at: at], at.class == :rifle)
@ -1063,13 +1061,13 @@ defmodule Cannery.Ammo do
end
defp do_create_packs(
%{"ammo_type_id" => ammo_type_id, "container_id" => container_id} = attrs,
%{"type_id" => type_id, "container_id" => container_id} = attrs,
multiplier,
user
)
when multiplier >= 1 and
multiplier <= @pack_create_limit and
ammo_type_id |> is_binary() and
type_id |> is_binary() and
container_id |> is_binary() do
now = NaiveDateTime.utc_now() |> NaiveDateTime.truncate(:second)
@ -1077,7 +1075,7 @@ defmodule Cannery.Ammo do
Enum.map(1..multiplier, fn _count ->
%Pack{}
|> Pack.create_changeset(
get_ammo_type!(ammo_type_id, user),
get_type!(type_id, user),
Containers.get_container!(container_id, user),
user,
attrs
@ -1107,15 +1105,15 @@ defmodule Cannery.Ammo do
end
defp do_create_packs(
%{"ammo_type_id" => ammo_type_id, "container_id" => container_id} = attrs,
%{"type_id" => type_id, "container_id" => container_id} = attrs,
_multiplier,
user
)
when is_binary(ammo_type_id) and is_binary(container_id) do
when is_binary(type_id) and is_binary(container_id) do
changeset =
%Pack{}
|> Pack.create_changeset(
get_ammo_type!(ammo_type_id, user),
get_type!(type_id, user),
Containers.get_container!(container_id, user),
user,
attrs

View File

@ -9,7 +9,7 @@ defmodule Cannery.Ammo.Pack do
use Ecto.Schema
import CanneryWeb.Gettext
import Ecto.Changeset
alias Cannery.Ammo.AmmoType
alias Cannery.Ammo.Type
alias Cannery.{Accounts.User, Containers, Containers.Container}
alias Ecto.{Changeset, UUID}
@ -20,7 +20,7 @@ defmodule Cannery.Ammo.Pack do
:notes,
:price_paid,
:staged,
:ammo_type_id,
:type_id,
:container_id
]}
@primary_key {:id, :binary_id, autogenerate: true}
@ -32,7 +32,7 @@ defmodule Cannery.Ammo.Pack do
field :staged, :boolean, default: false
field :purchased_on, :date
belongs_to :ammo_type, AmmoType
belongs_to :type, Type
field :container_id, :binary_id
field :user_id, :binary_id
@ -46,8 +46,8 @@ defmodule Cannery.Ammo.Pack do
price_paid: float() | nil,
staged: boolean(),
purchased_on: Date.t(),
ammo_type: AmmoType.t() | nil,
ammo_type_id: AmmoType.id(),
type: Type.t() | nil,
type_id: Type.id(),
container_id: Container.id(),
user_id: User.id(),
inserted_at: NaiveDateTime.t(),
@ -60,36 +60,36 @@ defmodule Cannery.Ammo.Pack do
@doc false
@spec create_changeset(
new_pack(),
AmmoType.t() | nil,
Type.t() | nil,
Container.t() | nil,
User.t(),
attrs :: map()
) :: changeset()
def create_changeset(
pack,
%AmmoType{id: ammo_type_id},
%Type{id: type_id},
%Container{id: container_id, user_id: user_id},
%User{id: user_id},
attrs
)
when is_binary(ammo_type_id) and is_binary(container_id) and is_binary(user_id) do
when is_binary(type_id) and is_binary(container_id) and is_binary(user_id) do
pack
|> change(ammo_type_id: ammo_type_id)
|> change(type_id: type_id)
|> change(user_id: user_id)
|> change(container_id: container_id)
|> cast(attrs, [:count, :price_paid, :notes, :staged, :purchased_on])
|> validate_number(:count, greater_than: 0)
|> validate_required([:count, :staged, :purchased_on, :ammo_type_id, :container_id, :user_id])
|> validate_required([:count, :staged, :purchased_on, :type_id, :container_id, :user_id])
end
@doc """
Invalid changeset, used to prompt user to select ammo type and container
Invalid changeset, used to prompt user to select type and container
"""
def create_changeset(pack, _invalid_ammo_type, _invalid_container, _invalid_user, attrs) do
def create_changeset(pack, _invalid_type, _invalid_container, _invalid_user, attrs) do
pack
|> cast(attrs, [:ammo_type_id, :container_id])
|> validate_required([:ammo_type_id, :container_id])
|> add_error(:invalid, dgettext("errors", "Please select an ammo type and container"))
|> cast(attrs, [:type_id, :container_id])
|> validate_required([:type_id, :container_id])
|> add_error(:invalid, dgettext("errors", "Please select a type and container"))
end
@doc false

View File

@ -1,4 +1,4 @@
defmodule Cannery.Ammo.AmmoType do
defmodule Cannery.Ammo.Type do
@moduledoc """
An ammunition type.
@ -38,7 +38,7 @@ defmodule Cannery.Ammo.AmmoType do
]}
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id
schema "ammo_types" do
schema "types" do
field :name, :string
field :desc, :string
@ -127,9 +127,9 @@ defmodule Cannery.Ammo.AmmoType do
inserted_at: NaiveDateTime.t(),
updated_at: NaiveDateTime.t()
}
@type new_ammo_type :: %__MODULE__{}
@type new_type :: %__MODULE__{}
@type id :: UUID.t()
@type changeset :: Changeset.t(t() | new_ammo_type())
@type changeset :: Changeset.t(t() | new_type())
@type class :: :rifle | :shotgun | :pistol | nil
@spec changeset_fields() :: [atom()]
@ -197,10 +197,10 @@ defmodule Cannery.Ammo.AmmoType do
]
@doc false
@spec create_changeset(new_ammo_type(), User.t(), attrs :: map()) :: changeset()
def create_changeset(ammo_type, %User{id: user_id}, attrs) do
@spec create_changeset(new_type(), User.t(), attrs :: map()) :: changeset()
def create_changeset(type, %User{id: user_id}, attrs) do
changeset =
ammo_type
type
|> change(user_id: user_id)
|> cast(attrs, changeset_fields())
@ -210,10 +210,10 @@ defmodule Cannery.Ammo.AmmoType do
end
@doc false
@spec update_changeset(t() | new_ammo_type(), attrs :: map()) :: changeset()
def update_changeset(ammo_type, attrs) do
@spec update_changeset(t() | new_type(), attrs :: map()) :: changeset()
def update_changeset(type, attrs) do
changeset =
ammo_type
type
|> cast(attrs, changeset_fields())
string_fields()

View File

@ -1,10 +1,10 @@
defmodule CanneryWeb.Components.AddShotGroupComponent do
defmodule CanneryWeb.Components.AddShotRecordComponent do
@moduledoc """
Livecomponent that can create a ShotGroup
Livecomponent that can create a ShotRecord
"""
use CanneryWeb, :live_component
alias Cannery.{Accounts.User, ActivityLog, ActivityLog.ShotGroup, Ammo.Pack}
alias Cannery.{Accounts.User, ActivityLog, ActivityLog.ShotRecord, Ammo.Pack}
alias Ecto.Changeset
alias Phoenix.LiveView.{JS, Socket}
@ -19,8 +19,8 @@ defmodule CanneryWeb.Components.AddShotGroupComponent do
) :: {:ok, Socket.t()}
def update(%{pack: pack, current_user: current_user} = assigns, socket) do
changeset =
%ShotGroup{date: Date.utc_today()}
|> ShotGroup.create_changeset(current_user, pack, %{})
%ShotRecord{date: Date.utc_today()}
|> ShotRecord.create_changeset(current_user, pack, %{})
{:ok, socket |> assign(assigns) |> assign(:changeset, changeset)}
end
@ -28,12 +28,12 @@ defmodule CanneryWeb.Components.AddShotGroupComponent do
@impl true
def handle_event(
"validate",
%{"shot_group" => shot_group_params},
%{"shot_record" => shot_record_params},
%{assigns: %{pack: pack, current_user: current_user}} = socket
) do
params = shot_group_params |> process_params(pack)
params = shot_record_params |> process_params(pack)
changeset = %ShotGroup{} |> ShotGroup.create_changeset(current_user, pack, params)
changeset = %ShotRecord{} |> ShotRecord.create_changeset(current_user, pack, params)
changeset =
case changeset |> Changeset.apply_action(:validate) do
@ -46,17 +46,17 @@ defmodule CanneryWeb.Components.AddShotGroupComponent do
def handle_event(
"save",
%{"shot_group" => shot_group_params},
%{"shot_record" => shot_record_params},
%{
assigns: %{pack: pack, current_user: current_user, return_to: return_to}
} = socket
) do
socket =
shot_group_params
shot_record_params
|> process_params(pack)
|> ActivityLog.create_shot_group(current_user, pack)
|> ActivityLog.create_shot_record(current_user, pack)
|> case do
{:ok, _shot_group} ->
{:ok, _shot_record} ->
prompt = dgettext("prompts", "Shots recorded successfully")
socket |> put_flash(:info, prompt) |> push_navigate(to: return_to)
@ -69,7 +69,7 @@ defmodule CanneryWeb.Components.AddShotGroupComponent do
# calculate count from shots left
defp process_params(params, %Pack{count: count}) do
shot_group_count =
shot_record_count =
if params |> Map.get("ammo_left", "") == "" do
nil
else
@ -77,6 +77,6 @@ defmodule CanneryWeb.Components.AddShotGroupComponent do
count - new_count
end
params |> Map.put("count", shot_group_count)
params |> Map.put("count", shot_record_count)
end
end

View File

@ -6,7 +6,7 @@
<.form
:let={f}
for={@changeset}
id="shot-group-form"
id="shot-record-form"
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
phx-target={@myself}
phx-change="validate"
@ -29,7 +29,7 @@
<button
type="button"
class="mx-2 my-1 text-sm btn btn-primary"
phx-click={JS.dispatch("cannery:set-zero", to: "#shot-group-form_ammo_left")}
phx-click={JS.dispatch("cannery:set-zero", to: "#shot-record-form_ammo_left")}
>
<%= gettext("Used up!") %>
</button>
@ -37,7 +37,7 @@
<%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %>
<%= textarea(f, :notes,
id: "add-shot-group-form-notes",
id: "add-shot-record-form-notes",
class: "input input-primary col-span-2",
maxlength: 255,
placeholder: gettext("Really great weather"),

View File

@ -7,7 +7,7 @@
>
<.link navigate={Routes.pack_show_path(Endpoint, :show, @pack)} class="mb-2 link">
<h1 class="title text-xl title-primary-500">
<%= @pack.ammo_type.name %>
<%= @pack.type.name %>
</h1>
</.link>

View File

@ -44,7 +44,7 @@
</li>
<li class="mx-2 my-1">
<.link
navigate={Routes.ammo_type_index_path(Endpoint, :index)}
navigate={Routes.type_index_path(Endpoint, :index)}
class="text-white hover:underline"
>
<%= gettext("Catalog") %>

View File

@ -16,7 +16,7 @@ defmodule CanneryWeb.Components.PackTableComponent do
required(:current_user) => User.t(),
required(:packs) => [Pack.t()],
required(:show_used) => boolean(),
optional(:ammo_type) => Rendered.t(),
optional(:type) => Rendered.t(),
optional(:range) => Rendered.t(),
optional(:container) => Rendered.t(),
optional(:actions) => Rendered.t(),
@ -31,7 +31,7 @@ defmodule CanneryWeb.Components.PackTableComponent do
socket =
socket
|> assign(assigns)
|> assign_new(:ammo_type, fn -> [] end)
|> assign_new(:type, fn -> [] end)
|> assign_new(:range, fn -> [] end)
|> assign_new(:container, fn -> [] end)
|> assign_new(:actions, fn -> [] end)
@ -45,7 +45,7 @@ defmodule CanneryWeb.Components.PackTableComponent do
assigns: %{
packs: packs,
current_user: current_user,
ammo_type: ammo_type,
type: type,
range: range,
container: container,
actions: actions,
@ -92,8 +92,8 @@ defmodule CanneryWeb.Components.PackTableComponent do
key: :count
})
|> TableComponent.maybe_compose_columns(
%{label: gettext("Ammo type"), key: :ammo_type},
ammo_type != []
%{label: gettext("Type"), key: :type},
type != []
)
containers =
@ -103,7 +103,7 @@ defmodule CanneryWeb.Components.PackTableComponent do
extra_data = %{
current_user: current_user,
ammo_type: ammo_type,
type: type,
columns: columns,
container: container,
containers: containers,
@ -144,15 +144,15 @@ defmodule CanneryWeb.Components.PackTableComponent do
@spec get_value_for_key(atom(), Pack.t(), additional_data :: map()) ::
any() | {any(), Rendered.t()}
defp get_value_for_key(
:ammo_type,
%{ammo_type: %{name: ammo_type_name} = ammo_type},
%{ammo_type: ammo_type_block}
:type,
%{type: %{name: type_name} = type},
%{type: type_block}
) do
assigns = %{ammo_type: ammo_type, ammo_type_block: ammo_type_block}
assigns = %{type: type, type_block: type_block}
{ammo_type_name,
{type_name,
~H"""
<%= render_slot(@ammo_type_block, @ammo_type) %>
<%= render_slot(@type_block, @type) %>
"""}
end

View File

@ -1,9 +1,9 @@
defmodule CanneryWeb.Components.ShotGroupTableComponent do
defmodule CanneryWeb.Components.ShotRecordTableComponent do
@moduledoc """
A component that displays a list of shot groups
A component that displays a list of shot records
"""
use CanneryWeb, :live_component
alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Ammo, ComparableDate}
alias Cannery.{Accounts.User, ActivityLog.ShotRecord, Ammo, ComparableDate}
alias Ecto.UUID
alias Phoenix.LiveView.{Rendered, Socket}
@ -12,26 +12,29 @@ defmodule CanneryWeb.Components.ShotGroupTableComponent do
%{
required(:id) => UUID.t(),
required(:current_user) => User.t(),
optional(:shot_groups) => [ShotGroup.t()],
optional(:shot_records) => [ShotRecord.t()],
optional(:actions) => Rendered.t(),
optional(any()) => any()
},
Socket.t()
) :: {:ok, Socket.t()}
def update(%{id: _id, shot_groups: _shot_groups, current_user: _current_user} = assigns, socket) do
def update(
%{id: _id, shot_records: _shot_records, current_user: _current_user} = assigns,
socket
) do
socket =
socket
|> assign(assigns)
|> assign_new(:actions, fn -> [] end)
|> display_shot_groups()
|> display_shot_records()
{:ok, socket}
end
defp display_shot_groups(
defp display_shot_records(
%{
assigns: %{
shot_groups: shot_groups,
shot_records: shot_records,
current_user: current_user,
actions: actions
}
@ -46,16 +49,16 @@ defmodule CanneryWeb.Components.ShotGroupTableComponent do
]
packs =
shot_groups
shot_records
|> Enum.map(fn %{pack_id: pack_id} -> pack_id end)
|> Ammo.get_packs(current_user)
extra_data = %{current_user: current_user, actions: actions, packs: packs}
rows =
shot_groups
|> Enum.map(fn shot_group ->
shot_group |> get_row_data_for_shot_group(columns, extra_data)
shot_records
|> Enum.map(fn shot_record ->
shot_record |> get_row_data_for_shot_record(columns, extra_data)
end)
socket
@ -81,22 +84,22 @@ defmodule CanneryWeb.Components.ShotGroupTableComponent do
"""
end
@spec get_row_data_for_shot_group(ShotGroup.t(), columns :: [map()], extra_data :: map()) ::
@spec get_row_data_for_shot_record(ShotRecord.t(), columns :: [map()], extra_data :: map()) ::
map()
defp get_row_data_for_shot_group(shot_group, columns, extra_data) do
defp get_row_data_for_shot_record(shot_record, columns, extra_data) do
columns
|> Map.new(fn %{key: key} ->
{key, get_row_value(key, shot_group, extra_data)}
{key, get_row_value(key, shot_record, extra_data)}
end)
end
defp get_row_value(:name, %{pack_id: pack_id}, %{packs: packs}) do
assigns = %{pack: pack = Map.fetch!(packs, pack_id)}
{pack.ammo_type.name,
{pack.type.name,
~H"""
<.link navigate={Routes.pack_show_path(Endpoint, :show, @pack)} class="link">
<%= @pack.ammo_type.name %>
<%= @pack.type.name %>
</.link>
"""}
end
@ -108,13 +111,13 @@ defmodule CanneryWeb.Components.ShotGroupTableComponent do
"""}
end
defp get_row_value(:actions, shot_group, %{actions: actions}) do
assigns = %{actions: actions, shot_group: shot_group}
defp get_row_value(:actions, shot_record, %{actions: actions}) do
assigns = %{actions: actions, shot_record: shot_record}
~H"""
<%= render_slot(@actions, @shot_group) %>
<%= render_slot(@actions, @shot_record) %>
"""
end
defp get_row_value(key, shot_group, _extra_data), do: shot_group |> Map.get(key)
defp get_row_value(key, shot_record, _extra_data), do: shot_record |> Map.get(key)
end

View File

@ -1,9 +1,9 @@
defmodule CanneryWeb.Components.AmmoTypeTableComponent do
defmodule CanneryWeb.Components.TypeTableComponent do
@moduledoc """
A component that displays a list of ammo type
A component that displays a list of types
"""
use CanneryWeb, :live_component
alias Cannery.{Accounts.User, ActivityLog, Ammo, Ammo.AmmoType}
alias Cannery.{Accounts.User, ActivityLog, Ammo, Ammo.Type}
alias CanneryWeb.Components.TableComponent
alias Ecto.UUID
alias Phoenix.LiveView.{Rendered, Socket}
@ -13,30 +13,30 @@ defmodule CanneryWeb.Components.AmmoTypeTableComponent do
%{
required(:id) => UUID.t(),
required(:current_user) => User.t(),
optional(:class) => AmmoType.class() | nil,
optional(:class) => Type.class() | nil,
optional(:show_used) => boolean(),
optional(:ammo_types) => [AmmoType.t()],
optional(:types) => [Type.t()],
optional(:actions) => Rendered.t(),
optional(any()) => any()
},
Socket.t()
) :: {:ok, Socket.t()}
def update(%{id: _id, ammo_types: _ammo_types, current_user: _current_user} = assigns, socket) do
def update(%{id: _id, types: _types, current_user: _current_user} = assigns, socket) do
socket =
socket
|> assign(assigns)
|> assign_new(:show_used, fn -> false end)
|> assign_new(:class, fn -> :all end)
|> assign_new(:actions, fn -> [] end)
|> display_ammo_types()
|> display_types()
{:ok, socket}
end
defp display_ammo_types(
defp display_types(
%{
assigns: %{
ammo_types: ammo_types,
types: types,
current_user: current_user,
show_used: show_used,
class: class,
@ -92,8 +92,8 @@ defmodule CanneryWeb.Components.AmmoTypeTableComponent do
# remove columns if all values match defaults
default_value = if type == :atom, do: false, else: nil
ammo_types
|> Enum.any?(fn ammo_type -> Map.get(ammo_type, key, default_value) != default_value end)
types
|> Enum.any?(fn type -> Map.get(type, key, default_value) != default_value end)
end)
columns =
@ -152,17 +152,17 @@ defmodule CanneryWeb.Components.AmmoTypeTableComponent do
)
|> TableComponent.maybe_compose_columns(%{label: gettext("Name"), key: :name, type: :name})
round_counts = ammo_types |> Ammo.get_round_count_for_ammo_types(current_user)
packs_count = ammo_types |> Ammo.get_packs_count_for_types(current_user)
average_costs = ammo_types |> Ammo.get_average_cost_for_ammo_types(current_user)
round_counts = types |> Ammo.get_round_count_for_types(current_user)
packs_count = types |> Ammo.get_packs_count_for_types(current_user)
average_costs = types |> Ammo.get_average_cost_for_types(current_user)
[used_counts, historical_round_counts, historical_pack_counts, used_pack_counts] =
if show_used do
[
ammo_types |> ActivityLog.get_used_count_for_ammo_types(current_user),
ammo_types |> Ammo.get_historical_count_for_ammo_types(current_user),
ammo_types |> Ammo.get_packs_count_for_types(current_user, true),
ammo_types |> Ammo.get_used_packs_count_for_types(current_user)
types |> ActivityLog.get_used_count_for_types(current_user),
types |> Ammo.get_historical_count_for_types(current_user),
types |> Ammo.get_packs_count_for_types(current_user, true),
types |> Ammo.get_used_packs_count_for_types(current_user)
]
else
[nil, nil, nil, nil]
@ -181,9 +181,9 @@ defmodule CanneryWeb.Components.AmmoTypeTableComponent do
}
rows =
ammo_types
|> Enum.map(fn ammo_type ->
ammo_type |> get_ammo_type_values(columns, extra_data)
types
|> Enum.map(fn type ->
type |> get_type_values(columns, extra_data)
end)
socket |> assign(columns: columns, rows: rows)
@ -198,92 +198,92 @@ defmodule CanneryWeb.Components.AmmoTypeTableComponent do
"""
end
defp get_ammo_type_values(ammo_type, columns, extra_data) do
defp get_type_values(type, columns, extra_data) do
columns
|> Map.new(fn %{key: key, type: type} ->
{key, get_ammo_type_value(type, key, ammo_type, extra_data)}
|> Map.new(fn %{key: key, type: column_type} ->
{key, get_type_value(column_type, key, type, extra_data)}
end)
end
defp get_ammo_type_value(:atom, key, ammo_type, _other_data),
do: ammo_type |> Map.get(key) |> humanize()
defp get_type_value(:atom, key, type, _other_data),
do: type |> Map.get(key) |> humanize()
defp get_ammo_type_value(:round_count, _key, %{id: ammo_type_id}, %{round_counts: round_counts}),
do: Map.get(round_counts, ammo_type_id, 0)
defp get_type_value(:round_count, _key, %{id: type_id}, %{round_counts: round_counts}),
do: Map.get(round_counts, type_id, 0)
defp get_ammo_type_value(
defp get_type_value(
:historical_round_count,
_key,
%{id: ammo_type_id},
%{id: type_id},
%{historical_round_counts: historical_round_counts}
) do
Map.get(historical_round_counts, ammo_type_id, 0)
Map.get(historical_round_counts, type_id, 0)
end
defp get_ammo_type_value(
defp get_type_value(
:used_round_count,
_key,
%{id: ammo_type_id},
%{id: type_id},
%{used_counts: used_counts}
) do
Map.get(used_counts, ammo_type_id, 0)
Map.get(used_counts, type_id, 0)
end
defp get_ammo_type_value(
defp get_type_value(
:historical_pack_count,
_key,
%{id: ammo_type_id},
%{id: type_id},
%{historical_pack_counts: historical_pack_counts}
) do
Map.get(historical_pack_counts, ammo_type_id, 0)
Map.get(historical_pack_counts, type_id, 0)
end
defp get_ammo_type_value(
defp get_type_value(
:used_pack_count,
_key,
%{id: ammo_type_id},
%{id: type_id},
%{used_pack_counts: used_pack_counts}
) do
Map.get(used_pack_counts, ammo_type_id, 0)
Map.get(used_pack_counts, type_id, 0)
end
defp get_ammo_type_value(:ammo_count, _key, %{id: ammo_type_id}, %{packs_count: packs_count}),
do: Map.get(packs_count, ammo_type_id)
defp get_type_value(:ammo_count, _key, %{id: type_id}, %{packs_count: packs_count}),
do: Map.get(packs_count, type_id)
defp get_ammo_type_value(
defp get_type_value(
:avg_price_paid,
_key,
%{id: ammo_type_id},
%{id: type_id},
%{average_costs: average_costs}
) do
case Map.get(average_costs, ammo_type_id) do
case Map.get(average_costs, type_id) do
nil -> {0, gettext("No cost information")}
count -> {count, gettext("$%{amount}", amount: display_currency(count))}
end
end
defp get_ammo_type_value(:name, _key, %{name: ammo_type_name} = ammo_type, _other_data) do
assigns = %{ammo_type: ammo_type}
defp get_type_value(:name, _key, %{name: type_name} = type, _other_data) do
assigns = %{type: type}
{ammo_type_name,
{type_name,
~H"""
<.link navigate={Routes.ammo_type_show_path(Endpoint, :show, @ammo_type)} class="link">
<%= @ammo_type.name %>
<.link navigate={Routes.type_show_path(Endpoint, :show, @type)} class="link">
<%= @type.name %>
</.link>
"""}
end
defp get_ammo_type_value(:actions, _key, ammo_type, %{actions: actions}) do
assigns = %{actions: actions, ammo_type: ammo_type}
defp get_type_value(:actions, _key, type, %{actions: actions}) do
assigns = %{actions: actions, type: type}
~H"""
<%= render_slot(@actions, @ammo_type) %>
<%= render_slot(@actions, @type) %>
"""
end
defp get_ammo_type_value(nil, _key, _ammo_type, _other_data), do: nil
defp get_type_value(nil, _key, _type, _other_data), do: nil
defp get_ammo_type_value(_other, key, ammo_type, _other_data), do: ammo_type |> Map.get(key)
defp get_type_value(_other, key, type, _other_data), do: type |> Map.get(key)
@spec display_currency(float()) :: String.t()
defp display_currency(float), do: :erlang.float_to_binary(float, decimals: 2)

View File

@ -3,27 +3,27 @@ defmodule CanneryWeb.ExportController do
alias Cannery.{ActivityLog, Ammo, Containers}
def export(%{assigns: %{current_user: current_user}} = conn, %{"mode" => "json"}) do
ammo_types = Ammo.list_ammo_types(current_user, :all)
used_counts = ammo_types |> ActivityLog.get_used_count_for_ammo_types(current_user)
round_counts = ammo_types |> Ammo.get_round_count_for_ammo_types(current_user)
pack_counts = ammo_types |> Ammo.get_packs_count_for_types(current_user)
types = Ammo.list_types(current_user, :all)
used_counts = types |> ActivityLog.get_used_count_for_types(current_user)
round_counts = types |> Ammo.get_round_count_for_types(current_user)
pack_counts = types |> Ammo.get_packs_count_for_types(current_user)
total_pack_counts = ammo_types |> Ammo.get_packs_count_for_types(current_user, true)
total_pack_counts = types |> Ammo.get_packs_count_for_types(current_user, true)
average_costs = ammo_types |> Ammo.get_average_cost_for_ammo_types(current_user)
average_costs = types |> Ammo.get_average_cost_for_types(current_user)
ammo_types =
ammo_types
|> Enum.map(fn %{id: ammo_type_id} = ammo_type ->
ammo_type
types =
types
|> Enum.map(fn %{id: type_id} = type ->
type
|> Jason.encode!()
|> Jason.decode!()
|> Map.merge(%{
"average_cost" => Map.get(average_costs, ammo_type_id),
"round_count" => Map.get(round_counts, ammo_type_id, 0),
"used_count" => Map.get(used_counts, ammo_type_id, 0),
"pack_count" => Map.get(pack_counts, ammo_type_id, 0),
"total_pack_count" => Map.get(total_pack_counts, ammo_type_id, 0)
"average_cost" => Map.get(average_costs, type_id),
"round_count" => Map.get(round_counts, type_id, 0),
"used_count" => Map.get(used_counts, type_id, 0),
"pack_count" => Map.get(pack_counts, type_id, 0),
"total_pack_count" => Map.get(total_pack_counts, type_id, 0)
})
end)
@ -47,7 +47,7 @@ defmodule CanneryWeb.ExportController do
})
end)
shot_groups = ActivityLog.list_shot_groups(:all, current_user)
shot_records = ActivityLog.list_shot_records(:all, current_user)
containers =
Containers.list_containers(current_user)
@ -66,9 +66,9 @@ defmodule CanneryWeb.ExportController do
json(conn, %{
user: current_user,
ammo_types: ammo_types,
types: types,
packs: packs,
shot_groups: shot_groups,
shot_records: shot_records,
containers: containers
})
end

View File

@ -86,19 +86,19 @@ defmodule CanneryWeb.ContainerLive.Show do
{:noreply, socket |> assign(:view_table, !view_table) |> render_container()}
end
def handle_event("change_class", %{"ammo_type" => %{"class" => "rifle"}}, socket) do
def handle_event("change_class", %{"type" => %{"class" => "rifle"}}, socket) do
{:noreply, socket |> assign(:class, :rifle) |> render_container()}
end
def handle_event("change_class", %{"ammo_type" => %{"class" => "shotgun"}}, socket) do
def handle_event("change_class", %{"type" => %{"class" => "shotgun"}}, socket) do
{:noreply, socket |> assign(:class, :shotgun) |> render_container()}
end
def handle_event("change_class", %{"ammo_type" => %{"class" => "pistol"}}, socket) do
def handle_event("change_class", %{"type" => %{"class" => "pistol"}}, socket) do
{:noreply, socket |> assign(:class, :pistol) |> render_container()}
end
def handle_event("change_class", %{"ammo_type" => %{"class" => _all}}, socket) do
def handle_event("change_class", %{"type" => %{"class" => _all}}, socket) do
{:noreply, socket |> assign(:class, :all) |> render_container()}
end

View File

@ -89,7 +89,7 @@
<.form
:let={f}
for={%{}}
as={:ammo_type}
as={:type}
phx-change="change_class"
phx-submit="change_class"
class="flex items-center"
@ -126,16 +126,16 @@
<%= if @view_table do %>
<.live_component
module={CanneryWeb.Components.PackTableComponent}
id="ammo-type-show-table"
id="type-show-table"
packs={@packs}
current_user={@current_user}
show_used={false}
>
<:ammo_type :let={%{name: ammo_type_name} = ammo_type}>
<.link navigate={Routes.ammo_type_show_path(Endpoint, :show, ammo_type)} class="link">
<%= ammo_type_name %>
<:type :let={%{name: type_name} = type}>
<.link navigate={Routes.type_show_path(Endpoint, :show, type)} class="link">
<%= type_name %>
</.link>
</:ammo_type>
</:type>
</.live_component>
<% else %>
<div class="flex flex-wrap justify-center items-stretch">

View File

@ -4,7 +4,7 @@ defmodule CanneryWeb.PackLive.FormComponent do
"""
use CanneryWeb, :live_component
alias Cannery.Ammo.{AmmoType, Pack}
alias Cannery.Ammo.{Pack, Type}
alias Cannery.{Accounts.User, Ammo, Containers, Containers.Container}
alias Ecto.Changeset
alias Phoenix.LiveView.Socket
@ -22,17 +22,17 @@ defmodule CanneryWeb.PackLive.FormComponent do
@spec update(Socket.t()) :: {:ok, Socket.t()}
def update(%{assigns: %{current_user: current_user}} = socket) do
%{assigns: %{ammo_types: ammo_types, containers: containers}} =
%{assigns: %{types: types, containers: containers}} =
socket =
socket
|> assign(:pack_create_limit, @pack_create_limit)
|> assign(:ammo_types, Ammo.list_ammo_types(current_user, :all))
|> assign(:types, Ammo.list_types(current_user, :all))
|> assign_new(:containers, fn -> Containers.list_containers(current_user) end)
params =
if ammo_types |> List.first() |> is_nil(),
if types |> List.first() |> is_nil(),
do: %{},
else: %{} |> Map.put("ammo_type_id", ammo_types |> List.first() |> Map.get(:id))
else: %{} |> Map.put("type_id", types |> List.first() |> Map.get(:id))
params =
if containers |> List.first() |> is_nil(),
@ -62,9 +62,9 @@ defmodule CanneryWeb.PackLive.FormComponent do
containers |> Enum.map(fn %{id: id, name: name} -> {name, id} end)
end
@spec ammo_type_options([AmmoType.t()]) :: [{String.t(), AmmoType.id()}]
defp ammo_type_options(ammo_types) do
ammo_types |> Enum.map(fn %{id: id, name: name} -> {name, id} end)
@spec type_options([Type.t()]) :: [{String.t(), Type.id()}]
defp type_options(types) do
types |> Enum.map(fn %{id: id, name: name} -> {name, id} end)
end
# Save Helpers
@ -83,9 +83,9 @@ defmodule CanneryWeb.PackLive.FormComponent do
changeset =
case default_action do
:insert ->
ammo_type = maybe_get_ammo_type(pack_params, user)
type = maybe_get_type(pack_params, user)
container = maybe_get_container(pack_params, user)
pack |> Pack.create_changeset(ammo_type, container, user, pack_params)
pack |> Pack.create_changeset(type, container, user, pack_params)
:update ->
pack |> Pack.update_changeset(pack_params, user)
@ -107,12 +107,12 @@ defmodule CanneryWeb.PackLive.FormComponent do
defp maybe_get_container(_params_not_found, _user), do: nil
defp maybe_get_ammo_type(%{"ammo_type_id" => ammo_type_id}, user)
when is_binary(ammo_type_id) do
ammo_type_id |> Ammo.get_ammo_type!(user)
defp maybe_get_type(%{"type_id" => type_id}, user)
when is_binary(type_id) do
type_id |> Ammo.get_type!(user)
end
defp maybe_get_ammo_type(_params_not_found, _user), do: nil
defp maybe_get_type(_params_not_found, _user), do: nil
defp save_pack(
%{assigns: %{pack: pack, current_user: current_user, return_to: return_to}} = socket,

View File

@ -19,11 +19,11 @@
<%= changeset_errors(@changeset) %>
</div>
<%= label(f, :ammo_type_id, gettext("Ammo type"), class: "title text-lg text-primary-600") %>
<%= select(f, :ammo_type_id, ammo_type_options(@ammo_types),
<%= label(f, :type_id, gettext("Type"), class: "title text-lg text-primary-600") %>
<%= select(f, :type_id, type_options(@types),
class: "text-center col-span-2 input input-primary"
) %>
<%= error_tag(f, :ammo_type_id, "col-span-3 text-center") %>
<%= error_tag(f, :type_id, "col-span-3 text-center") %>
<%= label(f, :count, gettext("Count"), class: "title text-lg text-primary-600") %>
<%= number_input(f, :count,
@ -49,7 +49,7 @@
<%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %>
<%= textarea(f, :notes,
id: "ammo-group-form-notes",
id: "pack-form-notes",
class: "text-center col-span-2 input input-primary",
phx_hook: "MaintainAttrs",
phx_update: "ignore"

View File

@ -27,7 +27,7 @@ defmodule CanneryWeb.PackLive.Index do
defp apply_action(
%{assigns: %{current_user: current_user}} = socket,
:add_shot_group,
:add_shot_record,
%{"id" => id}
) do
socket
@ -122,19 +122,19 @@ defmodule CanneryWeb.PackLive.Index do
{:noreply, socket}
end
def handle_event("change_class", %{"ammo_type" => %{"class" => "rifle"}}, socket) do
def handle_event("change_class", %{"type" => %{"class" => "rifle"}}, socket) do
{:noreply, socket |> assign(:class, :rifle) |> display_packs()}
end
def handle_event("change_class", %{"ammo_type" => %{"class" => "shotgun"}}, socket) do
def handle_event("change_class", %{"type" => %{"class" => "shotgun"}}, socket) do
{:noreply, socket |> assign(:class, :shotgun) |> display_packs()}
end
def handle_event("change_class", %{"ammo_type" => %{"class" => "pistol"}}, socket) do
def handle_event("change_class", %{"type" => %{"class" => "pistol"}}, socket) do
{:noreply, socket |> assign(:class, :pistol) |> display_packs()}
end
def handle_event("change_class", %{"ammo_type" => %{"class" => _all}}, socket) do
def handle_event("change_class", %{"type" => %{"class" => _all}}, socket) do
{:noreply, socket |> assign(:class, :all) |> display_packs()}
end
@ -152,13 +152,13 @@ defmodule CanneryWeb.PackLive.Index do
# prompts
packs_count = Ammo.get_packs_count!(current_user, true)
packs = Ammo.list_packs(search, class, current_user, show_used)
ammo_types_count = Ammo.get_ammo_types_count!(current_user)
types_count = Ammo.get_types_count!(current_user)
containers_count = Containers.get_containers_count!(current_user)
socket
|> assign(
packs: packs,
ammo_types_count: ammo_types_count,
types_count: types_count,
containers_count: containers_count,
packs_count: packs_count
)

View File

@ -14,14 +14,14 @@
<%= dgettext("actions", "add a container first") %>
</.link>
</div>
<% @ammo_types_count == 0 -> %>
<% @types_count == 0 -> %>
<div class="flex justify-center items-center">
<h2 class="m-2 title text-md text-primary-600">
<%= dgettext("prompts", "You'll need to") %>
</h2>
<.link navigate={Routes.ammo_type_index_path(Endpoint, :new)} class="btn btn-primary">
<%= dgettext("actions", "add an ammo type first") %>
<.link navigate={Routes.type_index_path(Endpoint, :new)} class="btn btn-primary">
<%= dgettext("actions", "add a type first") %>
</.link>
</div>
<% @packs_count == 0 -> %>
@ -42,7 +42,7 @@
<.form
:let={f}
for={%{}}
as={:ammo_type}
as={:type}
phx-change="change_class"
phx-submit="change_class"
class="flex items-center"
@ -97,16 +97,16 @@
<% else %>
<.live_component
module={CanneryWeb.Components.PackTableComponent}
id="ammo-group-index-table"
id="pack-index-table"
packs={@packs}
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">
<%= ammo_type_name %>
<:type :let={%{name: type_name} = type}>
<.link navigate={Routes.type_show_path(Endpoint, :show, type)} class="link">
<%= type_name %>
</.link>
</:ammo_type>
</:type>
<:range :let={pack}>
<div class="min-w-20 py-2 px-4 h-full flex flew-wrap justify-center items-center">
<button
@ -121,7 +121,7 @@
</button>
<.link
patch={Routes.pack_index_path(Endpoint, :add_shot_group, pack)}
patch={Routes.pack_index_path(Endpoint, :add_shot_record, pack)}
class="mx-2 my-1 text-sm btn btn-primary"
>
<%= dgettext("actions", "Record shots") %>
@ -213,10 +213,10 @@
current_user={@current_user}
/>
</.modal>
<% :add_shot_group -> %>
<% :add_shot_record -> %>
<.modal return_to={Routes.pack_index_path(Endpoint, :index)}>
<.live_component
module={CanneryWeb.Components.AddShotGroupComponent}
module={CanneryWeb.Components.AddShotRecordComponent}
id={:new}
title={@page_title}
action={@live_action}

View File

@ -4,7 +4,7 @@ defmodule CanneryWeb.PackLive.Show do
"""
use CanneryWeb, :live_view
alias Cannery.{ActivityLog, ActivityLog.ShotGroup}
alias Cannery.{ActivityLog, ActivityLog.ShotRecord}
alias Cannery.{Ammo, Ammo.Pack}
alias Cannery.{ComparableDate, Containers}
alias CanneryWeb.Endpoint
@ -15,15 +15,15 @@ defmodule CanneryWeb.PackLive.Show do
@impl true
def handle_params(
%{"id" => id, "shot_group_id" => shot_group_id},
%{"id" => id, "shot_record_id" => shot_record_id},
_url,
%{assigns: %{live_action: live_action, current_user: current_user}} = socket
) do
shot_group = ActivityLog.get_shot_group!(shot_group_id, current_user)
shot_record = ActivityLog.get_shot_record!(shot_record_id, current_user)
socket =
socket
|> assign(page_title: page_title(live_action), shot_group: shot_group)
|> assign(page_title: page_title(live_action), shot_record: shot_record)
|> display_pack(id)
{:noreply, socket}
@ -38,8 +38,8 @@ defmodule CanneryWeb.PackLive.Show do
{:noreply, socket}
end
defp page_title(:add_shot_group), do: gettext("Record Shots")
defp page_title(:edit_shot_group), do: gettext("Edit Shot Records")
defp page_title(:add_shot_record), do: gettext("Record Shots")
defp page_title(:edit_shot_record), do: gettext("Edit Shot Record")
defp page_title(:move), do: gettext("Move Ammo")
defp page_title(:show), do: gettext("Show Ammo")
defp page_title(:edit), do: gettext("Edit Ammo")
@ -69,13 +69,13 @@ defmodule CanneryWeb.PackLive.Show do
end
def handle_event(
"delete_shot_group",
"delete_shot_record",
%{"id" => id},
%{assigns: %{pack: %{id: pack_id}, current_user: current_user}} = socket
) do
{:ok, _} =
ActivityLog.get_shot_group!(id, current_user)
|> ActivityLog.delete_shot_group(current_user)
ActivityLog.get_shot_record!(id, current_user)
|> ActivityLog.delete_shot_record(current_user)
prompt = dgettext("prompts", "Shot records deleted succesfully")
{:noreply, socket |> put_flash(:info, prompt) |> display_pack(pack_id)}
@ -93,12 +93,12 @@ defmodule CanneryWeb.PackLive.Show do
%{label: gettext("Actions"), key: :actions, sortable: false}
]
shot_groups = ActivityLog.list_shot_groups_for_pack(pack, current_user)
shot_records = ActivityLog.list_shot_records_for_pack(pack, current_user)
rows =
shot_groups
|> Enum.map(fn shot_group ->
pack |> get_table_row_for_shot_group(shot_group, columns)
shot_records
|> Enum.map(fn shot_record ->
pack |> get_table_row_for_shot_record(shot_record, columns)
end)
socket
@ -107,7 +107,7 @@ defmodule CanneryWeb.PackLive.Show do
original_count: Ammo.get_original_count(pack, current_user),
percentage_remaining: Ammo.get_percentage_remaining(pack, current_user),
container: container_id && Containers.get_container!(container_id, current_user),
shot_groups: shot_groups,
shot_records: shot_records,
columns: columns,
rows: rows
)
@ -119,9 +119,9 @@ defmodule CanneryWeb.PackLive.Show do
@spec display_currency(float()) :: String.t()
defp display_currency(float), do: :erlang.float_to_binary(float, decimals: 2)
@spec get_table_row_for_shot_group(Pack.t(), ShotGroup.t(), [map()]) :: map()
defp get_table_row_for_shot_group(pack, %{id: id, date: date} = shot_group, columns) do
assigns = %{pack: pack, shot_group: shot_group}
@spec get_table_row_for_shot_record(Pack.t(), ShotRecord.t(), [map()]) :: map()
defp get_table_row_for_shot_record(pack, %{id: id, date: date} = shot_record, columns) do
assigns = %{pack: pack, shot_record: shot_record}
columns
|> Map.new(fn %{key: key} ->
@ -139,11 +139,11 @@ defmodule CanneryWeb.PackLive.Show do
~H"""
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
<.link
patch={Routes.pack_show_path(Endpoint, :edit_shot_group, @pack, @shot_group)}
patch={Routes.pack_show_path(Endpoint, :edit_shot_record, @pack, @shot_record)}
class="text-primary-600 link"
aria-label={
dgettext("actions", "Edit shot group of %{shot_group_count} shots",
shot_group_count: @shot_group.count
dgettext("actions", "Edit shot record of %{shot_record_count} shots",
shot_record_count: @shot_record.count
)
}
>
@ -153,12 +153,12 @@ defmodule CanneryWeb.PackLive.Show do
<.link
href="#"
class="text-primary-600 link"
phx-click="delete_shot_group"
phx-value-id={@shot_group.id}
phx-click="delete_shot_record"
phx-value-id={@shot_record.id}
data-confirm={dgettext("prompts", "Are you sure you want to delete this shot record?")}
aria-label={
dgettext("actions", "Delete shot record of %{shot_group_count} shots",
shot_group_count: @shot_group.count
dgettext("actions", "Delete shot record of %{shot_record_count} shots",
shot_record_count: @shot_record.count
)
}
>
@ -168,7 +168,7 @@ defmodule CanneryWeb.PackLive.Show do
"""
key ->
shot_group |> Map.get(key)
shot_record |> Map.get(key)
end
{key, value}

View File

@ -1,6 +1,6 @@
<div class="mx-auto space-y-4 max-w-3xl flex flex-col justify-center items-center">
<h1 class="title text-2xl title-primary-500">
<%= @pack.ammo_type.name %>
<%= @pack.type.name %>
</h1>
<div class="space-y-2 flex flex-col justify-center items-center">
@ -49,7 +49,7 @@
<div class="flex flex-col justify-center items-center">
<div class="flex flex-wrap justify-center items-center text-primary-600">
<.link
navigate={Routes.ammo_type_show_path(Endpoint, :show, @pack.ammo_type)}
navigate={Routes.type_show_path(Endpoint, :show, @pack.type)}
class="mx-4 my-2 btn btn-primary"
>
<%= dgettext("actions", "View in Catalog") %>
@ -90,7 +90,7 @@
</.link>
<.link
patch={Routes.pack_show_path(Endpoint, :add_shot_group, @pack)}
patch={Routes.pack_show_path(Endpoint, :add_shot_record, @pack)}
class="mx-4 my-2 btn btn-primary"
>
<%= dgettext("actions", "Record shots") %>
@ -112,7 +112,7 @@
<% end %>
</div>
<%= unless @shot_groups |> Enum.empty?() do %>
<%= unless @shot_records |> Enum.empty?() do %>
<hr class="mb-4 w-full" />
<h1 class="mb-4 px-4 py-2 text-center rounded-lg title text-xl">
@ -121,7 +121,7 @@
<.live_component
module={CanneryWeb.Components.TableComponent}
id="pack_shot_groups_table"
id="pack_shot_records_table"
columns={@columns}
rows={@rows}
/>
@ -141,22 +141,22 @@
current_user={@current_user}
/>
</.modal>
<% :edit_shot_group -> %>
<% :edit_shot_record -> %>
<.modal return_to={Routes.pack_show_path(Endpoint, :show, @pack)}>
<.live_component
module={CanneryWeb.RangeLive.FormComponent}
id={@shot_group.id}
id={@shot_record.id}
title={@page_title}
action={@live_action}
shot_group={@shot_group}
shot_record={@shot_record}
return_to={Routes.pack_show_path(Endpoint, :show, @pack)}
current_user={@current_user}
/>
</.modal>
<% :add_shot_group -> %>
<% :add_shot_record -> %>
<.modal return_to={Routes.pack_show_path(Endpoint, :show, @pack)}>
<.live_component
module={CanneryWeb.Components.AddShotGroupComponent}
module={CanneryWeb.Components.AddShotRecordComponent}
id={:new}
title={@page_title}
action={@live_action}

View File

@ -1,10 +1,10 @@
defmodule CanneryWeb.RangeLive.FormComponent do
@moduledoc """
Livecomponent that can update a ShotGroup
Livecomponent that can update a ShotRecord
"""
use CanneryWeb, :live_component
alias Cannery.{Accounts.User, ActivityLog, ActivityLog.ShotGroup, Ammo, Ammo.Pack}
alias Cannery.{Accounts.User, ActivityLog, ActivityLog.ShotRecord, Ammo, Ammo.Pack}
alias Ecto.Changeset
alias Phoenix.LiveView.Socket
@ -14,7 +14,7 @@ defmodule CanneryWeb.RangeLive.FormComponent do
@impl true
@spec update(
%{
required(:shot_group) => ShotGroup.t(),
required(:shot_record) => ShotRecord.t(),
required(:current_user) => User.t(),
optional(:pack) => Pack.t(),
optional(any()) => any()
@ -23,7 +23,7 @@ defmodule CanneryWeb.RangeLive.FormComponent do
) :: {:ok, Socket.t()}
def update(
%{
shot_group: %ShotGroup{pack_id: pack_id},
shot_record: %ShotRecord{pack_id: pack_id},
current_user: current_user
} = assigns,
socket
@ -33,24 +33,24 @@ defmodule CanneryWeb.RangeLive.FormComponent do
{:ok, socket |> assign(assigns) |> assign(:pack, pack) |> assign_changeset(%{})}
end
def update(%{shot_group: %ShotGroup{}} = assigns, socket) do
def update(%{shot_record: %ShotRecord{}} = assigns, socket) do
{:ok, socket |> assign(assigns) |> assign_changeset(%{})}
end
@impl true
def handle_event("validate", %{"shot_group" => shot_group_params}, socket) do
{:noreply, socket |> assign_changeset(shot_group_params, :validate)}
def handle_event("validate", %{"shot_record" => shot_record_params}, socket) do
{:noreply, socket |> assign_changeset(shot_record_params, :validate)}
end
def handle_event(
"save",
%{"shot_group" => shot_group_params},
%{assigns: %{shot_group: shot_group, current_user: current_user, return_to: return_to}} =
%{"shot_record" => shot_record_params},
%{assigns: %{shot_record: shot_record, current_user: current_user, return_to: return_to}} =
socket
) do
socket =
case ActivityLog.update_shot_group(shot_group, shot_group_params, current_user) do
{:ok, _shot_group} ->
case ActivityLog.update_shot_record(shot_record, shot_record_params, current_user) do
{:ok, _shot_record} ->
prompt = dgettext("prompts", "Shot records updated successfully")
socket |> put_flash(:info, prompt) |> push_navigate(to: return_to)
@ -67,22 +67,22 @@ defmodule CanneryWeb.RangeLive.FormComponent do
action: live_action,
current_user: user,
pack: pack,
shot_group: shot_group
shot_record: shot_record
}
} = socket,
shot_group_params,
shot_record_params,
action \\ nil
) do
default_action =
case live_action do
:add_shot_group -> :insert
editing when editing in [:edit, :edit_shot_group] -> :update
:add_shot_record -> :insert
editing when editing in [:edit, :edit_shot_record] -> :update
end
changeset =
case default_action do
:insert -> shot_group |> ShotGroup.create_changeset(user, pack, shot_group_params)
:update -> shot_group |> ShotGroup.update_changeset(user, shot_group_params)
:insert -> shot_record |> ShotRecord.create_changeset(user, pack, shot_record_params)
:update -> shot_record |> ShotRecord.update_changeset(user, shot_record_params)
end
changeset =

View File

@ -6,7 +6,7 @@
<.form
:let={f}
for={@changeset}
id="shot-group-form"
id="shot-record-form"
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
phx-target={@myself}
phx-change="validate"
@ -22,14 +22,14 @@
<%= label(f, :count, gettext("Shots fired"), class: "title text-lg text-primary-600") %>
<%= number_input(f, :count,
min: 1,
max: @shot_group.count + @pack.count,
max: @shot_record.count + @pack.count,
class: "input input-primary col-span-2"
) %>
<%= error_tag(f, :count, "col-span-3") %>
<%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %>
<%= textarea(f, :notes,
id: "shot-group-form-notes",
id: "shot-record-form-notes",
class: "input input-primary col-span-2",
maxlength: 255,
placeholder: gettext("Really great weather"),

View File

@ -4,17 +4,17 @@ defmodule CanneryWeb.RangeLive.Index do
"""
use CanneryWeb, :live_view
alias Cannery.{ActivityLog, ActivityLog.ShotGroup, Ammo}
alias Cannery.{ActivityLog, ActivityLog.ShotRecord, Ammo}
alias CanneryWeb.Endpoint
alias Phoenix.LiveView.Socket
@impl true
def mount(%{"search" => search}, _session, socket) do
{:ok, socket |> assign(class: :all, search: search) |> display_shot_groups()}
{:ok, socket |> assign(class: :all, search: search) |> display_shot_records()}
end
def mount(_params, _session, socket) do
{:ok, socket |> assign(class: :all, search: nil) |> display_shot_groups()}
{:ok, socket |> assign(class: :all, search: nil) |> display_shot_records()}
end
@impl true
@ -24,7 +24,7 @@ defmodule CanneryWeb.RangeLive.Index do
defp apply_action(
%{assigns: %{current_user: current_user}} = socket,
:add_shot_group,
:add_shot_record,
%{"id" => id}
) do
socket
@ -37,8 +37,8 @@ defmodule CanneryWeb.RangeLive.Index do
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
socket
|> assign(
page_title: gettext("Edit Shot Records"),
shot_group: ActivityLog.get_shot_group!(id, current_user)
page_title: gettext("Edit Shot Record"),
shot_record: ActivityLog.get_shot_record!(id, current_user)
)
end
@ -46,7 +46,7 @@ defmodule CanneryWeb.RangeLive.Index do
socket
|> assign(
page_title: gettext("New Shot Records"),
shot_group: %ShotGroup{}
shot_record: %ShotRecord{}
)
end
@ -55,9 +55,9 @@ defmodule CanneryWeb.RangeLive.Index do
|> assign(
page_title: gettext("Shot Records"),
search: nil,
shot_group: nil
shot_record: nil
)
|> display_shot_groups()
|> display_shot_records()
end
defp apply_action(socket, :search, %{"search" => search}) do
@ -65,19 +65,19 @@ defmodule CanneryWeb.RangeLive.Index do
|> assign(
page_title: gettext("Shot Records"),
search: search,
shot_group: nil
shot_record: nil
)
|> display_shot_groups()
|> display_shot_records()
end
@impl true
def handle_event("delete", %{"id" => id}, %{assigns: %{current_user: current_user}} = socket) do
{:ok, _} =
ActivityLog.get_shot_group!(id, current_user)
|> ActivityLog.delete_shot_group(current_user)
ActivityLog.get_shot_record!(id, current_user)
|> ActivityLog.delete_shot_record(current_user)
prompt = dgettext("prompts", "Shot records deleted succesfully")
{:noreply, socket |> put_flash(:info, prompt) |> display_shot_groups()}
{:noreply, socket |> put_flash(:info, prompt) |> display_shot_records()}
end
def handle_event(
@ -90,7 +90,7 @@ defmodule CanneryWeb.RangeLive.Index do
{:ok, _pack} = pack |> Ammo.update_pack(%{"staged" => !pack.staged}, current_user)
prompt = dgettext("prompts", "Ammo unstaged succesfully")
{:noreply, socket |> put_flash(:info, prompt) |> display_shot_groups()}
{:noreply, socket |> put_flash(:info, prompt) |> display_shot_records()}
end
def handle_event("search", %{"search" => %{"search_term" => ""}}, socket) do
@ -101,29 +101,29 @@ defmodule CanneryWeb.RangeLive.Index do
{:noreply, socket |> push_patch(to: Routes.range_index_path(Endpoint, :search, search_term))}
end
def handle_event("change_class", %{"ammo_type" => %{"class" => "rifle"}}, socket) do
{:noreply, socket |> assign(:class, :rifle) |> display_shot_groups()}
def handle_event("change_class", %{"type" => %{"class" => "rifle"}}, socket) do
{:noreply, socket |> assign(:class, :rifle) |> display_shot_records()}
end
def handle_event("change_class", %{"ammo_type" => %{"class" => "shotgun"}}, socket) do
{:noreply, socket |> assign(:class, :shotgun) |> display_shot_groups()}
def handle_event("change_class", %{"type" => %{"class" => "shotgun"}}, socket) do
{:noreply, socket |> assign(:class, :shotgun) |> display_shot_records()}
end
def handle_event("change_class", %{"ammo_type" => %{"class" => "pistol"}}, socket) do
{:noreply, socket |> assign(:class, :pistol) |> display_shot_groups()}
def handle_event("change_class", %{"type" => %{"class" => "pistol"}}, socket) do
{:noreply, socket |> assign(:class, :pistol) |> display_shot_records()}
end
def handle_event("change_class", %{"ammo_type" => %{"class" => _all}}, socket) do
{:noreply, socket |> assign(:class, :all) |> display_shot_groups()}
def handle_event("change_class", %{"type" => %{"class" => _all}}, socket) do
{:noreply, socket |> assign(:class, :all) |> display_shot_records()}
end
@spec display_shot_groups(Socket.t()) :: Socket.t()
defp display_shot_groups(
@spec display_shot_records(Socket.t()) :: Socket.t()
defp display_shot_records(
%{assigns: %{class: class, search: search, current_user: current_user}} = socket
) do
shot_groups = ActivityLog.list_shot_groups(search, class, current_user)
shot_records = ActivityLog.list_shot_records(search, class, current_user)
packs = Ammo.list_staged_packs(current_user)
chart_data = shot_groups |> get_chart_data_for_shot_group()
chart_data = shot_records |> get_chart_data_for_shot_record()
original_counts = packs |> Ammo.get_original_counts(current_user)
cprs = packs |> Ammo.get_cprs(current_user)
last_used_dates = packs |> ActivityLog.get_last_used_dates(current_user)
@ -136,14 +136,14 @@ defmodule CanneryWeb.RangeLive.Index do
cprs: cprs,
last_used_dates: last_used_dates,
chart_data: chart_data,
shot_groups: shot_groups,
shot_records: shot_records,
shot_record_count: shot_record_count
)
end
@spec get_chart_data_for_shot_group([ShotGroup.t()]) :: [map()]
defp get_chart_data_for_shot_group(shot_groups) do
shot_groups
@spec get_chart_data_for_shot_record([ShotRecord.t()]) :: [map()]
defp get_chart_data_for_shot_record(shot_records) do
shot_records
|> Enum.group_by(fn %{date: date} -> date end, fn %{count: count} -> count end)
|> Enum.map(fn {date, rounds} ->
sum = Enum.sum(rounds)

View File

@ -39,7 +39,7 @@
</button>
<.link
patch={Routes.range_index_path(Endpoint, :add_shot_group, pack)}
patch={Routes.range_index_path(Endpoint, :add_shot_record, pack)}
class="btn btn-primary"
>
<%= dgettext("actions", "Record shots") %>
@ -78,7 +78,7 @@
<.form
:let={f}
for={%{}}
as={:ammo_type}
as={:type}
phx-change="change_class"
phx-submit="change_class"
class="flex items-center"
@ -117,26 +117,26 @@
</.form>
</div>
<%= if @shot_groups |> Enum.empty?() do %>
<%= if @shot_records |> Enum.empty?() do %>
<h1 class="title text-xl text-primary-600">
<%= gettext("No shots recorded") %>
<%= display_emoji("😔") %>
</h1>
<% else %>
<.live_component
module={CanneryWeb.Components.ShotGroupTableComponent}
id="shot_groups_index_table"
shot_groups={@shot_groups}
module={CanneryWeb.Components.ShotRecordTableComponent}
id="shot_records_index_table"
shot_records={@shot_records}
current_user={@current_user}
>
<:actions :let={shot_group}>
<:actions :let={shot_record}>
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
<.link
patch={Routes.range_index_path(Endpoint, :edit, shot_group)}
patch={Routes.range_index_path(Endpoint, :edit, shot_record)}
class="text-primary-600 link"
aria-label={
dgettext("actions", "Edit shot record of %{shot_group_count} shots",
shot_group_count: shot_group.count
dgettext("actions", "Edit shot record of %{shot_record_count} shots",
shot_record_count: shot_record.count
)
}
>
@ -147,13 +147,13 @@
href="#"
class="text-primary-600 link"
phx-click="delete"
phx-value-id={shot_group.id}
phx-value-id={shot_record.id}
data-confirm={
dgettext("prompts", "Are you sure you want to delete this shot record?")
}
aria-label={
dgettext("actions", "Delete shot record of %{shot_group_count} shots",
shot_group_count: shot_group.count
dgettext("actions", "Delete shot record of %{shot_record_count} shots",
shot_record_count: shot_record.count
)
}
>
@ -171,18 +171,18 @@
<.modal return_to={Routes.range_index_path(Endpoint, :index)}>
<.live_component
module={CanneryWeb.RangeLive.FormComponent}
id={@shot_group.id}
id={@shot_record.id}
title={@page_title}
action={@live_action}
shot_group={@shot_group}
shot_record={@shot_record}
return_to={Routes.range_index_path(Endpoint, :index)}
current_user={@current_user}
/>
</.modal>
<% :add_shot_group -> %>
<% :add_shot_record -> %>
<.modal return_to={Routes.range_index_path(Endpoint, :index)}>
<.live_component
module={CanneryWeb.Components.AddShotGroupComponent}
module={CanneryWeb.Components.AddShotRecordComponent}
id={:new}
title={@page_title}
action={@live_action}

View File

@ -1,16 +1,16 @@
defmodule CanneryWeb.AmmoTypeLive.FormComponent do
defmodule CanneryWeb.TypeLive.FormComponent do
@moduledoc """
Livecomponent that can update or create an Cannery.Ammo.AmmoType
Livecomponent that can update or create an Cannery.Ammo.Type
"""
use CanneryWeb, :live_component
alias Cannery.{Accounts.User, Ammo, Ammo.AmmoType}
alias Cannery.{Accounts.User, Ammo, Ammo.Type}
alias Ecto.Changeset
alias Phoenix.LiveView.Socket
@impl true
@spec update(
%{:ammo_type => AmmoType.t(), :current_user => User.t(), optional(any) => any},
%{:type => Type.t(), :current_user => User.t(), optional(any) => any},
Socket.t()
) :: {:ok, Socket.t()}
def update(%{current_user: _current_user} = assigns, socket) do
@ -18,21 +18,21 @@ defmodule CanneryWeb.AmmoTypeLive.FormComponent do
end
@impl true
def handle_event("validate", %{"ammo_type" => ammo_type_params}, socket) do
{:noreply, socket |> assign_changeset(ammo_type_params)}
def handle_event("validate", %{"type" => type_params}, socket) do
{:noreply, socket |> assign_changeset(type_params)}
end
def handle_event(
"save",
%{"ammo_type" => ammo_type_params},
%{"type" => type_params},
%{assigns: %{action: action}} = socket
) do
save_ammo_type(socket, action, ammo_type_params)
save_type(socket, action, type_params)
end
defp assign_changeset(
%{assigns: %{action: action, ammo_type: ammo_type, current_user: user}} = socket,
ammo_type_params
%{assigns: %{action: action, type: type, current_user: user}} = socket,
type_params
) do
changeset_action =
case action do
@ -43,10 +43,10 @@ defmodule CanneryWeb.AmmoTypeLive.FormComponent do
changeset =
case action do
create when create in [:new, :clone] ->
ammo_type |> AmmoType.create_changeset(user, ammo_type_params)
type |> Type.create_changeset(user, type_params)
:edit ->
ammo_type |> AmmoType.update_changeset(ammo_type_params)
type |> Type.update_changeset(type_params)
end
changeset =
@ -58,16 +58,15 @@ defmodule CanneryWeb.AmmoTypeLive.FormComponent do
socket |> assign(changeset: changeset)
end
defp save_ammo_type(
%{assigns: %{ammo_type: ammo_type, current_user: current_user, return_to: return_to}} =
socket,
defp save_type(
%{assigns: %{type: type, current_user: current_user, return_to: return_to}} = socket,
:edit,
ammo_type_params
type_params
) do
socket =
case Ammo.update_ammo_type(ammo_type, ammo_type_params, current_user) do
{:ok, %{name: ammo_type_name}} ->
prompt = dgettext("prompts", "%{name} updated successfully", name: ammo_type_name)
case Ammo.update_type(type, type_params, current_user) do
{:ok, %{name: type_name}} ->
prompt = dgettext("prompts", "%{name} updated successfully", name: type_name)
socket |> put_flash(:info, prompt) |> push_navigate(to: return_to)
{:error, %Changeset{} = changeset} ->
@ -77,16 +76,16 @@ defmodule CanneryWeb.AmmoTypeLive.FormComponent do
{:noreply, socket}
end
defp save_ammo_type(
defp save_type(
%{assigns: %{current_user: current_user, return_to: return_to}} = socket,
action,
ammo_type_params
type_params
)
when action in [:new, :clone] do
socket =
case Ammo.create_ammo_type(ammo_type_params, current_user) do
{:ok, %{name: ammo_type_name}} ->
prompt = dgettext("prompts", "%{name} created successfully", name: ammo_type_name)
case Ammo.create_type(type_params, current_user) do
{:ok, %{name: type_name}} ->
prompt = dgettext("prompts", "%{name} created successfully", name: type_name)
socket |> put_flash(:info, prompt) |> push_navigate(to: return_to)
{:error, %Changeset{} = changeset} ->

View File

@ -5,7 +5,7 @@
<.form
:let={f}
for={@changeset}
id="ammo_type-form"
id="type-form"
phx-target={@myself}
phx-change="validate"
phx-submit="save"
@ -37,7 +37,7 @@
<%= label(f, :desc, gettext("Description"), class: "title text-lg text-primary-600") %>
<%= textarea(f, :desc,
id: "ammo-type-form-desc",
id: "type-form-desc",
class: "text-center col-span-2 input input-primary",
phx_hook: "MaintainAttrs",
phx_update: "ignore"

View File

@ -1,18 +1,18 @@
defmodule CanneryWeb.AmmoTypeLive.Index do
defmodule CanneryWeb.TypeLive.Index do
@moduledoc """
Liveview for showing a Cannery.Ammo.AmmoType index
Liveview for showing a Cannery.Ammo.Type index
"""
use CanneryWeb, :live_view
alias Cannery.{Ammo, Ammo.AmmoType}
alias Cannery.{Ammo, Ammo.Type}
@impl true
def mount(%{"search" => search}, _session, socket) do
{:ok, socket |> assign(class: :all, show_used: false, search: search) |> list_ammo_types()}
{:ok, socket |> assign(class: :all, show_used: false, search: search) |> list_types()}
end
def mount(_params, _session, socket) do
{:ok, socket |> assign(class: :all, show_used: false, search: nil) |> list_ammo_types()}
{:ok, socket |> assign(class: :all, show_used: false, search: nil) |> list_types()}
end
@impl true
@ -21,28 +21,28 @@ defmodule CanneryWeb.AmmoTypeLive.Index do
end
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
%{name: ammo_type_name} = ammo_type = Ammo.get_ammo_type!(id, current_user)
%{name: type_name} = type = Ammo.get_type!(id, current_user)
socket
|> assign(
page_title: gettext("Edit %{ammo_type_name}", ammo_type_name: ammo_type_name),
ammo_type: ammo_type
page_title: gettext("Edit %{type_name}", type_name: type_name),
type: type
)
end
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :clone, %{"id" => id}) do
socket
|> assign(
page_title: gettext("New Ammo type"),
ammo_type: %{Ammo.get_ammo_type!(id, current_user) | id: nil}
page_title: gettext("New Type"),
type: %{Ammo.get_type!(id, current_user) | id: nil}
)
end
defp apply_action(socket, :new, _params) do
socket
|> assign(
page_title: gettext("New Ammo type"),
ammo_type: %AmmoType{}
page_title: gettext("New Type"),
type: %Type{}
)
end
@ -51,9 +51,9 @@ defmodule CanneryWeb.AmmoTypeLive.Index do
|> assign(
page_title: gettext("Catalog"),
search: nil,
ammo_type: nil
type: nil
)
|> list_ammo_types()
|> list_types()
end
defp apply_action(socket, :search, %{"search" => search}) do
@ -61,54 +61,54 @@ defmodule CanneryWeb.AmmoTypeLive.Index do
|> assign(
page_title: gettext("Catalog"),
search: search,
ammo_type: nil
type: nil
)
|> list_ammo_types()
|> list_types()
end
@impl true
def handle_event("delete", %{"id" => id}, %{assigns: %{current_user: current_user}} = socket) do
%{name: name} = Ammo.get_ammo_type!(id, current_user) |> Ammo.delete_ammo_type!(current_user)
%{name: name} = Ammo.get_type!(id, current_user) |> Ammo.delete_type!(current_user)
prompt = dgettext("prompts", "%{name} deleted succesfully", name: name)
{:noreply, socket |> put_flash(:info, prompt) |> list_ammo_types()}
{:noreply, socket |> put_flash(:info, prompt) |> list_types()}
end
def handle_event("toggle_show_used", _params, %{assigns: %{show_used: show_used}} = socket) do
{:noreply, socket |> assign(:show_used, !show_used) |> list_ammo_types()}
{:noreply, socket |> assign(:show_used, !show_used) |> list_types()}
end
def handle_event("search", %{"search" => %{"search_term" => ""}}, socket) do
{:noreply, socket |> push_patch(to: Routes.ammo_type_index_path(Endpoint, :index))}
{:noreply, socket |> push_patch(to: Routes.type_index_path(Endpoint, :index))}
end
def handle_event("search", %{"search" => %{"search_term" => search_term}}, socket) do
search_path = Routes.ammo_type_index_path(Endpoint, :search, search_term)
search_path = Routes.type_index_path(Endpoint, :search, search_term)
{:noreply, socket |> push_patch(to: search_path)}
end
def handle_event("change_class", %{"ammo_type" => %{"class" => "rifle"}}, socket) do
{:noreply, socket |> assign(:class, :rifle) |> list_ammo_types()}
def handle_event("change_class", %{"type" => %{"class" => "rifle"}}, socket) do
{:noreply, socket |> assign(:class, :rifle) |> list_types()}
end
def handle_event("change_class", %{"ammo_type" => %{"class" => "shotgun"}}, socket) do
{:noreply, socket |> assign(:class, :shotgun) |> list_ammo_types()}
def handle_event("change_class", %{"type" => %{"class" => "shotgun"}}, socket) do
{:noreply, socket |> assign(:class, :shotgun) |> list_types()}
end
def handle_event("change_class", %{"ammo_type" => %{"class" => "pistol"}}, socket) do
{:noreply, socket |> assign(:class, :pistol) |> list_ammo_types()}
def handle_event("change_class", %{"type" => %{"class" => "pistol"}}, socket) do
{:noreply, socket |> assign(:class, :pistol) |> list_types()}
end
def handle_event("change_class", %{"ammo_type" => %{"class" => _all}}, socket) do
{:noreply, socket |> assign(:class, :all) |> list_ammo_types()}
def handle_event("change_class", %{"type" => %{"class" => _all}}, socket) do
{:noreply, socket |> assign(:class, :all) |> list_types()}
end
defp list_ammo_types(
defp list_types(
%{assigns: %{class: class, search: search, current_user: current_user}} = socket
) do
socket
|> assign(
ammo_types: Ammo.list_ammo_types(search, current_user, class),
ammo_types_count: Ammo.get_ammo_types_count!(current_user)
types: Ammo.list_types(search, current_user, class),
types_count: Ammo.get_types_count!(current_user)
)
end
end

View File

@ -3,25 +3,25 @@
<%= gettext("Catalog") %>
</h1>
<%= if @ammo_types_count == 0 do %>
<%= if @types_count == 0 do %>
<h2 class="title text-xl text-primary-600">
<%= gettext("No Ammo types") %>
<%= gettext("No Types") %>
<%= display_emoji("😔") %>
</h2>
<.link patch={Routes.ammo_type_index_path(Endpoint, :new)} class="btn btn-primary">
<.link patch={Routes.type_index_path(Endpoint, :new)} class="btn btn-primary">
<%= dgettext("actions", "Add your first type!") %>
</.link>
<% else %>
<.link patch={Routes.ammo_type_index_path(Endpoint, :new)} class="btn btn-primary">
<%= dgettext("actions", "New Ammo type") %>
<.link patch={Routes.type_index_path(Endpoint, :new)} class="btn btn-primary">
<%= dgettext("actions", "New Type") %>
</.link>
<div class="w-full flex flex-col sm:flex-row justify-center items-center space-y-4 sm:space-y-0 sm:space-x-4 max-w-2xl">
<.form
:let={f}
for={%{}}
as={:ammo_type}
as={:type}
phx-change="change_class"
phx-submit="change_class"
class="flex items-center"
@ -66,49 +66,43 @@
</.toggle_button>
</div>
<%= if @ammo_types |> Enum.empty?() do %>
<%= if @types |> Enum.empty?() do %>
<h2 class="title text-xl text-primary-600">
<%= gettext("No Ammo types") %>
<%= gettext("No Types") %>
<%= display_emoji("😔") %>
</h2>
<% else %>
<.live_component
module={CanneryWeb.Components.AmmoTypeTableComponent}
id="ammo_types_index_table"
module={CanneryWeb.Components.TypeTableComponent}
id="types_index_table"
action={@live_action}
ammo_types={@ammo_types}
types={@types}
current_user={@current_user}
show_used={@show_used}
class={@class}
>
<:actions :let={ammo_type}>
<:actions :let={type}>
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
<.link
navigate={Routes.ammo_type_show_path(Endpoint, :show, ammo_type)}
navigate={Routes.type_show_path(Endpoint, :show, type)}
class="text-primary-600 link"
aria-label={
dgettext("actions", "View %{ammo_type_name}", ammo_type_name: ammo_type.name)
}
aria-label={dgettext("actions", "View %{type_name}", type_name: type.name)}
>
<i class="fa-fw fa-lg fas fa-eye"></i>
</.link>
<.link
patch={Routes.ammo_type_index_path(Endpoint, :edit, ammo_type)}
patch={Routes.type_index_path(Endpoint, :edit, type)}
class="text-primary-600 link"
aria-label={
dgettext("actions", "Edit %{ammo_type_name}", ammo_type_name: ammo_type.name)
}
aria-label={dgettext("actions", "Edit %{type_name}", type_name: type.name)}
>
<i class="fa-fw fa-lg fas fa-edit"></i>
</.link>
<.link
patch={Routes.ammo_type_index_path(Endpoint, :clone, ammo_type)}
patch={Routes.type_index_path(Endpoint, :clone, type)}
class="text-primary-600 link"
aria-label={
dgettext("actions", "Clone %{ammo_type_name}", ammo_type_name: ammo_type.name)
}
aria-label={dgettext("actions", "Clone %{type_name}", type_name: type.name)}
>
<i class="fa-fw fa-lg fas fa-copy"></i>
</.link>
@ -117,17 +111,15 @@
href="#"
class="text-primary-600 link"
phx-click="delete"
phx-value-id={ammo_type.id}
phx-value-id={type.id}
data-confirm={
dgettext(
"prompts",
"Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!",
name: ammo_type.name
name: type.name
)
}
aria-label={
dgettext("actions", "Delete %{ammo_type_name}", ammo_type_name: ammo_type.name)
}
aria-label={dgettext("actions", "Delete %{type_name}", type_name: type.name)}
>
<i class="fa-lg fas fa-trash"></i>
</.link>
@ -140,15 +132,15 @@
<.modal
:if={@live_action in [:new, :edit, :clone]}
return_to={Routes.ammo_type_index_path(Endpoint, :index)}
return_to={Routes.type_index_path(Endpoint, :index)}
>
<.live_component
module={CanneryWeb.AmmoTypeLive.FormComponent}
id={@ammo_type.id || :new}
module={CanneryWeb.TypeLive.FormComponent}
id={@type.id || :new}
title={@page_title}
action={@live_action}
ammo_type={@ammo_type}
return_to={Routes.ammo_type_index_path(Endpoint, :index)}
type={@type}
return_to={Routes.type_index_path(Endpoint, :index)}
current_user={@current_user}
}
/>

View File

@ -1,10 +1,10 @@
defmodule CanneryWeb.AmmoTypeLive.Show do
defmodule CanneryWeb.TypeLive.Show do
@moduledoc """
Liveview for showing and editing an Cannery.Ammo.AmmoType
Liveview for showing and editing an Cannery.Ammo.Type
"""
use CanneryWeb, :live_view
alias Cannery.{ActivityLog, Ammo, Ammo.AmmoType, Containers}
alias Cannery.{ActivityLog, Ammo, Ammo.Type, Containers}
alias CanneryWeb.Endpoint
@impl true
@ -13,49 +13,49 @@ defmodule CanneryWeb.AmmoTypeLive.Show do
@impl true
def handle_params(%{"id" => id}, _params, socket) do
{:noreply, socket |> display_ammo_type(id)}
{:noreply, socket |> display_type(id)}
end
@impl true
def handle_event(
"delete",
_params,
%{assigns: %{ammo_type: ammo_type, current_user: current_user}} = socket
%{assigns: %{type: type, current_user: current_user}} = socket
) do
%{name: ammo_type_name} = ammo_type |> Ammo.delete_ammo_type!(current_user)
%{name: type_name} = type |> Ammo.delete_type!(current_user)
prompt = dgettext("prompts", "%{name} deleted succesfully", name: ammo_type_name)
redirect_to = Routes.ammo_type_index_path(socket, :index)
prompt = dgettext("prompts", "%{name} deleted succesfully", name: type_name)
redirect_to = Routes.type_index_path(socket, :index)
{:noreply, socket |> put_flash(:info, prompt) |> push_navigate(to: redirect_to)}
end
def handle_event("toggle_show_used", _params, %{assigns: %{show_used: show_used}} = socket) do
{:noreply, socket |> assign(:show_used, !show_used) |> display_ammo_type()}
{:noreply, socket |> assign(:show_used, !show_used) |> display_type()}
end
def handle_event("toggle_table", _params, %{assigns: %{view_table: view_table}} = socket) do
{:noreply, socket |> assign(:view_table, !view_table)}
end
defp display_ammo_type(
defp display_type(
%{assigns: %{live_action: live_action, current_user: current_user, show_used: show_used}} =
socket,
%AmmoType{name: ammo_type_name} = ammo_type
%Type{name: type_name} = type
) do
custom_fields? =
fields_to_display(ammo_type)
|> Enum.any?(fn %{key: field, type: type} ->
fields_to_display(type)
|> Enum.any?(fn %{key: field, type: column_type} ->
default_value =
case type do
case column_type do
:boolean -> false
_other_type -> nil
end
ammo_type |> Map.get(field) != default_value
type |> Map.get(field) != default_value
end)
packs = ammo_type |> Ammo.list_packs_for_type(current_user, show_used)
packs = type |> Ammo.list_packs_for_type(current_user, show_used)
[
original_counts,
@ -67,10 +67,10 @@ defmodule CanneryWeb.AmmoTypeLive.Show do
if show_used do
[
packs |> Ammo.get_original_counts(current_user),
ammo_type |> Ammo.get_used_packs_count_for_type(current_user),
ammo_type |> Ammo.get_packs_count_for_type(current_user, true),
ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user),
ammo_type |> Ammo.get_historical_count_for_ammo_type(current_user)
type |> Ammo.get_used_packs_count_for_type(current_user),
type |> Ammo.get_packs_count_for_type(current_user, true),
type |> ActivityLog.get_used_count_for_type(current_user),
type |> Ammo.get_historical_count_for_type(current_user)
]
else
[nil, nil, nil, nil, nil]
@ -78,8 +78,8 @@ defmodule CanneryWeb.AmmoTypeLive.Show do
page_title =
case live_action do
:show -> ammo_type_name
:edit -> gettext("Edit %{ammo_type_name}", ammo_type_name: ammo_type_name)
:show -> type_name
:edit -> gettext("Edit %{type_name}", type_name: type_name)
end
containers =
@ -90,33 +90,33 @@ defmodule CanneryWeb.AmmoTypeLive.Show do
socket
|> assign(
page_title: page_title,
ammo_type: ammo_type,
type: type,
packs: packs,
containers: containers,
cprs: packs |> Ammo.get_cprs(current_user),
last_used_dates: packs |> ActivityLog.get_last_used_dates(current_user),
avg_cost_per_round: ammo_type |> Ammo.get_average_cost_for_ammo_type(current_user),
rounds: ammo_type |> Ammo.get_round_count_for_ammo_type(current_user),
avg_cost_per_round: type |> Ammo.get_average_cost_for_type(current_user),
rounds: type |> Ammo.get_round_count_for_type(current_user),
original_counts: original_counts,
used_rounds: used_rounds,
historical_round_count: historical_round_count,
packs_count: ammo_type |> Ammo.get_packs_count_for_type(current_user),
packs_count: type |> Ammo.get_packs_count_for_type(current_user),
used_packs_count: used_packs_count,
historical_packs_count: historical_packs_count,
fields_to_display: fields_to_display(ammo_type),
fields_to_display: fields_to_display(type),
custom_fields?: custom_fields?
)
end
defp display_ammo_type(%{assigns: %{current_user: current_user}} = socket, ammo_type_id) do
socket |> display_ammo_type(Ammo.get_ammo_type!(ammo_type_id, current_user))
defp display_type(%{assigns: %{current_user: current_user}} = socket, type_id) do
socket |> display_type(Ammo.get_type!(type_id, current_user))
end
defp display_ammo_type(%{assigns: %{ammo_type: ammo_type}} = socket) do
socket |> display_ammo_type(ammo_type)
defp display_type(%{assigns: %{type: type}} = socket) do
socket |> display_type(type)
end
defp fields_to_display(%AmmoType{class: class}) do
defp fields_to_display(%Type{class: class}) do
[
%{label: gettext("Cartridge:"), key: :cartridge, type: :string},
%{

View File

@ -1,22 +1,22 @@
<div class="space-y-4 flex flex-col justify-center items-center">
<h1 class="title text-2xl title-primary-500">
<%= @ammo_type.name %>
<%= @type.name %>
</h1>
<span
:if={@ammo_type.desc}
:if={@type.desc}
class="max-w-2xl w-full px-8 py-4 rounded-lg
text-center title text-lg
border border-primary-600"
>
<%= @ammo_type.desc %>
<%= @type.desc %>
</span>
<div class="flex space-x-4 justify-center items-center text-primary-600">
<.link
patch={Routes.ammo_type_show_path(Endpoint, :edit, @ammo_type)}
patch={Routes.type_show_path(Endpoint, :edit, @type)}
class="text-primary-600 link"
aria-label={dgettext("actions", "Edit %{ammo_type_name}", ammo_type_name: @ammo_type.name)}
aria-label={dgettext("actions", "Edit %{type_name}", type_name: @type.name)}
>
<i class="fa-fw fa-lg fas fa-edit"></i>
</.link>
@ -29,12 +29,10 @@
dgettext(
"prompts",
"Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!",
name: @ammo_type.name
name: @type.name
)
}
aria-label={
dgettext("actions", "Delete %{ammo_type_name}", ammo_type_name: @ammo_type.name)
}
aria-label={dgettext("actions", "Delete %{type_name}", type_name: @type.name)}
>
<i class="fa-fw fa-lg fas fa-trash"></i>
</.link>
@ -42,14 +40,14 @@
<hr class="hr" />
<%= if @ammo_type.class || @custom_fields? do %>
<%= if @type.class || @custom_fields? do %>
<div class="grid sm:grid-cols-2 gap-4 text-center justify-center items-center">
<h3 class="title text-lg">
<%= gettext("Class") %>
</h3>
<span class="text-primary-600">
<%= case @ammo_type.class do %>
<%= case @type.class do %>
<% :shotgun -> %>
<%= gettext("Shotgun") %>
<% :rifle -> %>
@ -62,7 +60,7 @@
</span>
<%= for %{label: label, key: key, type: type} <- @fields_to_display do %>
<%= if @ammo_type |> Map.get(key) do %>
<%= if @type |> Map.get(key) do %>
<h3 class="title text-lg">
<%= label %>
</h3>
@ -70,9 +68,9 @@
<span class="text-primary-600">
<%= case type do %>
<% :boolean -> %>
<%= @ammo_type |> Map.get(key) |> humanize() %>
<%= @type |> Map.get(key) |> humanize() %>
<% _ -> %>
<%= @ammo_type |> Map.get(key) %>
<%= @type |> Map.get(key) %>
<% end %>
</span>
<% end %>
@ -140,7 +138,7 @@
</h3>
<span class="text-primary-600">
<.datetime id={"#{@ammo_type.id}-inserted-at"} datetime={@ammo_type.inserted_at} />
<.datetime id={"#{@type.id}-inserted-at"} datetime={@type.inserted_at} />
</span>
<%= if @avg_cost_per_round do %>
@ -184,7 +182,7 @@
<%= if @view_table do %>
<.live_component
module={CanneryWeb.Components.PackTableComponent}
id="ammo-type-show-table"
id="type-show-table"
packs={@packs}
current_user={@current_user}
show_used={@show_used}
@ -228,17 +226,14 @@
</div>
</div>
<.modal
:if={@live_action == :edit}
return_to={Routes.ammo_type_show_path(Endpoint, :show, @ammo_type)}
>
<.modal :if={@live_action == :edit} return_to={Routes.type_show_path(Endpoint, :show, @type)}>
<.live_component
module={CanneryWeb.AmmoTypeLive.FormComponent}
id={@ammo_type.id}
module={CanneryWeb.TypeLive.FormComponent}
id={@type.id}
title={@page_title}
action={@live_action}
ammo_type={@ammo_type}
return_to={Routes.ammo_type_show_path(Endpoint, :show, @ammo_type)}
type={@type}
return_to={Routes.type_show_path(Endpoint, :show, @type)}
current_user={@current_user}
/>
</.modal>

View File

@ -69,14 +69,14 @@ defmodule CanneryWeb.Router do
live "/tags/edit/:id", TagLive.Index, :edit
live "/tags/search/:search", TagLive.Index, :search
live "/catalog", AmmoTypeLive.Index, :index
live "/catalog/new", AmmoTypeLive.Index, :new
live "/catalog/clone/:id", AmmoTypeLive.Index, :clone
live "/catalog/edit/:id", AmmoTypeLive.Index, :edit
live "/catalog/search/:search", AmmoTypeLive.Index, :search
live "/catalog", TypeLive.Index, :index
live "/catalog/new", TypeLive.Index, :new
live "/catalog/clone/:id", TypeLive.Index, :clone
live "/catalog/edit/:id", TypeLive.Index, :edit
live "/catalog/search/:search", TypeLive.Index, :search
live "/type/:id", AmmoTypeLive.Show, :show
live "/type/:id/edit", AmmoTypeLive.Show, :edit
live "/type/:id", TypeLive.Show, :show
live "/type/:id/edit", TypeLive.Show, :edit
live "/containers", ContainerLive.Index, :index
live "/containers/new", ContainerLive.Index, :new
@ -93,19 +93,19 @@ defmodule CanneryWeb.Router do
live "/ammo/new", PackLive.Index, :new
live "/ammo/edit/:id", PackLive.Index, :edit
live "/ammo/clone/:id", PackLive.Index, :clone
live "/ammo/add_shot_group/:id", PackLive.Index, :add_shot_group
live "/ammo/add_shot_record/:id", PackLive.Index, :add_shot_record
live "/ammo/move/:id", PackLive.Index, :move
live "/ammo/search/:search", PackLive.Index, :search
live "/ammo/show/:id", PackLive.Show, :show
live "/ammo/show/edit/:id", PackLive.Show, :edit
live "/ammo/show/add_shot_group/:id", PackLive.Show, :add_shot_group
live "/ammo/show/add_shot_record/:id", PackLive.Show, :add_shot_record
live "/ammo/show/move/:id", PackLive.Show, :move
live "/ammo/show/:id/edit/:shot_group_id", PackLive.Show, :edit_shot_group
live "/ammo/show/:id/edit/:shot_record_id", PackLive.Show, :edit_shot_record
live "/range", RangeLive.Index, :index
live "/range/edit/:id", RangeLive.Index, :edit
live "/range/add_shot_group/:id", RangeLive.Index, :add_shot_group
live "/range/add_shot_record/:id", RangeLive.Index, :add_shot_record
live "/range/search/:search", RangeLive.Index, :search
end

View File

@ -4,7 +4,7 @@ defmodule Cannery.MixProject do
def project do
[
app: :cannery,
version: "0.9.0",
version: "0.9.1",
elixir: "1.14.1",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: Mix.compilers(),

View File

@ -27,7 +27,7 @@ msgstr ""
msgid "Add your first container!"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13
#: lib/cannery_web/live/type_live/index.html.heex:13
#, elixir-autogen, elixir-format
msgid "Add your first type!"
msgstr ""
@ -82,11 +82,6 @@ msgstr ""
msgid "Make your first tag!"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Container"
@ -120,13 +115,13 @@ msgstr ""
msgid "Reset password"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:57
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:350
#: lib/cannery_web/components/add_shot_record_component.html.heex:57
#: lib/cannery_web/live/container_live/form_component.html.heex:57
#: lib/cannery_web/live/invite_live/form_component.html.heex:35
#: lib/cannery_web/live/pack_live/form_component.html.heex:84
#: lib/cannery_web/live/range_live/form_component.html.heex:45
#: lib/cannery_web/live/tag_live/form_component.html.heex:37
#: lib/cannery_web/live/type_live/form_component.html.heex:350
#, elixir-autogen, elixir-format
msgid "Save"
msgstr ""
@ -203,11 +198,6 @@ msgstr ""
msgid "View in Catalog"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "add an ammo type first"
msgstr ""
#: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:89
@ -237,11 +227,6 @@ msgstr ""
msgid "Export Data as JSON"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:110
#, elixir-autogen, elixir-format
msgid "Clone %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:87
#: lib/cannery_web/live/container_live/index.html.heex:145
#, elixir-autogen, elixir-format
@ -253,12 +238,6 @@ msgstr ""
msgid "Copy invite link for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:129
#: lib/cannery_web/live/ammo_type_live/show.html.heex:36
#, elixir-autogen, elixir-format
msgid "Delete %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:104
#: lib/cannery_web/live/container_live/index.html.heex:162
#: lib/cannery_web/live/container_live/show.html.heex:48
@ -276,18 +255,6 @@ msgstr ""
msgid "Delete invite for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format
msgid "Delete shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:100
#: lib/cannery_web/live/ammo_type_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:77
#: lib/cannery_web/live/container_live/index.html.heex:135
#: lib/cannery_web/live/container_live/show.html.heex:35
@ -305,16 +272,6 @@ msgstr ""
msgid "Edit invite for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#, elixir-autogen, elixir-format
msgid "Edit shot group of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format
msgid "Edit shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:120
#, elixir-autogen, elixir-format
msgid "Stage"
@ -331,11 +288,6 @@ msgstr ""
msgid "Unstage"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
#, elixir-autogen, elixir-format
msgid "View %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format
msgid "Clone pack of %{pack_count} bullets"
@ -353,8 +305,52 @@ msgstr ""
msgid "Edit pack of %{pack_count} bullets"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154
#: lib/cannery_web/live/type_live/show.html.heex:204
#, elixir-autogen, elixir-format
msgid "View pack of %{pack_count} bullets"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format
msgid "Delete shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format
msgid "Edit shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:105
#, elixir-autogen, elixir-format
msgid "Clone %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:35
#, elixir-autogen, elixir-format
msgid "Delete %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:97
#: lib/cannery_web/live/type_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Type"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:89
#, elixir-autogen, elixir-format
msgid "View %{type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "add a type first"
msgstr ""

View File

@ -40,7 +40,7 @@ msgstr "Fügen Sie ihre erste Box hinzu!"
msgid "Add your first container!"
msgstr "Fügen Sie ihren ersten Behälter hinzu!"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13
#: lib/cannery_web/live/type_live/index.html.heex:13
#, elixir-autogen, elixir-format
msgid "Add your first type!"
msgstr "Fügen Sie ihre erste Munitionsart hinzu!"
@ -95,11 +95,6 @@ msgstr "Einloggen"
msgid "Make your first tag!"
msgstr "Erstellen Sie ihren ersten Tag!"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr "Neue Munitionsart"
#: lib/cannery_web/live/container_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Container"
@ -133,13 +128,13 @@ msgstr "Bestätigungsmail erneut senden"
msgid "Reset password"
msgstr "Passwort zurücksetzen"
#: lib/cannery_web/components/add_shot_group_component.html.heex:57
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:350
#: lib/cannery_web/components/add_shot_record_component.html.heex:57
#: lib/cannery_web/live/container_live/form_component.html.heex:57
#: lib/cannery_web/live/invite_live/form_component.html.heex:35
#: lib/cannery_web/live/pack_live/form_component.html.heex:84
#: lib/cannery_web/live/range_live/form_component.html.heex:45
#: lib/cannery_web/live/tag_live/form_component.html.heex:37
#: lib/cannery_web/live/type_live/form_component.html.heex:350
#, elixir-autogen, elixir-format
msgid "Save"
msgstr "Speichern"
@ -216,11 +211,6 @@ msgstr "Sprache wechseln"
msgid "View in Catalog"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "add an ammo type first"
msgstr ""
#: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:89
@ -250,11 +240,6 @@ msgstr ""
msgid "Export Data as JSON"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:110
#, elixir-autogen, elixir-format
msgid "Clone %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:87
#: lib/cannery_web/live/container_live/index.html.heex:145
#, elixir-autogen, elixir-format
@ -266,12 +251,6 @@ msgstr ""
msgid "Copy invite link for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:129
#: lib/cannery_web/live/ammo_type_live/show.html.heex:36
#, elixir-autogen, elixir-format
msgid "Delete %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:104
#: lib/cannery_web/live/container_live/index.html.heex:162
#: lib/cannery_web/live/container_live/show.html.heex:48
@ -289,18 +268,6 @@ msgstr ""
msgid "Delete invite for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format
msgid "Delete shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:100
#: lib/cannery_web/live/ammo_type_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:77
#: lib/cannery_web/live/container_live/index.html.heex:135
#: lib/cannery_web/live/container_live/show.html.heex:35
@ -318,16 +285,6 @@ msgstr ""
msgid "Edit invite for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#, elixir-autogen, elixir-format
msgid "Edit shot group of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format
msgid "Edit shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:120
#, elixir-autogen, elixir-format, fuzzy
msgid "Stage"
@ -344,11 +301,6 @@ msgstr ""
msgid "Unstage"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
#, elixir-autogen, elixir-format
msgid "View %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format, fuzzy
msgid "Clone pack of %{pack_count} bullets"
@ -366,8 +318,52 @@ msgstr ""
msgid "Edit pack of %{pack_count} bullets"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154
#: lib/cannery_web/live/type_live/show.html.heex:204
#, elixir-autogen, elixir-format, fuzzy
msgid "View pack of %{pack_count} bullets"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:105
#, elixir-autogen, elixir-format, fuzzy
msgid "Clone %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:35
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:97
#: lib/cannery_web/live/type_live/show.html.heex:19
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:17
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr "Neue Munitionsart"
#: lib/cannery_web/live/type_live/index.html.heex:89
#, elixir-autogen, elixir-format, fuzzy
msgid "View %{type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format, fuzzy
msgid "add a type first"
msgstr ""

View File

@ -30,7 +30,7 @@ msgid "Admins:"
msgstr "Admins:"
#: lib/cannery_web/components/core_components/topbar.html.heex:58
#: lib/cannery_web/components/shot_group_table_component.ex:41
#: lib/cannery_web/components/shot_record_table_component.ex:44
#: lib/cannery_web/live/pack_live/index.ex:75
#: lib/cannery_web/live/pack_live/index.ex:84
#: lib/cannery_web/live/pack_live/index.html.heex:3
@ -38,54 +38,48 @@ msgstr "Admins:"
msgid "Ammo"
msgstr "Munition"
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Ammo type"
msgstr "Munitionsarten"
#: lib/cannery_web/live/tag_live/form_component.html.heex:25
#, elixir-autogen, elixir-format
msgid "Background color"
msgstr "Hintergrundfarbe"
#: lib/cannery_web/components/ammo_type_table_component.ex:87
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324
#: lib/cannery_web/components/type_table_component.ex:87
#: lib/cannery_web/live/type_live/form_component.html.heex:324
#, elixir-autogen, elixir-format
msgid "Blank"
msgstr "Knallpatrone"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171
#: lib/cannery_web/live/type_live/form_component.html.heex:171
#, elixir-autogen, elixir-format
msgid "Brass"
msgstr "Messing"
#: lib/cannery_web/components/ammo_type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
#: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/type_live/form_component.html.heex:144
#, elixir-autogen, elixir-format
msgid "Bullet core"
msgstr "Projektilkern"
#: lib/cannery_web/components/ammo_type_table_component.ex:60
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
#: lib/cannery_web/components/type_table_component.ex:60
#: lib/cannery_web/live/type_live/form_component.html.heex:121
#, elixir-autogen, elixir-format
msgid "Bullet type"
msgstr "Patronenart"
#: lib/cannery_web/components/ammo_type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68
#: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/type_live/form_component.html.heex:68
#, elixir-autogen, elixir-format
msgid "Caliber"
msgstr "Kaliber"
#: lib/cannery_web/components/ammo_type_table_component.ex:49
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52
#: lib/cannery_web/components/type_table_component.ex:49
#: lib/cannery_web/live/type_live/form_component.html.heex:52
#, elixir-autogen, elixir-format
msgid "Cartridge"
msgstr "Patrone"
#: lib/cannery_web/components/ammo_type_table_component.ex:67
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167
#: lib/cannery_web/components/type_table_component.ex:67
#: lib/cannery_web/live/type_live/form_component.html.heex:167
#, elixir-autogen, elixir-format
msgid "Case material"
msgstr "Gehäusematerial"
@ -105,8 +99,8 @@ msgstr "Behälter"
msgid "Containers"
msgstr "Behälter"
#: lib/cannery_web/components/ammo_type_table_component.ex:88
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328
#: lib/cannery_web/components/type_table_component.ex:88
#: lib/cannery_web/live/type_live/form_component.html.heex:328
#, elixir-autogen, elixir-format
msgid "Corrosive"
msgstr "Korrosiv"
@ -124,8 +118,8 @@ msgid "Count:"
msgstr "Anzahl:"
#: lib/cannery_web/components/container_table_component.ex:46
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:38
#: lib/cannery_web/live/container_live/form_component.html.heex:29
#: lib/cannery_web/live/type_live/form_component.html.heex:38
#, elixir-autogen, elixir-format
msgid "Description"
msgstr "Beschreibung"
@ -151,19 +145,19 @@ msgstr "Einladung bearbeiten"
msgid "Edit Tag"
msgstr "Tag bearbeiten"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135
#: lib/cannery_web/live/type_live/form_component.html.heex:135
#, elixir-autogen, elixir-format
msgid "FMJ"
msgstr "VM"
#: lib/cannery_web/components/ammo_type_table_component.ex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112
#: lib/cannery_web/components/type_table_component.ex:59
#: lib/cannery_web/live/type_live/form_component.html.heex:112
#, elixir-autogen, elixir-format
msgid "Grains"
msgstr "Körner"
#: lib/cannery_web/components/ammo_type_table_component.ex:86
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320
#: lib/cannery_web/components/type_table_component.ex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:320
#, elixir-autogen, elixir-format
msgid "Incendiary"
msgstr "Brandmunition"
@ -213,9 +207,9 @@ msgstr "Standort:"
msgid "Magazine, Clip, Ammo Box, etc"
msgstr "Magazin, Ladestreifen, Munitionskiste usw."
#: lib/cannery_web/components/ammo_type_table_component.ex:89
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336
#: lib/cannery_web/components/type_table_component.ex:89
#: lib/cannery_web/live/type_live/form_component.html.heex:333
#: lib/cannery_web/live/type_live/form_component.html.heex:336
#, elixir-autogen, elixir-format
msgid "Manufacturer"
msgstr "Hersteller"
@ -230,22 +224,16 @@ msgstr "Metallene Munitionskiste mit Anime-Girl-Sticker"
msgid "My cool ammo can"
msgstr "Meine coole Munitionskiste"
#: lib/cannery_web/components/ammo_type_table_component.ex:153
#: lib/cannery_web/components/container_table_component.ex:45
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31
#: lib/cannery_web/components/type_table_component.ex:153
#: lib/cannery_web/live/container_live/form_component.html.heex:21
#: lib/cannery_web/live/invite_live/form_component.html.heex:21
#: lib/cannery_web/live/tag_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/form_component.html.heex:31
#, elixir-autogen, elixir-format
msgid "Name"
msgstr "Name"
#: lib/cannery_web/live/ammo_type_live/index.ex:36
#: lib/cannery_web/live/ammo_type_live/index.ex:44
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr "Neuer Munitionstyp"
#: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/index.ex:39
#, elixir-autogen, elixir-format
@ -267,7 +255,7 @@ msgstr "Neuer Tag"
msgid "No Ammo"
msgstr "Keine Munition"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180
#: lib/cannery_web/live/type_live/show.html.heex:178
#, elixir-autogen, elixir-format
msgid "No ammo for this type"
msgstr "Keine Munition dieser Art"
@ -290,8 +278,8 @@ msgstr "Keine Einladung"
msgid "No tags"
msgstr "Keine Tags"
#: lib/cannery_web/components/add_shot_group_component.html.heex:38
#: lib/cannery_web/components/shot_group_table_component.ex:43
#: lib/cannery_web/components/add_shot_record_component.html.heex:38
#: lib/cannery_web/components/shot_record_table_component.ex:46
#: lib/cannery_web/live/pack_live/form_component.html.heex:50
#: lib/cannery_web/live/pack_live/show.ex:91
#: lib/cannery_web/live/range_live/form_component.html.heex:30
@ -310,8 +298,8 @@ msgstr "Bemerkungen:"
msgid "On the bookshelf"
msgstr "Auf dem Bücherregal"
#: lib/cannery_web/components/ammo_type_table_component.ex:80
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257
#: lib/cannery_web/components/type_table_component.ex:80
#: lib/cannery_web/live/type_live/form_component.html.heex:257
#, elixir-autogen, elixir-format
msgid "Pressure"
msgstr "Druck"
@ -327,8 +315,8 @@ msgstr "Kaufpreis"
msgid "Price paid:"
msgstr "Kaufpreis:"
#: lib/cannery_web/components/ammo_type_table_component.ex:83
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296
#: lib/cannery_web/components/type_table_component.ex:83
#: lib/cannery_web/live/type_live/form_component.html.heex:296
#, elixir-autogen, elixir-format
msgid "Primer type"
msgstr "Zündertyp"
@ -361,7 +349,7 @@ msgstr "Einstellungen"
msgid "Simple:"
msgstr "Einfach:"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151
#: lib/cannery_web/live/type_live/form_component.html.heex:151
#, elixir-autogen, elixir-format
msgid "Steel"
msgstr "Stahl"
@ -395,15 +383,17 @@ msgstr "Textfarbe"
msgid "The self-hosted firearm tracker website"
msgstr "Die selbst-gehostete Website zur Verwaltung von Schusswaffen"
#: lib/cannery_web/components/ammo_type_table_component.ex:85
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316
#: lib/cannery_web/components/type_table_component.ex:85
#: lib/cannery_web/live/type_live/form_component.html.heex:316
#, elixir-autogen, elixir-format
msgid "Tracer"
msgstr "Leuchtspur"
#: lib/cannery_web/components/container_table_component.ex:48
#: lib/cannery_web/components/move_pack_component.ex:66
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/container_live/form_component.html.heex:39
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Type"
msgstr "Art"
@ -445,8 +435,8 @@ msgstr "Schießplatz"
msgid "Range day"
msgstr "Range Day"
#: lib/cannery_web/components/add_shot_group_component.html.heex:49
#: lib/cannery_web/components/shot_group_table_component.ex:44
#: lib/cannery_web/components/add_shot_record_component.html.heex:49
#: lib/cannery_web/components/shot_record_table_component.ex:47
#: lib/cannery_web/live/pack_live/show.ex:92
#: lib/cannery_web/live/range_live/form_component.html.heex:41
#, elixir-autogen, elixir-format
@ -463,18 +453,12 @@ msgstr "Schüsse abgegeben"
msgid "No ammo staged"
msgstr "Keine Munition selektiert"
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
#: lib/cannery_web/components/add_shot_record_component.html.heex:3
#: lib/cannery_web/live/pack_live/index.ex:35
#, elixir-autogen, elixir-format
msgid "Record shots"
msgstr "Schüsse dokumentieren"
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format
msgid "Edit Shot Records"
msgstr "Schießkladde editieren"
#: lib/cannery_web/live/range_live/index.ex:48
#, elixir-autogen, elixir-format
msgid "New Shot Records"
@ -486,13 +470,7 @@ msgstr "Neue Schießkladde"
msgid "No shots recorded"
msgstr "Keine Schüsse dokumentiert"
#: lib/cannery_web/components/add_shot_group_component.html.heex:22
#: lib/cannery_web/components/add_shot_group_component.html.heex:26
#, elixir-autogen, elixir-format
msgid "Rounds left"
msgstr "Patronen verbleibend"
#: lib/cannery_web/components/shot_group_table_component.ex:42
#: lib/cannery_web/components/shot_record_table_component.ex:45
#: lib/cannery_web/live/pack_live/show.ex:90
#: lib/cannery_web/live/range_live/index.html.heex:69
#, elixir-autogen, elixir-format
@ -520,48 +498,48 @@ msgstr "Kein weiterer Behälter"
msgid "Shot log"
msgstr "Schießkladde"
#: lib/cannery_web/components/ammo_type_table_component.ex:261
#: lib/cannery_web/components/core_components/pack_card.html.heex:42
#: lib/cannery_web/components/core_components/pack_card.html.heex:47
#: lib/cannery_web/components/pack_table_component.ex:163
#: lib/cannery_web/components/pack_table_component.ex:246
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
#: lib/cannery_web/components/type_table_component.ex:261
#: lib/cannery_web/live/pack_live/show.html.heex:37
#: lib/cannery_web/live/pack_live/show.html.heex:42
#: lib/cannery_web/live/type_live/show.html.heex:150
#, elixir-autogen, elixir-format
msgid "$%{amount}"
msgstr "$%{amount}"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160
#: lib/cannery_web/live/type_live/form_component.html.heex:160
#, elixir-autogen, elixir-format
msgid "Bimetal"
msgstr "Bimetall"
#: lib/cannery_web/components/ammo_type_table_component.ex:66
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
#: lib/cannery_web/components/type_table_component.ex:66
#: lib/cannery_web/live/type_live/form_component.html.heex:156
#, elixir-autogen, elixir-format
msgid "Jacket type"
msgstr "Patronenhülse"
#: lib/cannery_web/components/ammo_type_table_component.ex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279
#: lib/cannery_web/components/type_table_component.ex:82
#: lib/cannery_web/live/type_live/form_component.html.heex:279
#, elixir-autogen, elixir-format
msgid "Muzzle velocity"
msgstr "Mündungsgeschwindigkeit"
#: lib/cannery_web/components/ammo_type_table_component.ex:76
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244
#: lib/cannery_web/components/type_table_component.ex:76
#: lib/cannery_web/live/type_live/form_component.html.heex:244
#, elixir-autogen, elixir-format
msgid "Powder grains per charge"
msgstr "Pulverkörner pro Ladung"
#: lib/cannery_web/components/ammo_type_table_component.ex:74
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236
#: lib/cannery_web/components/type_table_component.ex:74
#: lib/cannery_web/live/type_live/form_component.html.heex:236
#, elixir-autogen, elixir-format
msgid "Powder type"
msgstr "Pulverart"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343
#: lib/cannery_web/live/type_live/form_component.html.heex:343
#, elixir-autogen, elixir-format
msgid "UPC"
msgstr "UPC"
@ -584,8 +562,8 @@ msgstr "Derzeitiges Passwort"
msgid "New password"
msgstr "Neues Passwort"
#: lib/cannery_web/components/ammo_type_table_component.ex:84
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304
#: lib/cannery_web/components/type_table_component.ex:84
#: lib/cannery_web/live/type_live/form_component.html.heex:304
#, elixir-autogen, elixir-format
msgid "Firing type"
msgstr "Patronenhülsenform"
@ -608,16 +586,16 @@ msgid "Edit %{name} tags"
msgstr "Editiere %{name} Tags"
#: lib/cannery_web/components/core_components/container_card.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:87
#: lib/cannery_web/live/container_live/show.html.heex:27
#: lib/cannery_web/live/type_live/show.html.heex:85
#, elixir-autogen, elixir-format
msgid "Rounds:"
msgstr "Patronen:"
#: lib/cannery_web/components/ammo_type_table_component.ex:260
#: lib/cannery_web/components/pack_table_component.ex:160
#: lib/cannery_web/components/pack_table_component.ex:242
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156
#: lib/cannery_web/components/type_table_component.ex:260
#: lib/cannery_web/live/type_live/show.html.heex:154
#, elixir-autogen, elixir-format
msgid "No cost information"
msgstr "Keine Preisinformationen"
@ -688,7 +666,7 @@ msgstr "Schüsse dokumentieren"
msgid "Copies"
msgstr "Kopien"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139
#: lib/cannery_web/live/type_live/show.html.heex:137
#, elixir-autogen, elixir-format
msgid "Added on:"
msgstr "Hinzugefügt am:"
@ -735,9 +713,9 @@ msgid "View the source code"
msgstr "Quellcode ansehen"
#: lib/cannery_web/components/core_components/topbar.html.heex:50
#: lib/cannery_web/live/ammo_type_live/index.ex:52
#: lib/cannery_web/live/ammo_type_live/index.ex:62
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
#: lib/cannery_web/live/type_live/index.ex:52
#: lib/cannery_web/live/type_live/index.ex:62
#: lib/cannery_web/live/type_live/index.html.heex:3
#, elixir-autogen, elixir-format
msgid "Catalog"
msgstr ""
@ -768,8 +746,8 @@ msgid "This ammo is not in a container"
msgstr "Diese Munitionsgruppe ist nicht in einem Behälter"
#: lib/cannery_web/components/core_components/container_card.html.heex:32
#: lib/cannery_web/live/ammo_type_live/show.html.heex:113
#: lib/cannery_web/live/container_live/show.html.heex:22
#: lib/cannery_web/live/type_live/show.html.heex:111
#, elixir-autogen, elixir-format
msgid "Packs:"
msgstr ""
@ -795,9 +773,9 @@ msgstr ""
msgid "Container:"
msgstr "Behälter"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:64
#: lib/cannery_web/live/ammo_type_live/show.html.heex:166
#: lib/cannery_web/live/pack_live/index.html.heex:87
#: lib/cannery_web/live/type_live/index.html.heex:64
#: lib/cannery_web/live/type_live/show.html.heex:164
#, elixir-autogen, elixir-format
msgid "Show used"
msgstr ""
@ -813,182 +791,171 @@ msgstr ""
msgid "Rounds shot: %{count}"
msgstr "Patronen abgefeuert"
#: lib/cannery_web/components/ammo_type_table_component.ex:123
#: lib/cannery_web/components/container_table_component.ex:64
#: lib/cannery_web/components/type_table_component.ex:123
#, elixir-autogen, elixir-format, fuzzy
msgid "Packs"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:144
#: lib/cannery_web/components/container_table_component.ex:65
#: lib/cannery_web/components/type_table_component.ex:144
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds"
msgstr "Patronen:"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:172
#: lib/cannery_web/live/container_live/index.html.heex:40
#: lib/cannery_web/live/container_live/show.html.heex:115
#: lib/cannery_web/live/type_live/show.html.heex:170
#, elixir-autogen, elixir-format
msgid "View as table"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:108
#: lib/cannery_web/components/type_table_component.ex:108
#, elixir-autogen, elixir-format
msgid "Total ever packs"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130
#: lib/cannery_web/live/type_live/show.html.heex:128
#, elixir-autogen, elixir-format
msgid "Total ever packs:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:129
#: lib/cannery_web/components/type_table_component.ex:129
#, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds"
msgstr "Summe aller Patronen"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
#: lib/cannery_web/live/type_live/show.html.heex:102
#, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds:"
msgstr "Summe abgegebener Schüsse:"
#: lib/cannery_web/components/ammo_type_table_component.ex:116
#: lib/cannery_web/components/type_table_component.ex:116
#, elixir-autogen, elixir-format
msgid "Used packs"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:120
#, elixir-autogen, elixir-format
msgid "Used packs:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:137
#: lib/cannery_web/components/type_table_component.ex:137
#, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96
#: lib/cannery_web/live/type_live/show.html.heex:94
#, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds:"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:34
#, elixir-autogen, elixir-format, fuzzy
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds shot chart"
msgstr "Patronen abgefeuert"
#: lib/cannery_web/live/ammo_type_live/show.ex:154
#: lib/cannery_web/live/type_live/show.ex:154
#, elixir-autogen, elixir-format, fuzzy
msgid "Blank:"
msgstr "Knallpatrone"
#: lib/cannery_web/live/ammo_type_live/show.ex:132
#: lib/cannery_web/live/type_live/show.ex:132
#, elixir-autogen, elixir-format, fuzzy
msgid "Bullet core:"
msgstr "Projektilkern"
#: lib/cannery_web/live/ammo_type_live/show.ex:131
#: lib/cannery_web/live/type_live/show.ex:131
#, elixir-autogen, elixir-format, fuzzy
msgid "Bullet type:"
msgstr "Patronenart"
#: lib/cannery_web/live/ammo_type_live/show.ex:123
#: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format, fuzzy
msgid "Caliber:"
msgstr "Kaliber"
#: lib/cannery_web/live/ammo_type_live/show.ex:121
#: lib/cannery_web/live/type_live/show.ex:121
#, elixir-autogen, elixir-format, fuzzy
msgid "Cartridge:"
msgstr "Patrone"
#: lib/cannery_web/live/ammo_type_live/show.ex:134
#: lib/cannery_web/live/type_live/show.ex:134
#, elixir-autogen, elixir-format, fuzzy
msgid "Case material:"
msgstr "Gehäusematerial"
#: lib/cannery_web/live/ammo_type_live/show.ex:155
#: lib/cannery_web/live/type_live/show.ex:155
#, elixir-autogen, elixir-format, fuzzy
msgid "Corrosive:"
msgstr "Korrosiv"
#: lib/cannery_web/live/ammo_type_live/show.ex:151
#: lib/cannery_web/live/type_live/show.ex:151
#, elixir-autogen, elixir-format, fuzzy
msgid "Firing type:"
msgstr "Patronenhülsenform"
#: lib/cannery_web/live/ammo_type_live/show.ex:130
#: lib/cannery_web/live/type_live/show.ex:130
#, elixir-autogen, elixir-format, fuzzy
msgid "Grains:"
msgstr "Körner"
#: lib/cannery_web/live/ammo_type_live/show.ex:153
#: lib/cannery_web/live/type_live/show.ex:153
#, elixir-autogen, elixir-format, fuzzy
msgid "Incendiary:"
msgstr "Brandmunition"
#: lib/cannery_web/live/ammo_type_live/show.ex:133
#: lib/cannery_web/live/type_live/show.ex:133
#, elixir-autogen, elixir-format, fuzzy
msgid "Jacket type:"
msgstr "Patronenhülse"
#: lib/cannery_web/live/ammo_type_live/show.ex:156
#: lib/cannery_web/live/type_live/show.ex:156
#, elixir-autogen, elixir-format, fuzzy
msgid "Manufacturer:"
msgstr "Hersteller"
#: lib/cannery_web/live/ammo_type_live/show.ex:149
#: lib/cannery_web/live/type_live/show.ex:149
#, elixir-autogen, elixir-format, fuzzy
msgid "Muzzle velocity:"
msgstr "Mündungsgeschwindigkeit"
#: lib/cannery_web/live/ammo_type_live/show.ex:143
#: lib/cannery_web/live/type_live/show.ex:143
#, elixir-autogen, elixir-format, fuzzy
msgid "Powder grains per charge:"
msgstr "Pulverkörner pro Ladung"
#: lib/cannery_web/live/ammo_type_live/show.ex:141
#: lib/cannery_web/live/type_live/show.ex:141
#, elixir-autogen, elixir-format, fuzzy
msgid "Powder type:"
msgstr "Pulverart"
#: lib/cannery_web/live/ammo_type_live/show.ex:147
#: lib/cannery_web/live/type_live/show.ex:147
#, elixir-autogen, elixir-format, fuzzy
msgid "Pressure:"
msgstr "Druck"
#: lib/cannery_web/live/ammo_type_live/show.ex:150
#: lib/cannery_web/live/type_live/show.ex:150
#, elixir-autogen, elixir-format, fuzzy
msgid "Primer type:"
msgstr "Zündertyp"
#: lib/cannery_web/live/ammo_type_live/show.ex:152
#: lib/cannery_web/live/type_live/show.ex:152
#, elixir-autogen, elixir-format, fuzzy
msgid "Tracer:"
msgstr "Leuchtspur"
#: lib/cannery_web/live/ammo_type_live/show.ex:157
#: lib/cannery_web/live/type_live/show.ex:157
#, elixir-autogen, elixir-format, fuzzy
msgid "UPC:"
msgstr "UPC"
#: lib/cannery_web/components/ammo_type_table_component.ex:102
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148
#: lib/cannery_web/components/type_table_component.ex:102
#: lib/cannery_web/live/type_live/show.html.heex:146
#, elixir-autogen, elixir-format
msgid "Average CPR"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:28
#: lib/cannery_web/live/ammo_type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{ammo_type_name}"
msgstr "%{name} bearbeiten"
#: lib/cannery_web/components/core_components/pack_card.html.heex:17
#: lib/cannery_web/components/pack_table_component.ex:250
#, elixir-autogen, elixir-format
@ -1052,13 +1019,7 @@ msgstr ""
msgid "Edit ammo"
msgstr "Munitionstyp bearbeiten"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
#: lib/cannery_web/live/ammo_type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Ammo types"
msgstr "Keine Munitionsarten"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:58
#: lib/cannery_web/live/type_live/index.html.heex:58
#, elixir-autogen, elixir-format
msgid "Search catalog"
msgstr ""
@ -1187,42 +1148,42 @@ msgstr ""
msgid "Password"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261
#: lib/cannery_web/live/type_live/form_component.html.heex:261
#, elixir-autogen, elixir-format
msgid "+P"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75
#: lib/cannery_web/live/type_live/form_component.html.heex:75
#, elixir-autogen, elixir-format
msgid ".223"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56
#: lib/cannery_web/live/type_live/form_component.html.heex:56
#, elixir-autogen, elixir-format
msgid "5.56x46mm NATO"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300
#: lib/cannery_web/live/type_live/form_component.html.heex:300
#, elixir-autogen, elixir-format
msgid "Boxer"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308
#: lib/cannery_web/live/type_live/form_component.html.heex:308
#, elixir-autogen, elixir-format
msgid "Centerfire"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:43
#: lib/cannery_web/components/add_shot_record_component.html.heex:43
#: lib/cannery_web/live/range_live/form_component.html.heex:35
#, elixir-autogen, elixir-format
msgid "Really great weather"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:100
#: lib/cannery_web/components/container_table_component.ex:67
#: lib/cannery_web/components/move_pack_component.ex:68
#: lib/cannery_web/components/pack_table_component.ex:59
#: lib/cannery_web/components/shot_group_table_component.ex:45
#: lib/cannery_web/components/shot_record_table_component.ex:48
#: lib/cannery_web/components/type_table_component.ex:100
#: lib/cannery_web/live/pack_live/show.ex:93
#, elixir-autogen, elixir-format
msgid "Actions"
@ -1249,76 +1210,76 @@ msgstr ""
msgid "Close modal"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:35
#: lib/cannery_web/live/container_live/show.html.heex:103
#: lib/cannery_web/live/pack_live/index.html.heex:58
#: lib/cannery_web/live/range_live/index.html.heex:92
#: lib/cannery_web/live/type_live/index.html.heex:35
#, elixir-autogen, elixir-format
msgid "All"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313
#: lib/cannery_web/live/type_live/form_component.html.heex:313
#, elixir-autogen, elixir-format
msgid "Attributes"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:56
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
#: lib/cannery_web/components/type_table_component.ex:56
#: lib/cannery_web/live/type_live/form_component.html.heex:89
#, elixir-autogen, elixir-format, fuzzy
msgid "Brass height"
msgstr "Messing"
#: lib/cannery_web/live/ammo_type_live/show.ex:128
#: lib/cannery_web/live/type_live/show.ex:128
#, elixir-autogen, elixir-format
msgid "Brass height:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:57
#: lib/cannery_web/components/ammo_type_table_component.ex:58
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96
#: lib/cannery_web/components/type_table_component.ex:57
#: lib/cannery_web/components/type_table_component.ex:58
#: lib/cannery_web/live/type_live/form_component.html.heex:96
#, elixir-autogen, elixir-format
msgid "Chamber size"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:129
#: lib/cannery_web/live/type_live/show.ex:129
#, elixir-autogen, elixir-format
msgid "Chamber size:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48
#: lib/cannery_web/live/type_live/form_component.html.heex:48
#, elixir-autogen, elixir-format
msgid "Dimensions"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266
#: lib/cannery_web/components/type_table_component.ex:81
#: lib/cannery_web/live/type_live/form_component.html.heex:266
#, elixir-autogen, elixir-format
msgid "Dram equivalent"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:148
#: lib/cannery_web/live/type_live/show.ex:148
#, elixir-autogen, elixir-format
msgid "Dram equivalent:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67
#: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/type_live/form_component.html.heex:67
#, elixir-autogen, elixir-format
msgid "Gauge"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123
#: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format
msgid "Gauge:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:72
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207
#: lib/cannery_web/components/type_table_component.ex:72
#: lib/cannery_web/live/type_live/form_component.html.heex:207
#, elixir-autogen, elixir-format
msgid "Load grains"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:139
#: lib/cannery_web/live/type_live/show.ex:139
#, elixir-autogen, elixir-format
msgid "Load grains:"
msgstr ""
@ -1328,140 +1289,175 @@ msgstr ""
msgid "No ammo"
msgstr "Keine Munition"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60
#: lib/cannery_web/live/type_live/show.html.heex:58
#, elixir-autogen, elixir-format
msgid "None specified"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:38
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
#: lib/cannery_web/live/container_live/show.html.heex:106
#: lib/cannery_web/live/pack_live/index.html.heex:61
#: lib/cannery_web/live/range_live/index.html.heex:95
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:38
#: lib/cannery_web/live/type_live/show.html.heex:56
#, elixir-autogen, elixir-format
msgid "Pistol"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233
#: lib/cannery_web/live/type_live/form_component.html.heex:233
#, elixir-autogen, elixir-format, fuzzy
msgid "Powder"
msgstr "Pulverart"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293
#: lib/cannery_web/live/type_live/form_component.html.heex:293
#, elixir-autogen, elixir-format, fuzzy
msgid "Primer"
msgstr "Zündertyp"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109
#: lib/cannery_web/live/type_live/form_component.html.heex:109
#, elixir-autogen, elixir-format
msgid "Projectile"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:36
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
#: lib/cannery_web/live/container_live/show.html.heex:104
#: lib/cannery_web/live/pack_live/index.html.heex:59
#: lib/cannery_web/live/range_live/index.html.heex:93
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:36
#: lib/cannery_web/live/type_live/show.html.heex:54
#, elixir-autogen, elixir-format
msgid "Rifle"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:73
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215
#: lib/cannery_web/components/type_table_component.ex:73
#: lib/cannery_web/live/type_live/form_component.html.heex:215
#, elixir-autogen, elixir-format
msgid "Shot charge weight"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:140
#: lib/cannery_web/live/type_live/show.ex:140
#, elixir-autogen, elixir-format
msgid "Shot charge weight:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:70
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191
#: lib/cannery_web/components/type_table_component.ex:70
#: lib/cannery_web/live/type_live/form_component.html.heex:191
#, elixir-autogen, elixir-format
msgid "Shot material"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:137
#: lib/cannery_web/live/type_live/show.ex:137
#, elixir-autogen, elixir-format
msgid "Shot material:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:71
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200
#: lib/cannery_web/components/type_table_component.ex:71
#: lib/cannery_web/live/type_live/form_component.html.heex:200
#, elixir-autogen, elixir-format, fuzzy
msgid "Shot size"
msgstr "Schüsse abgegeben"
#: lib/cannery_web/live/ammo_type_live/show.ex:138
#: lib/cannery_web/live/type_live/show.ex:138
#, elixir-autogen, elixir-format, fuzzy
msgid "Shot size:"
msgstr "Schüsse abgegeben"
#: lib/cannery_web/components/ammo_type_table_component.ex:69
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183
#: lib/cannery_web/components/type_table_component.ex:69
#: lib/cannery_web/live/type_live/form_component.html.heex:183
#, elixir-autogen, elixir-format
msgid "Shot type"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:136
#: lib/cannery_web/live/type_live/show.ex:136
#, elixir-autogen, elixir-format
msgid "Shot type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
#: lib/cannery_web/live/container_live/show.html.heex:105
#: lib/cannery_web/live/pack_live/index.html.heex:60
#: lib/cannery_web/live/range_live/index.html.heex:94
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:37
#: lib/cannery_web/live/type_live/show.html.heex:52
#, elixir-autogen, elixir-format
msgid "Shotgun"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143
#: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/type_live/form_component.html.heex:143
#, elixir-autogen, elixir-format
msgid "Slug core"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187
#: lib/cannery_web/live/type_live/form_component.html.heex:187
#, elixir-autogen, elixir-format
msgid "Target, bird, buck, etc"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:127
#: lib/cannery_web/live/type_live/show.ex:127
#, elixir-autogen, elixir-format
msgid "Unfired length:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:55
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80
#: lib/cannery_web/components/type_table_component.ex:55
#: lib/cannery_web/live/type_live/form_component.html.heex:80
#, elixir-autogen, elixir-format
msgid "Unfired shell length"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:68
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176
#: lib/cannery_web/components/type_table_component.ex:68
#: lib/cannery_web/live/type_live/form_component.html.heex:176
#, elixir-autogen, elixir-format
msgid "Wadding"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:135
#: lib/cannery_web/live/type_live/show.ex:135
#, elixir-autogen, elixir-format
msgid "Wadding:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:150
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:21
#: lib/cannery_web/live/ammo_type_live/index.html.heex:29
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
#: lib/cannery_web/components/type_table_component.ex:150
#: lib/cannery_web/live/container_live/show.html.heex:97
#: lib/cannery_web/live/pack_live/index.html.heex:50
#: lib/cannery_web/live/range_live/index.html.heex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/index.html.heex:29
#: lib/cannery_web/live/type_live/show.html.heex:46
#, elixir-autogen, elixir-format
msgid "Class"
msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:22
#: lib/cannery_web/components/add_shot_record_component.html.heex:26
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds left"
msgstr "Patronen:"
#: lib/cannery_web/components/add_shot_record_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit Shot Record"
msgstr "Schießkladde editieren"
#: lib/cannery_web/live/type_live/index.ex:28
#: lib/cannery_web/live/type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr "%{name} bearbeiten"
#: lib/cannery_web/live/type_live/index.ex:36
#: lib/cannery_web/live/type_live/index.ex:44
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr "Neuer Munitionstyp"
#: lib/cannery_web/live/type_live/index.html.heex:8
#: lib/cannery_web/live/type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Types"
msgstr "Art"

View File

@ -69,7 +69,7 @@ msgstr "Ungültige Mailadresse oder Passwort"
msgid "Not found"
msgstr "Nicht gefunden"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18
#: lib/cannery_web/live/type_live/form_component.html.heex:18
#: lib/cannery_web/templates/user_registration/new.html.heex:13
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:13
#: lib/cannery_web/templates/user_settings/edit.html.heex:22
@ -173,42 +173,42 @@ msgstr ""
"Ungültige Nummer an Kopien. Muss zwischen 1 and %{max} liegen. War "
"%{multiplier}"
#: lib/cannery/ammo.ex:1123
#: lib/cannery/ammo.ex:1121
#, elixir-autogen, elixir-format
msgid "Invalid multiplier"
msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:74
#, elixir-autogen, elixir-format
msgid "Your browser does not support the canvas element."
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:74
#: lib/cannery/activity_log/shot_record.ex:74
#, elixir-autogen, elixir-format, fuzzy
msgid "Please select a valid user and ammo pack"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:88
#: lib/cannery/activity_log/shot_record.ex:88
#, elixir-autogen, elixir-format
msgid "Ammo left can be at most %{count} rounds"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:84
#: lib/cannery/activity_log/shot_record.ex:84
#, elixir-autogen, elixir-format
msgid "Ammo left must be at least 0"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:119
#: lib/cannery/activity_log/shot_record.ex:119
#, elixir-autogen, elixir-format, fuzzy
msgid "Count can be at most %{count} shots"
msgstr "Anzahl muss weniger als %{count} betragen"
#: lib/cannery/activity_log/shot_group.ex:80
#: lib/cannery/activity_log/shot_record.ex:80
#, elixir-autogen, elixir-format
msgid "can't be blank"
msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format, fuzzy
msgid "Please select a type and container"
msgstr ""

View File

@ -23,17 +23,17 @@ msgstr ""
## Run "mix gettext.extract" to bring this file up to
## date. Leave "msgstr"s empty as changing them here has no
## effect: edit them in PO (.po) files instead.
#: lib/cannery_web/live/ammo_type_live/form_component.ex:89
#: lib/cannery_web/live/container_live/form_component.ex:89
#: lib/cannery_web/live/invite_live/form_component.ex:80
#: lib/cannery_web/live/tag_live/form_component.ex:78
#: lib/cannery_web/live/type_live/form_component.ex:88
#, elixir-autogen, elixir-format
msgid "%{name} created successfully"
msgstr "%{name} erfolgreich erstellt"
#: lib/cannery_web/live/ammo_type_live/index.ex:72
#: lib/cannery_web/live/ammo_type_live/show.ex:27
#: lib/cannery_web/live/tag_live/index.ex:65
#: lib/cannery_web/live/type_live/index.ex:72
#: lib/cannery_web/live/type_live/show.ex:27
#, elixir-autogen, elixir-format
msgid "%{name} deleted succesfully"
msgstr "%{name} erfolgreich gelöscht"
@ -44,10 +44,10 @@ msgstr "%{name} erfolgreich gelöscht"
msgid "%{name} has been deleted"
msgstr "%{name} wurde gelöscht"
#: lib/cannery_web/live/ammo_type_live/form_component.ex:70
#: lib/cannery_web/live/container_live/form_component.ex:70
#: lib/cannery_web/live/invite_live/form_component.ex:62
#: lib/cannery_web/live/tag_live/form_component.ex:60
#: lib/cannery_web/live/type_live/form_component.ex:69
#, elixir-autogen, elixir-format
msgid "%{name} updated successfully"
msgstr "%{name} erfolgreich aktualisiert"
@ -128,13 +128,13 @@ msgstr "Passwort erfolgreich geändert."
msgid "Please check your email to verify your account"
msgstr "Bitte überprüfen Sie ihre Mailbox und bestätigen Sie das Nutzerkonto"
#: lib/cannery_web/components/add_shot_group_component.html.heex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:351
#: lib/cannery_web/components/add_shot_record_component.html.heex:59
#: lib/cannery_web/live/container_live/form_component.html.heex:59
#: lib/cannery_web/live/invite_live/form_component.html.heex:37
#: lib/cannery_web/live/pack_live/form_component.html.heex:85
#: lib/cannery_web/live/range_live/form_component.html.heex:47
#: lib/cannery_web/live/tag_live/form_component.html.heex:39
#: lib/cannery_web/live/type_live/form_component.html.heex:351
#, elixir-autogen, elixir-format
msgid "Saving..."
msgstr "Speichere..."
@ -166,7 +166,7 @@ msgstr "%{tag_name} wurde von %{container_name} entfernt"
msgid "Adding..."
msgstr "Füge hinzu..."
#: lib/cannery_web/components/add_shot_group_component.ex:60
#: lib/cannery_web/components/add_shot_record_component.ex:60
#, elixir-autogen, elixir-format
msgid "Shots recorded successfully"
msgstr "Schüsse erfolgreich dokumentiert"
@ -257,8 +257,8 @@ msgid_plural "Ammo added successfully"
msgstr[0] "Munitionsgruppe erfolgreich aktualisiert"
msgstr[1] "Munitionsgruppe erfolgreich aktualisiert"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
#: lib/cannery_web/live/type_live/index.html.heex:116
#: lib/cannery_web/live/type_live/show.html.heex:29
#, elixir-autogen, elixir-format, fuzzy
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
msgstr "Sind Sie sicher, dass sie %{name} löschen möchten?"

View File

@ -26,7 +26,7 @@ msgid "Admins:"
msgstr ""
#: lib/cannery_web/components/core_components/topbar.html.heex:58
#: lib/cannery_web/components/shot_group_table_component.ex:41
#: lib/cannery_web/components/shot_record_table_component.ex:44
#: lib/cannery_web/live/pack_live/index.ex:75
#: lib/cannery_web/live/pack_live/index.ex:84
#: lib/cannery_web/live/pack_live/index.html.heex:3
@ -34,54 +34,48 @@ msgstr ""
msgid "Ammo"
msgstr ""
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Ammo type"
msgstr ""
#: lib/cannery_web/live/tag_live/form_component.html.heex:25
#, elixir-autogen, elixir-format
msgid "Background color"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:87
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324
#: lib/cannery_web/components/type_table_component.ex:87
#: lib/cannery_web/live/type_live/form_component.html.heex:324
#, elixir-autogen, elixir-format
msgid "Blank"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171
#: lib/cannery_web/live/type_live/form_component.html.heex:171
#, elixir-autogen, elixir-format
msgid "Brass"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
#: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/type_live/form_component.html.heex:144
#, elixir-autogen, elixir-format
msgid "Bullet core"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:60
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
#: lib/cannery_web/components/type_table_component.ex:60
#: lib/cannery_web/live/type_live/form_component.html.heex:121
#, elixir-autogen, elixir-format
msgid "Bullet type"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68
#: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/type_live/form_component.html.heex:68
#, elixir-autogen, elixir-format
msgid "Caliber"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:49
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52
#: lib/cannery_web/components/type_table_component.ex:49
#: lib/cannery_web/live/type_live/form_component.html.heex:52
#, elixir-autogen, elixir-format
msgid "Cartridge"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:67
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167
#: lib/cannery_web/components/type_table_component.ex:67
#: lib/cannery_web/live/type_live/form_component.html.heex:167
#, elixir-autogen, elixir-format
msgid "Case material"
msgstr ""
@ -101,8 +95,8 @@ msgstr ""
msgid "Containers"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:88
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328
#: lib/cannery_web/components/type_table_component.ex:88
#: lib/cannery_web/live/type_live/form_component.html.heex:328
#, elixir-autogen, elixir-format
msgid "Corrosive"
msgstr ""
@ -120,8 +114,8 @@ msgid "Count:"
msgstr ""
#: lib/cannery_web/components/container_table_component.ex:46
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:38
#: lib/cannery_web/live/container_live/form_component.html.heex:29
#: lib/cannery_web/live/type_live/form_component.html.heex:38
#, elixir-autogen, elixir-format
msgid "Description"
msgstr ""
@ -147,19 +141,19 @@ msgstr ""
msgid "Edit Tag"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135
#: lib/cannery_web/live/type_live/form_component.html.heex:135
#, elixir-autogen, elixir-format
msgid "FMJ"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112
#: lib/cannery_web/components/type_table_component.ex:59
#: lib/cannery_web/live/type_live/form_component.html.heex:112
#, elixir-autogen, elixir-format
msgid "Grains"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:86
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320
#: lib/cannery_web/components/type_table_component.ex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:320
#, elixir-autogen, elixir-format
msgid "Incendiary"
msgstr ""
@ -209,9 +203,9 @@ msgstr ""
msgid "Magazine, Clip, Ammo Box, etc"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:89
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336
#: lib/cannery_web/components/type_table_component.ex:89
#: lib/cannery_web/live/type_live/form_component.html.heex:333
#: lib/cannery_web/live/type_live/form_component.html.heex:336
#, elixir-autogen, elixir-format
msgid "Manufacturer"
msgstr ""
@ -226,22 +220,16 @@ msgstr ""
msgid "My cool ammo can"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:153
#: lib/cannery_web/components/container_table_component.ex:45
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31
#: lib/cannery_web/components/type_table_component.ex:153
#: lib/cannery_web/live/container_live/form_component.html.heex:21
#: lib/cannery_web/live/invite_live/form_component.html.heex:21
#: lib/cannery_web/live/tag_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/form_component.html.heex:31
#, elixir-autogen, elixir-format
msgid "Name"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:36
#: lib/cannery_web/live/ammo_type_live/index.ex:44
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr ""
#: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/index.ex:39
#, elixir-autogen, elixir-format
@ -263,7 +251,7 @@ msgstr ""
msgid "No Ammo"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180
#: lib/cannery_web/live/type_live/show.html.heex:178
#, elixir-autogen, elixir-format
msgid "No ammo for this type"
msgstr ""
@ -286,8 +274,8 @@ msgstr ""
msgid "No tags"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:38
#: lib/cannery_web/components/shot_group_table_component.ex:43
#: lib/cannery_web/components/add_shot_record_component.html.heex:38
#: lib/cannery_web/components/shot_record_table_component.ex:46
#: lib/cannery_web/live/pack_live/form_component.html.heex:50
#: lib/cannery_web/live/pack_live/show.ex:91
#: lib/cannery_web/live/range_live/form_component.html.heex:30
@ -306,8 +294,8 @@ msgstr ""
msgid "On the bookshelf"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:80
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257
#: lib/cannery_web/components/type_table_component.ex:80
#: lib/cannery_web/live/type_live/form_component.html.heex:257
#, elixir-autogen, elixir-format
msgid "Pressure"
msgstr ""
@ -323,8 +311,8 @@ msgstr ""
msgid "Price paid:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:83
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296
#: lib/cannery_web/components/type_table_component.ex:83
#: lib/cannery_web/live/type_live/form_component.html.heex:296
#, elixir-autogen, elixir-format
msgid "Primer type"
msgstr ""
@ -355,7 +343,7 @@ msgstr ""
msgid "Simple:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151
#: lib/cannery_web/live/type_live/form_component.html.heex:151
#, elixir-autogen, elixir-format
msgid "Steel"
msgstr ""
@ -389,15 +377,17 @@ msgstr ""
msgid "The self-hosted firearm tracker website"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:85
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316
#: lib/cannery_web/components/type_table_component.ex:85
#: lib/cannery_web/live/type_live/form_component.html.heex:316
#, elixir-autogen, elixir-format
msgid "Tracer"
msgstr ""
#: lib/cannery_web/components/container_table_component.ex:48
#: lib/cannery_web/components/move_pack_component.ex:66
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/container_live/form_component.html.heex:39
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Type"
msgstr ""
@ -439,8 +429,8 @@ msgstr ""
msgid "Range day"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:49
#: lib/cannery_web/components/shot_group_table_component.ex:44
#: lib/cannery_web/components/add_shot_record_component.html.heex:49
#: lib/cannery_web/components/shot_record_table_component.ex:47
#: lib/cannery_web/live/pack_live/show.ex:92
#: lib/cannery_web/live/range_live/form_component.html.heex:41
#, elixir-autogen, elixir-format
@ -457,18 +447,12 @@ msgstr ""
msgid "No ammo staged"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
#: lib/cannery_web/components/add_shot_record_component.html.heex:3
#: lib/cannery_web/live/pack_live/index.ex:35
#, elixir-autogen, elixir-format
msgid "Record shots"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format
msgid "Edit Shot Records"
msgstr ""
#: lib/cannery_web/live/range_live/index.ex:48
#, elixir-autogen, elixir-format
msgid "New Shot Records"
@ -480,13 +464,7 @@ msgstr ""
msgid "No shots recorded"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:22
#: lib/cannery_web/components/add_shot_group_component.html.heex:26
#, elixir-autogen, elixir-format
msgid "Rounds left"
msgstr ""
#: lib/cannery_web/components/shot_group_table_component.ex:42
#: lib/cannery_web/components/shot_record_table_component.ex:45
#: lib/cannery_web/live/pack_live/show.ex:90
#: lib/cannery_web/live/range_live/index.html.heex:69
#, elixir-autogen, elixir-format
@ -514,48 +492,48 @@ msgstr ""
msgid "Shot log"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:261
#: lib/cannery_web/components/core_components/pack_card.html.heex:42
#: lib/cannery_web/components/core_components/pack_card.html.heex:47
#: lib/cannery_web/components/pack_table_component.ex:163
#: lib/cannery_web/components/pack_table_component.ex:246
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
#: lib/cannery_web/components/type_table_component.ex:261
#: lib/cannery_web/live/pack_live/show.html.heex:37
#: lib/cannery_web/live/pack_live/show.html.heex:42
#: lib/cannery_web/live/type_live/show.html.heex:150
#, elixir-autogen, elixir-format
msgid "$%{amount}"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160
#: lib/cannery_web/live/type_live/form_component.html.heex:160
#, elixir-autogen, elixir-format
msgid "Bimetal"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:66
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
#: lib/cannery_web/components/type_table_component.ex:66
#: lib/cannery_web/live/type_live/form_component.html.heex:156
#, elixir-autogen, elixir-format
msgid "Jacket type"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279
#: lib/cannery_web/components/type_table_component.ex:82
#: lib/cannery_web/live/type_live/form_component.html.heex:279
#, elixir-autogen, elixir-format
msgid "Muzzle velocity"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:76
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244
#: lib/cannery_web/components/type_table_component.ex:76
#: lib/cannery_web/live/type_live/form_component.html.heex:244
#, elixir-autogen, elixir-format
msgid "Powder grains per charge"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:74
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236
#: lib/cannery_web/components/type_table_component.ex:74
#: lib/cannery_web/live/type_live/form_component.html.heex:236
#, elixir-autogen, elixir-format
msgid "Powder type"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343
#: lib/cannery_web/live/type_live/form_component.html.heex:343
#, elixir-autogen, elixir-format
msgid "UPC"
msgstr ""
@ -578,8 +556,8 @@ msgstr ""
msgid "New password"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:84
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304
#: lib/cannery_web/components/type_table_component.ex:84
#: lib/cannery_web/live/type_live/form_component.html.heex:304
#, elixir-autogen, elixir-format
msgid "Firing type"
msgstr ""
@ -602,16 +580,16 @@ msgid "Edit %{name} tags"
msgstr ""
#: lib/cannery_web/components/core_components/container_card.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:87
#: lib/cannery_web/live/container_live/show.html.heex:27
#: lib/cannery_web/live/type_live/show.html.heex:85
#, elixir-autogen, elixir-format
msgid "Rounds:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:260
#: lib/cannery_web/components/pack_table_component.ex:160
#: lib/cannery_web/components/pack_table_component.ex:242
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156
#: lib/cannery_web/components/type_table_component.ex:260
#: lib/cannery_web/live/type_live/show.html.heex:154
#, elixir-autogen, elixir-format
msgid "No cost information"
msgstr ""
@ -682,7 +660,7 @@ msgstr ""
msgid "Copies"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139
#: lib/cannery_web/live/type_live/show.html.heex:137
#, elixir-autogen, elixir-format
msgid "Added on:"
msgstr ""
@ -729,9 +707,9 @@ msgid "View the source code"
msgstr ""
#: lib/cannery_web/components/core_components/topbar.html.heex:50
#: lib/cannery_web/live/ammo_type_live/index.ex:52
#: lib/cannery_web/live/ammo_type_live/index.ex:62
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
#: lib/cannery_web/live/type_live/index.ex:52
#: lib/cannery_web/live/type_live/index.ex:62
#: lib/cannery_web/live/type_live/index.html.heex:3
#, elixir-autogen, elixir-format
msgid "Catalog"
msgstr ""
@ -762,8 +740,8 @@ msgid "This ammo is not in a container"
msgstr ""
#: lib/cannery_web/components/core_components/container_card.html.heex:32
#: lib/cannery_web/live/ammo_type_live/show.html.heex:113
#: lib/cannery_web/live/container_live/show.html.heex:22
#: lib/cannery_web/live/type_live/show.html.heex:111
#, elixir-autogen, elixir-format
msgid "Packs:"
msgstr ""
@ -789,9 +767,9 @@ msgstr ""
msgid "Container:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:64
#: lib/cannery_web/live/ammo_type_live/show.html.heex:166
#: lib/cannery_web/live/pack_live/index.html.heex:87
#: lib/cannery_web/live/type_live/index.html.heex:64
#: lib/cannery_web/live/type_live/show.html.heex:164
#, elixir-autogen, elixir-format
msgid "Show used"
msgstr ""
@ -807,182 +785,171 @@ msgstr ""
msgid "Rounds shot: %{count}"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:123
#: lib/cannery_web/components/container_table_component.ex:64
#: lib/cannery_web/components/type_table_component.ex:123
#, elixir-autogen, elixir-format
msgid "Packs"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:144
#: lib/cannery_web/components/container_table_component.ex:65
#: lib/cannery_web/components/type_table_component.ex:144
#, elixir-autogen, elixir-format
msgid "Rounds"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:172
#: lib/cannery_web/live/container_live/index.html.heex:40
#: lib/cannery_web/live/container_live/show.html.heex:115
#: lib/cannery_web/live/type_live/show.html.heex:170
#, elixir-autogen, elixir-format
msgid "View as table"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:108
#: lib/cannery_web/components/type_table_component.ex:108
#, elixir-autogen, elixir-format
msgid "Total ever packs"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130
#: lib/cannery_web/live/type_live/show.html.heex:128
#, elixir-autogen, elixir-format
msgid "Total ever packs:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:129
#: lib/cannery_web/components/type_table_component.ex:129
#, elixir-autogen, elixir-format
msgid "Total ever rounds"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
#: lib/cannery_web/live/type_live/show.html.heex:102
#, elixir-autogen, elixir-format
msgid "Total ever rounds:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:116
#: lib/cannery_web/components/type_table_component.ex:116
#, elixir-autogen, elixir-format
msgid "Used packs"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:120
#, elixir-autogen, elixir-format
msgid "Used packs:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:137
#: lib/cannery_web/components/type_table_component.ex:137
#, elixir-autogen, elixir-format
msgid "Used rounds"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96
#: lib/cannery_web/live/type_live/show.html.heex:94
#, elixir-autogen, elixir-format
msgid "Used rounds:"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:71
#, elixir-autogen, elixir-format
msgid "Rounds shot chart"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:154
#: lib/cannery_web/live/type_live/show.ex:154
#, elixir-autogen, elixir-format
msgid "Blank:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:132
#: lib/cannery_web/live/type_live/show.ex:132
#, elixir-autogen, elixir-format
msgid "Bullet core:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:131
#: lib/cannery_web/live/type_live/show.ex:131
#, elixir-autogen, elixir-format
msgid "Bullet type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123
#: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format
msgid "Caliber:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:121
#: lib/cannery_web/live/type_live/show.ex:121
#, elixir-autogen, elixir-format
msgid "Cartridge:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:134
#: lib/cannery_web/live/type_live/show.ex:134
#, elixir-autogen, elixir-format
msgid "Case material:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:155
#: lib/cannery_web/live/type_live/show.ex:155
#, elixir-autogen, elixir-format
msgid "Corrosive:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:151
#: lib/cannery_web/live/type_live/show.ex:151
#, elixir-autogen, elixir-format
msgid "Firing type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:130
#: lib/cannery_web/live/type_live/show.ex:130
#, elixir-autogen, elixir-format
msgid "Grains:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:153
#: lib/cannery_web/live/type_live/show.ex:153
#, elixir-autogen, elixir-format
msgid "Incendiary:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:133
#: lib/cannery_web/live/type_live/show.ex:133
#, elixir-autogen, elixir-format
msgid "Jacket type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:156
#: lib/cannery_web/live/type_live/show.ex:156
#, elixir-autogen, elixir-format
msgid "Manufacturer:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:149
#: lib/cannery_web/live/type_live/show.ex:149
#, elixir-autogen, elixir-format
msgid "Muzzle velocity:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:143
#: lib/cannery_web/live/type_live/show.ex:143
#, elixir-autogen, elixir-format
msgid "Powder grains per charge:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:141
#: lib/cannery_web/live/type_live/show.ex:141
#, elixir-autogen, elixir-format
msgid "Powder type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:147
#: lib/cannery_web/live/type_live/show.ex:147
#, elixir-autogen, elixir-format
msgid "Pressure:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:150
#: lib/cannery_web/live/type_live/show.ex:150
#, elixir-autogen, elixir-format
msgid "Primer type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:152
#: lib/cannery_web/live/type_live/show.ex:152
#, elixir-autogen, elixir-format
msgid "Tracer:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:157
#: lib/cannery_web/live/type_live/show.ex:157
#, elixir-autogen, elixir-format
msgid "UPC:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:102
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148
#: lib/cannery_web/components/type_table_component.ex:102
#: lib/cannery_web/live/type_live/show.html.heex:146
#, elixir-autogen, elixir-format
msgid "Average CPR"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:28
#: lib/cannery_web/live/ammo_type_live/show.ex:82
#, elixir-autogen, elixir-format
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/components/core_components/pack_card.html.heex:17
#: lib/cannery_web/components/pack_table_component.ex:250
#, elixir-autogen, elixir-format
@ -1046,13 +1013,7 @@ msgstr ""
msgid "Edit ammo"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
#: lib/cannery_web/live/ammo_type_live/index.html.heex:71
#, elixir-autogen, elixir-format
msgid "No Ammo types"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:58
#: lib/cannery_web/live/type_live/index.html.heex:58
#, elixir-autogen, elixir-format
msgid "Search catalog"
msgstr ""
@ -1170,42 +1131,42 @@ msgstr ""
msgid "Password"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261
#: lib/cannery_web/live/type_live/form_component.html.heex:261
#, elixir-autogen, elixir-format
msgid "+P"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75
#: lib/cannery_web/live/type_live/form_component.html.heex:75
#, elixir-autogen, elixir-format
msgid ".223"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56
#: lib/cannery_web/live/type_live/form_component.html.heex:56
#, elixir-autogen, elixir-format
msgid "5.56x46mm NATO"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300
#: lib/cannery_web/live/type_live/form_component.html.heex:300
#, elixir-autogen, elixir-format
msgid "Boxer"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308
#: lib/cannery_web/live/type_live/form_component.html.heex:308
#, elixir-autogen, elixir-format
msgid "Centerfire"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:43
#: lib/cannery_web/components/add_shot_record_component.html.heex:43
#: lib/cannery_web/live/range_live/form_component.html.heex:35
#, elixir-autogen, elixir-format
msgid "Really great weather"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:100
#: lib/cannery_web/components/container_table_component.ex:67
#: lib/cannery_web/components/move_pack_component.ex:68
#: lib/cannery_web/components/pack_table_component.ex:59
#: lib/cannery_web/components/shot_group_table_component.ex:45
#: lib/cannery_web/components/shot_record_table_component.ex:48
#: lib/cannery_web/components/type_table_component.ex:100
#: lib/cannery_web/live/pack_live/show.ex:93
#, elixir-autogen, elixir-format
msgid "Actions"
@ -1232,76 +1193,76 @@ msgstr ""
msgid "Close modal"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:35
#: lib/cannery_web/live/container_live/show.html.heex:103
#: lib/cannery_web/live/pack_live/index.html.heex:58
#: lib/cannery_web/live/range_live/index.html.heex:92
#: lib/cannery_web/live/type_live/index.html.heex:35
#, elixir-autogen, elixir-format
msgid "All"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313
#: lib/cannery_web/live/type_live/form_component.html.heex:313
#, elixir-autogen, elixir-format
msgid "Attributes"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:56
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
#: lib/cannery_web/components/type_table_component.ex:56
#: lib/cannery_web/live/type_live/form_component.html.heex:89
#, elixir-autogen, elixir-format
msgid "Brass height"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:128
#: lib/cannery_web/live/type_live/show.ex:128
#, elixir-autogen, elixir-format
msgid "Brass height:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:57
#: lib/cannery_web/components/ammo_type_table_component.ex:58
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96
#: lib/cannery_web/components/type_table_component.ex:57
#: lib/cannery_web/components/type_table_component.ex:58
#: lib/cannery_web/live/type_live/form_component.html.heex:96
#, elixir-autogen, elixir-format
msgid "Chamber size"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:129
#: lib/cannery_web/live/type_live/show.ex:129
#, elixir-autogen, elixir-format
msgid "Chamber size:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48
#: lib/cannery_web/live/type_live/form_component.html.heex:48
#, elixir-autogen, elixir-format
msgid "Dimensions"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266
#: lib/cannery_web/components/type_table_component.ex:81
#: lib/cannery_web/live/type_live/form_component.html.heex:266
#, elixir-autogen, elixir-format
msgid "Dram equivalent"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:148
#: lib/cannery_web/live/type_live/show.ex:148
#, elixir-autogen, elixir-format
msgid "Dram equivalent:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67
#: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/type_live/form_component.html.heex:67
#, elixir-autogen, elixir-format
msgid "Gauge"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123
#: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format
msgid "Gauge:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:72
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207
#: lib/cannery_web/components/type_table_component.ex:72
#: lib/cannery_web/live/type_live/form_component.html.heex:207
#, elixir-autogen, elixir-format
msgid "Load grains"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:139
#: lib/cannery_web/live/type_live/show.ex:139
#, elixir-autogen, elixir-format
msgid "Load grains:"
msgstr ""
@ -1311,140 +1272,175 @@ msgstr ""
msgid "No ammo"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60
#: lib/cannery_web/live/type_live/show.html.heex:58
#, elixir-autogen, elixir-format
msgid "None specified"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:38
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
#: lib/cannery_web/live/container_live/show.html.heex:106
#: lib/cannery_web/live/pack_live/index.html.heex:61
#: lib/cannery_web/live/range_live/index.html.heex:95
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:38
#: lib/cannery_web/live/type_live/show.html.heex:56
#, elixir-autogen, elixir-format
msgid "Pistol"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233
#: lib/cannery_web/live/type_live/form_component.html.heex:233
#, elixir-autogen, elixir-format
msgid "Powder"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293
#: lib/cannery_web/live/type_live/form_component.html.heex:293
#, elixir-autogen, elixir-format
msgid "Primer"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109
#: lib/cannery_web/live/type_live/form_component.html.heex:109
#, elixir-autogen, elixir-format
msgid "Projectile"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:36
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
#: lib/cannery_web/live/container_live/show.html.heex:104
#: lib/cannery_web/live/pack_live/index.html.heex:59
#: lib/cannery_web/live/range_live/index.html.heex:93
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:36
#: lib/cannery_web/live/type_live/show.html.heex:54
#, elixir-autogen, elixir-format
msgid "Rifle"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:73
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215
#: lib/cannery_web/components/type_table_component.ex:73
#: lib/cannery_web/live/type_live/form_component.html.heex:215
#, elixir-autogen, elixir-format
msgid "Shot charge weight"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:140
#: lib/cannery_web/live/type_live/show.ex:140
#, elixir-autogen, elixir-format
msgid "Shot charge weight:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:70
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191
#: lib/cannery_web/components/type_table_component.ex:70
#: lib/cannery_web/live/type_live/form_component.html.heex:191
#, elixir-autogen, elixir-format
msgid "Shot material"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:137
#: lib/cannery_web/live/type_live/show.ex:137
#, elixir-autogen, elixir-format
msgid "Shot material:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:71
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200
#: lib/cannery_web/components/type_table_component.ex:71
#: lib/cannery_web/live/type_live/form_component.html.heex:200
#, elixir-autogen, elixir-format
msgid "Shot size"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:138
#: lib/cannery_web/live/type_live/show.ex:138
#, elixir-autogen, elixir-format
msgid "Shot size:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:69
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183
#: lib/cannery_web/components/type_table_component.ex:69
#: lib/cannery_web/live/type_live/form_component.html.heex:183
#, elixir-autogen, elixir-format
msgid "Shot type"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:136
#: lib/cannery_web/live/type_live/show.ex:136
#, elixir-autogen, elixir-format
msgid "Shot type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
#: lib/cannery_web/live/container_live/show.html.heex:105
#: lib/cannery_web/live/pack_live/index.html.heex:60
#: lib/cannery_web/live/range_live/index.html.heex:94
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:37
#: lib/cannery_web/live/type_live/show.html.heex:52
#, elixir-autogen, elixir-format
msgid "Shotgun"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143
#: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/type_live/form_component.html.heex:143
#, elixir-autogen, elixir-format
msgid "Slug core"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187
#: lib/cannery_web/live/type_live/form_component.html.heex:187
#, elixir-autogen, elixir-format
msgid "Target, bird, buck, etc"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:127
#: lib/cannery_web/live/type_live/show.ex:127
#, elixir-autogen, elixir-format
msgid "Unfired length:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:55
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80
#: lib/cannery_web/components/type_table_component.ex:55
#: lib/cannery_web/live/type_live/form_component.html.heex:80
#, elixir-autogen, elixir-format
msgid "Unfired shell length"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:68
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176
#: lib/cannery_web/components/type_table_component.ex:68
#: lib/cannery_web/live/type_live/form_component.html.heex:176
#, elixir-autogen, elixir-format
msgid "Wadding"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:135
#: lib/cannery_web/live/type_live/show.ex:135
#, elixir-autogen, elixir-format
msgid "Wadding:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:150
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:21
#: lib/cannery_web/live/ammo_type_live/index.html.heex:29
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
#: lib/cannery_web/components/type_table_component.ex:150
#: lib/cannery_web/live/container_live/show.html.heex:97
#: lib/cannery_web/live/pack_live/index.html.heex:50
#: lib/cannery_web/live/range_live/index.html.heex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/index.html.heex:29
#: lib/cannery_web/live/type_live/show.html.heex:46
#, elixir-autogen, elixir-format
msgid "Class"
msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:22
#: lib/cannery_web/components/add_shot_record_component.html.heex:26
#, elixir-autogen, elixir-format
msgid "Rounds left"
msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format
msgid "Edit Shot Record"
msgstr ""
#: lib/cannery_web/live/type_live/index.ex:28
#: lib/cannery_web/live/type_live/show.ex:82
#, elixir-autogen, elixir-format
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.ex:36
#: lib/cannery_web/live/type_live/index.ex:44
#, elixir-autogen, elixir-format
msgid "New Type"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:8
#: lib/cannery_web/live/type_live/index.html.heex:71
#, elixir-autogen, elixir-format
msgid "No Types"
msgstr ""

View File

@ -27,7 +27,7 @@ msgstr ""
msgid "Add your first container!"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13
#: lib/cannery_web/live/type_live/index.html.heex:13
#, elixir-autogen, elixir-format
msgid "Add your first type!"
msgstr ""
@ -82,11 +82,6 @@ msgstr ""
msgid "Make your first tag!"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Container"
@ -120,13 +115,13 @@ msgstr ""
msgid "Reset password"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:57
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:350
#: lib/cannery_web/components/add_shot_record_component.html.heex:57
#: lib/cannery_web/live/container_live/form_component.html.heex:57
#: lib/cannery_web/live/invite_live/form_component.html.heex:35
#: lib/cannery_web/live/pack_live/form_component.html.heex:84
#: lib/cannery_web/live/range_live/form_component.html.heex:45
#: lib/cannery_web/live/tag_live/form_component.html.heex:37
#: lib/cannery_web/live/type_live/form_component.html.heex:350
#, elixir-autogen, elixir-format
msgid "Save"
msgstr ""
@ -203,11 +198,6 @@ msgstr ""
msgid "View in Catalog"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "add an ammo type first"
msgstr ""
#: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:89
@ -237,11 +227,6 @@ msgstr ""
msgid "Export Data as JSON"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:110
#, elixir-autogen, elixir-format
msgid "Clone %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:87
#: lib/cannery_web/live/container_live/index.html.heex:145
#, elixir-autogen, elixir-format
@ -253,12 +238,6 @@ msgstr ""
msgid "Copy invite link for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:129
#: lib/cannery_web/live/ammo_type_live/show.html.heex:36
#, elixir-autogen, elixir-format
msgid "Delete %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:104
#: lib/cannery_web/live/container_live/index.html.heex:162
#: lib/cannery_web/live/container_live/show.html.heex:48
@ -276,18 +255,6 @@ msgstr ""
msgid "Delete invite for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format
msgid "Delete shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:100
#: lib/cannery_web/live/ammo_type_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:77
#: lib/cannery_web/live/container_live/index.html.heex:135
#: lib/cannery_web/live/container_live/show.html.heex:35
@ -305,16 +272,6 @@ msgstr ""
msgid "Edit invite for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#, elixir-autogen, elixir-format
msgid "Edit shot group of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format
msgid "Edit shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:120
#, elixir-autogen, elixir-format, fuzzy
msgid "Stage"
@ -331,11 +288,6 @@ msgstr ""
msgid "Unstage"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
#, elixir-autogen, elixir-format
msgid "View %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format, fuzzy
msgid "Clone pack of %{pack_count} bullets"
@ -353,8 +305,52 @@ msgstr ""
msgid "Edit pack of %{pack_count} bullets"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154
#: lib/cannery_web/live/type_live/show.html.heex:204
#, elixir-autogen, elixir-format, fuzzy
msgid "View pack of %{pack_count} bullets"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:105
#, elixir-autogen, elixir-format, fuzzy
msgid "Clone %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:35
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:97
#: lib/cannery_web/live/type_live/show.html.heex:19
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:17
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:89
#, elixir-autogen, elixir-format, fuzzy
msgid "View %{type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format, fuzzy
msgid "add a type first"
msgstr ""

View File

@ -26,7 +26,7 @@ msgid "Admins:"
msgstr ""
#: lib/cannery_web/components/core_components/topbar.html.heex:58
#: lib/cannery_web/components/shot_group_table_component.ex:41
#: lib/cannery_web/components/shot_record_table_component.ex:44
#: lib/cannery_web/live/pack_live/index.ex:75
#: lib/cannery_web/live/pack_live/index.ex:84
#: lib/cannery_web/live/pack_live/index.html.heex:3
@ -34,54 +34,48 @@ msgstr ""
msgid "Ammo"
msgstr ""
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Ammo type"
msgstr ""
#: lib/cannery_web/live/tag_live/form_component.html.heex:25
#, elixir-autogen, elixir-format
msgid "Background color"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:87
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324
#: lib/cannery_web/components/type_table_component.ex:87
#: lib/cannery_web/live/type_live/form_component.html.heex:324
#, elixir-autogen, elixir-format
msgid "Blank"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171
#: lib/cannery_web/live/type_live/form_component.html.heex:171
#, elixir-autogen, elixir-format
msgid "Brass"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
#: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/type_live/form_component.html.heex:144
#, elixir-autogen, elixir-format
msgid "Bullet core"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:60
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
#: lib/cannery_web/components/type_table_component.ex:60
#: lib/cannery_web/live/type_live/form_component.html.heex:121
#, elixir-autogen, elixir-format
msgid "Bullet type"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68
#: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/type_live/form_component.html.heex:68
#, elixir-autogen, elixir-format
msgid "Caliber"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:49
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52
#: lib/cannery_web/components/type_table_component.ex:49
#: lib/cannery_web/live/type_live/form_component.html.heex:52
#, elixir-autogen, elixir-format
msgid "Cartridge"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:67
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167
#: lib/cannery_web/components/type_table_component.ex:67
#: lib/cannery_web/live/type_live/form_component.html.heex:167
#, elixir-autogen, elixir-format
msgid "Case material"
msgstr ""
@ -101,8 +95,8 @@ msgstr ""
msgid "Containers"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:88
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328
#: lib/cannery_web/components/type_table_component.ex:88
#: lib/cannery_web/live/type_live/form_component.html.heex:328
#, elixir-autogen, elixir-format
msgid "Corrosive"
msgstr ""
@ -120,8 +114,8 @@ msgid "Count:"
msgstr ""
#: lib/cannery_web/components/container_table_component.ex:46
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:38
#: lib/cannery_web/live/container_live/form_component.html.heex:29
#: lib/cannery_web/live/type_live/form_component.html.heex:38
#, elixir-autogen, elixir-format
msgid "Description"
msgstr ""
@ -147,19 +141,19 @@ msgstr ""
msgid "Edit Tag"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135
#: lib/cannery_web/live/type_live/form_component.html.heex:135
#, elixir-autogen, elixir-format
msgid "FMJ"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112
#: lib/cannery_web/components/type_table_component.ex:59
#: lib/cannery_web/live/type_live/form_component.html.heex:112
#, elixir-autogen, elixir-format
msgid "Grains"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:86
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320
#: lib/cannery_web/components/type_table_component.ex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:320
#, elixir-autogen, elixir-format
msgid "Incendiary"
msgstr ""
@ -209,9 +203,9 @@ msgstr ""
msgid "Magazine, Clip, Ammo Box, etc"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:89
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336
#: lib/cannery_web/components/type_table_component.ex:89
#: lib/cannery_web/live/type_live/form_component.html.heex:333
#: lib/cannery_web/live/type_live/form_component.html.heex:336
#, elixir-autogen, elixir-format
msgid "Manufacturer"
msgstr ""
@ -226,22 +220,16 @@ msgstr ""
msgid "My cool ammo can"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:153
#: lib/cannery_web/components/container_table_component.ex:45
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31
#: lib/cannery_web/components/type_table_component.ex:153
#: lib/cannery_web/live/container_live/form_component.html.heex:21
#: lib/cannery_web/live/invite_live/form_component.html.heex:21
#: lib/cannery_web/live/tag_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/form_component.html.heex:31
#, elixir-autogen, elixir-format
msgid "Name"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:36
#: lib/cannery_web/live/ammo_type_live/index.ex:44
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr ""
#: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/index.ex:39
#, elixir-autogen, elixir-format
@ -263,7 +251,7 @@ msgstr ""
msgid "No Ammo"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180
#: lib/cannery_web/live/type_live/show.html.heex:178
#, elixir-autogen, elixir-format
msgid "No ammo for this type"
msgstr ""
@ -286,8 +274,8 @@ msgstr ""
msgid "No tags"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:38
#: lib/cannery_web/components/shot_group_table_component.ex:43
#: lib/cannery_web/components/add_shot_record_component.html.heex:38
#: lib/cannery_web/components/shot_record_table_component.ex:46
#: lib/cannery_web/live/pack_live/form_component.html.heex:50
#: lib/cannery_web/live/pack_live/show.ex:91
#: lib/cannery_web/live/range_live/form_component.html.heex:30
@ -306,8 +294,8 @@ msgstr ""
msgid "On the bookshelf"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:80
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257
#: lib/cannery_web/components/type_table_component.ex:80
#: lib/cannery_web/live/type_live/form_component.html.heex:257
#, elixir-autogen, elixir-format
msgid "Pressure"
msgstr ""
@ -323,8 +311,8 @@ msgstr ""
msgid "Price paid:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:83
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296
#: lib/cannery_web/components/type_table_component.ex:83
#: lib/cannery_web/live/type_live/form_component.html.heex:296
#, elixir-autogen, elixir-format
msgid "Primer type"
msgstr ""
@ -355,7 +343,7 @@ msgstr ""
msgid "Simple:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151
#: lib/cannery_web/live/type_live/form_component.html.heex:151
#, elixir-autogen, elixir-format
msgid "Steel"
msgstr ""
@ -389,15 +377,17 @@ msgstr ""
msgid "The self-hosted firearm tracker website"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:85
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316
#: lib/cannery_web/components/type_table_component.ex:85
#: lib/cannery_web/live/type_live/form_component.html.heex:316
#, elixir-autogen, elixir-format
msgid "Tracer"
msgstr ""
#: lib/cannery_web/components/container_table_component.ex:48
#: lib/cannery_web/components/move_pack_component.ex:66
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/container_live/form_component.html.heex:39
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Type"
msgstr ""
@ -439,8 +429,8 @@ msgstr ""
msgid "Range day"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:49
#: lib/cannery_web/components/shot_group_table_component.ex:44
#: lib/cannery_web/components/add_shot_record_component.html.heex:49
#: lib/cannery_web/components/shot_record_table_component.ex:47
#: lib/cannery_web/live/pack_live/show.ex:92
#: lib/cannery_web/live/range_live/form_component.html.heex:41
#, elixir-autogen, elixir-format
@ -457,18 +447,12 @@ msgstr ""
msgid "No ammo staged"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
#: lib/cannery_web/components/add_shot_record_component.html.heex:3
#: lib/cannery_web/live/pack_live/index.ex:35
#, elixir-autogen, elixir-format
msgid "Record shots"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format
msgid "Edit Shot Records"
msgstr ""
#: lib/cannery_web/live/range_live/index.ex:48
#, elixir-autogen, elixir-format
msgid "New Shot Records"
@ -480,13 +464,7 @@ msgstr ""
msgid "No shots recorded"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:22
#: lib/cannery_web/components/add_shot_group_component.html.heex:26
#, elixir-autogen, elixir-format
msgid "Rounds left"
msgstr ""
#: lib/cannery_web/components/shot_group_table_component.ex:42
#: lib/cannery_web/components/shot_record_table_component.ex:45
#: lib/cannery_web/live/pack_live/show.ex:90
#: lib/cannery_web/live/range_live/index.html.heex:69
#, elixir-autogen, elixir-format
@ -514,48 +492,48 @@ msgstr ""
msgid "Shot log"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:261
#: lib/cannery_web/components/core_components/pack_card.html.heex:42
#: lib/cannery_web/components/core_components/pack_card.html.heex:47
#: lib/cannery_web/components/pack_table_component.ex:163
#: lib/cannery_web/components/pack_table_component.ex:246
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
#: lib/cannery_web/components/type_table_component.ex:261
#: lib/cannery_web/live/pack_live/show.html.heex:37
#: lib/cannery_web/live/pack_live/show.html.heex:42
#: lib/cannery_web/live/type_live/show.html.heex:150
#, elixir-autogen, elixir-format
msgid "$%{amount}"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160
#: lib/cannery_web/live/type_live/form_component.html.heex:160
#, elixir-autogen, elixir-format
msgid "Bimetal"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:66
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
#: lib/cannery_web/components/type_table_component.ex:66
#: lib/cannery_web/live/type_live/form_component.html.heex:156
#, elixir-autogen, elixir-format
msgid "Jacket type"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279
#: lib/cannery_web/components/type_table_component.ex:82
#: lib/cannery_web/live/type_live/form_component.html.heex:279
#, elixir-autogen, elixir-format
msgid "Muzzle velocity"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:76
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244
#: lib/cannery_web/components/type_table_component.ex:76
#: lib/cannery_web/live/type_live/form_component.html.heex:244
#, elixir-autogen, elixir-format
msgid "Powder grains per charge"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:74
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236
#: lib/cannery_web/components/type_table_component.ex:74
#: lib/cannery_web/live/type_live/form_component.html.heex:236
#, elixir-autogen, elixir-format
msgid "Powder type"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343
#: lib/cannery_web/live/type_live/form_component.html.heex:343
#, elixir-autogen, elixir-format
msgid "UPC"
msgstr ""
@ -578,8 +556,8 @@ msgstr ""
msgid "New password"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:84
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304
#: lib/cannery_web/components/type_table_component.ex:84
#: lib/cannery_web/live/type_live/form_component.html.heex:304
#, elixir-autogen, elixir-format
msgid "Firing type"
msgstr ""
@ -602,16 +580,16 @@ msgid "Edit %{name} tags"
msgstr ""
#: lib/cannery_web/components/core_components/container_card.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:87
#: lib/cannery_web/live/container_live/show.html.heex:27
#: lib/cannery_web/live/type_live/show.html.heex:85
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:260
#: lib/cannery_web/components/pack_table_component.ex:160
#: lib/cannery_web/components/pack_table_component.ex:242
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156
#: lib/cannery_web/components/type_table_component.ex:260
#: lib/cannery_web/live/type_live/show.html.heex:154
#, elixir-autogen, elixir-format
msgid "No cost information"
msgstr ""
@ -682,7 +660,7 @@ msgstr ""
msgid "Copies"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139
#: lib/cannery_web/live/type_live/show.html.heex:137
#, elixir-autogen, elixir-format
msgid "Added on:"
msgstr ""
@ -729,9 +707,9 @@ msgid "View the source code"
msgstr ""
#: lib/cannery_web/components/core_components/topbar.html.heex:50
#: lib/cannery_web/live/ammo_type_live/index.ex:52
#: lib/cannery_web/live/ammo_type_live/index.ex:62
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
#: lib/cannery_web/live/type_live/index.ex:52
#: lib/cannery_web/live/type_live/index.ex:62
#: lib/cannery_web/live/type_live/index.html.heex:3
#, elixir-autogen, elixir-format
msgid "Catalog"
msgstr ""
@ -762,8 +740,8 @@ msgid "This ammo is not in a container"
msgstr ""
#: lib/cannery_web/components/core_components/container_card.html.heex:32
#: lib/cannery_web/live/ammo_type_live/show.html.heex:113
#: lib/cannery_web/live/container_live/show.html.heex:22
#: lib/cannery_web/live/type_live/show.html.heex:111
#, elixir-autogen, elixir-format
msgid "Packs:"
msgstr ""
@ -789,9 +767,9 @@ msgstr ""
msgid "Container:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:64
#: lib/cannery_web/live/ammo_type_live/show.html.heex:166
#: lib/cannery_web/live/pack_live/index.html.heex:87
#: lib/cannery_web/live/type_live/index.html.heex:64
#: lib/cannery_web/live/type_live/show.html.heex:164
#, elixir-autogen, elixir-format
msgid "Show used"
msgstr ""
@ -807,182 +785,171 @@ msgstr ""
msgid "Rounds shot: %{count}"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:123
#: lib/cannery_web/components/container_table_component.ex:64
#: lib/cannery_web/components/type_table_component.ex:123
#, elixir-autogen, elixir-format, fuzzy
msgid "Packs"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:144
#: lib/cannery_web/components/container_table_component.ex:65
#: lib/cannery_web/components/type_table_component.ex:144
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:172
#: lib/cannery_web/live/container_live/index.html.heex:40
#: lib/cannery_web/live/container_live/show.html.heex:115
#: lib/cannery_web/live/type_live/show.html.heex:170
#, elixir-autogen, elixir-format
msgid "View as table"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:108
#: lib/cannery_web/components/type_table_component.ex:108
#, elixir-autogen, elixir-format
msgid "Total ever packs"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130
#: lib/cannery_web/live/type_live/show.html.heex:128
#, elixir-autogen, elixir-format
msgid "Total ever packs:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:129
#: lib/cannery_web/components/type_table_component.ex:129
#, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
#: lib/cannery_web/live/type_live/show.html.heex:102
#, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:116
#: lib/cannery_web/components/type_table_component.ex:116
#, elixir-autogen, elixir-format
msgid "Used packs"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:120
#, elixir-autogen, elixir-format
msgid "Used packs:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:137
#: lib/cannery_web/components/type_table_component.ex:137
#, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96
#: lib/cannery_web/live/type_live/show.html.heex:94
#, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds:"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:34
#, elixir-autogen, elixir-format, fuzzy
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds shot chart"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:154
#: lib/cannery_web/live/type_live/show.ex:154
#, elixir-autogen, elixir-format, fuzzy
msgid "Blank:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:132
#: lib/cannery_web/live/type_live/show.ex:132
#, elixir-autogen, elixir-format, fuzzy
msgid "Bullet core:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:131
#: lib/cannery_web/live/type_live/show.ex:131
#, elixir-autogen, elixir-format, fuzzy
msgid "Bullet type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123
#: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format, fuzzy
msgid "Caliber:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:121
#: lib/cannery_web/live/type_live/show.ex:121
#, elixir-autogen, elixir-format, fuzzy
msgid "Cartridge:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:134
#: lib/cannery_web/live/type_live/show.ex:134
#, elixir-autogen, elixir-format, fuzzy
msgid "Case material:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:155
#: lib/cannery_web/live/type_live/show.ex:155
#, elixir-autogen, elixir-format, fuzzy
msgid "Corrosive:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:151
#: lib/cannery_web/live/type_live/show.ex:151
#, elixir-autogen, elixir-format, fuzzy
msgid "Firing type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:130
#: lib/cannery_web/live/type_live/show.ex:130
#, elixir-autogen, elixir-format, fuzzy
msgid "Grains:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:153
#: lib/cannery_web/live/type_live/show.ex:153
#, elixir-autogen, elixir-format, fuzzy
msgid "Incendiary:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:133
#: lib/cannery_web/live/type_live/show.ex:133
#, elixir-autogen, elixir-format, fuzzy
msgid "Jacket type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:156
#: lib/cannery_web/live/type_live/show.ex:156
#, elixir-autogen, elixir-format, fuzzy
msgid "Manufacturer:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:149
#: lib/cannery_web/live/type_live/show.ex:149
#, elixir-autogen, elixir-format, fuzzy
msgid "Muzzle velocity:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:143
#: lib/cannery_web/live/type_live/show.ex:143
#, elixir-autogen, elixir-format, fuzzy
msgid "Powder grains per charge:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:141
#: lib/cannery_web/live/type_live/show.ex:141
#, elixir-autogen, elixir-format, fuzzy
msgid "Powder type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:147
#: lib/cannery_web/live/type_live/show.ex:147
#, elixir-autogen, elixir-format, fuzzy
msgid "Pressure:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:150
#: lib/cannery_web/live/type_live/show.ex:150
#, elixir-autogen, elixir-format, fuzzy
msgid "Primer type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:152
#: lib/cannery_web/live/type_live/show.ex:152
#, elixir-autogen, elixir-format, fuzzy
msgid "Tracer:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:157
#: lib/cannery_web/live/type_live/show.ex:157
#, elixir-autogen, elixir-format, fuzzy
msgid "UPC:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:102
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148
#: lib/cannery_web/components/type_table_component.ex:102
#: lib/cannery_web/live/type_live/show.html.heex:146
#, elixir-autogen, elixir-format
msgid "Average CPR"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:28
#: lib/cannery_web/live/ammo_type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/components/core_components/pack_card.html.heex:17
#: lib/cannery_web/components/pack_table_component.ex:250
#, elixir-autogen, elixir-format
@ -1046,13 +1013,7 @@ msgstr ""
msgid "Edit ammo"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
#: lib/cannery_web/live/ammo_type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Ammo types"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:58
#: lib/cannery_web/live/type_live/index.html.heex:58
#, elixir-autogen, elixir-format
msgid "Search catalog"
msgstr ""
@ -1170,42 +1131,42 @@ msgstr ""
msgid "Password"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261
#: lib/cannery_web/live/type_live/form_component.html.heex:261
#, elixir-autogen, elixir-format
msgid "+P"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75
#: lib/cannery_web/live/type_live/form_component.html.heex:75
#, elixir-autogen, elixir-format
msgid ".223"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56
#: lib/cannery_web/live/type_live/form_component.html.heex:56
#, elixir-autogen, elixir-format
msgid "5.56x46mm NATO"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300
#: lib/cannery_web/live/type_live/form_component.html.heex:300
#, elixir-autogen, elixir-format
msgid "Boxer"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308
#: lib/cannery_web/live/type_live/form_component.html.heex:308
#, elixir-autogen, elixir-format
msgid "Centerfire"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:43
#: lib/cannery_web/components/add_shot_record_component.html.heex:43
#: lib/cannery_web/live/range_live/form_component.html.heex:35
#, elixir-autogen, elixir-format
msgid "Really great weather"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:100
#: lib/cannery_web/components/container_table_component.ex:67
#: lib/cannery_web/components/move_pack_component.ex:68
#: lib/cannery_web/components/pack_table_component.ex:59
#: lib/cannery_web/components/shot_group_table_component.ex:45
#: lib/cannery_web/components/shot_record_table_component.ex:48
#: lib/cannery_web/components/type_table_component.ex:100
#: lib/cannery_web/live/pack_live/show.ex:93
#, elixir-autogen, elixir-format
msgid "Actions"
@ -1232,76 +1193,76 @@ msgstr ""
msgid "Close modal"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:35
#: lib/cannery_web/live/container_live/show.html.heex:103
#: lib/cannery_web/live/pack_live/index.html.heex:58
#: lib/cannery_web/live/range_live/index.html.heex:92
#: lib/cannery_web/live/type_live/index.html.heex:35
#, elixir-autogen, elixir-format
msgid "All"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313
#: lib/cannery_web/live/type_live/form_component.html.heex:313
#, elixir-autogen, elixir-format
msgid "Attributes"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:56
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
#: lib/cannery_web/components/type_table_component.ex:56
#: lib/cannery_web/live/type_live/form_component.html.heex:89
#, elixir-autogen, elixir-format, fuzzy
msgid "Brass height"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:128
#: lib/cannery_web/live/type_live/show.ex:128
#, elixir-autogen, elixir-format
msgid "Brass height:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:57
#: lib/cannery_web/components/ammo_type_table_component.ex:58
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96
#: lib/cannery_web/components/type_table_component.ex:57
#: lib/cannery_web/components/type_table_component.ex:58
#: lib/cannery_web/live/type_live/form_component.html.heex:96
#, elixir-autogen, elixir-format
msgid "Chamber size"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:129
#: lib/cannery_web/live/type_live/show.ex:129
#, elixir-autogen, elixir-format
msgid "Chamber size:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48
#: lib/cannery_web/live/type_live/form_component.html.heex:48
#, elixir-autogen, elixir-format
msgid "Dimensions"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266
#: lib/cannery_web/components/type_table_component.ex:81
#: lib/cannery_web/live/type_live/form_component.html.heex:266
#, elixir-autogen, elixir-format
msgid "Dram equivalent"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:148
#: lib/cannery_web/live/type_live/show.ex:148
#, elixir-autogen, elixir-format
msgid "Dram equivalent:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67
#: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/type_live/form_component.html.heex:67
#, elixir-autogen, elixir-format
msgid "Gauge"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123
#: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format
msgid "Gauge:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:72
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207
#: lib/cannery_web/components/type_table_component.ex:72
#: lib/cannery_web/live/type_live/form_component.html.heex:207
#, elixir-autogen, elixir-format
msgid "Load grains"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:139
#: lib/cannery_web/live/type_live/show.ex:139
#, elixir-autogen, elixir-format
msgid "Load grains:"
msgstr ""
@ -1311,140 +1272,175 @@ msgstr ""
msgid "No ammo"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60
#: lib/cannery_web/live/type_live/show.html.heex:58
#, elixir-autogen, elixir-format
msgid "None specified"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:38
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
#: lib/cannery_web/live/container_live/show.html.heex:106
#: lib/cannery_web/live/pack_live/index.html.heex:61
#: lib/cannery_web/live/range_live/index.html.heex:95
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:38
#: lib/cannery_web/live/type_live/show.html.heex:56
#, elixir-autogen, elixir-format
msgid "Pistol"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233
#: lib/cannery_web/live/type_live/form_component.html.heex:233
#, elixir-autogen, elixir-format, fuzzy
msgid "Powder"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293
#: lib/cannery_web/live/type_live/form_component.html.heex:293
#, elixir-autogen, elixir-format, fuzzy
msgid "Primer"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109
#: lib/cannery_web/live/type_live/form_component.html.heex:109
#, elixir-autogen, elixir-format
msgid "Projectile"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:36
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
#: lib/cannery_web/live/container_live/show.html.heex:104
#: lib/cannery_web/live/pack_live/index.html.heex:59
#: lib/cannery_web/live/range_live/index.html.heex:93
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:36
#: lib/cannery_web/live/type_live/show.html.heex:54
#, elixir-autogen, elixir-format
msgid "Rifle"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:73
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215
#: lib/cannery_web/components/type_table_component.ex:73
#: lib/cannery_web/live/type_live/form_component.html.heex:215
#, elixir-autogen, elixir-format
msgid "Shot charge weight"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:140
#: lib/cannery_web/live/type_live/show.ex:140
#, elixir-autogen, elixir-format
msgid "Shot charge weight:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:70
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191
#: lib/cannery_web/components/type_table_component.ex:70
#: lib/cannery_web/live/type_live/form_component.html.heex:191
#, elixir-autogen, elixir-format
msgid "Shot material"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:137
#: lib/cannery_web/live/type_live/show.ex:137
#, elixir-autogen, elixir-format
msgid "Shot material:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:71
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200
#: lib/cannery_web/components/type_table_component.ex:71
#: lib/cannery_web/live/type_live/form_component.html.heex:200
#, elixir-autogen, elixir-format, fuzzy
msgid "Shot size"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:138
#: lib/cannery_web/live/type_live/show.ex:138
#, elixir-autogen, elixir-format, fuzzy
msgid "Shot size:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:69
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183
#: lib/cannery_web/components/type_table_component.ex:69
#: lib/cannery_web/live/type_live/form_component.html.heex:183
#, elixir-autogen, elixir-format
msgid "Shot type"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:136
#: lib/cannery_web/live/type_live/show.ex:136
#, elixir-autogen, elixir-format
msgid "Shot type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
#: lib/cannery_web/live/container_live/show.html.heex:105
#: lib/cannery_web/live/pack_live/index.html.heex:60
#: lib/cannery_web/live/range_live/index.html.heex:94
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:37
#: lib/cannery_web/live/type_live/show.html.heex:52
#, elixir-autogen, elixir-format
msgid "Shotgun"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143
#: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/type_live/form_component.html.heex:143
#, elixir-autogen, elixir-format
msgid "Slug core"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187
#: lib/cannery_web/live/type_live/form_component.html.heex:187
#, elixir-autogen, elixir-format
msgid "Target, bird, buck, etc"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:127
#: lib/cannery_web/live/type_live/show.ex:127
#, elixir-autogen, elixir-format
msgid "Unfired length:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:55
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80
#: lib/cannery_web/components/type_table_component.ex:55
#: lib/cannery_web/live/type_live/form_component.html.heex:80
#, elixir-autogen, elixir-format
msgid "Unfired shell length"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:68
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176
#: lib/cannery_web/components/type_table_component.ex:68
#: lib/cannery_web/live/type_live/form_component.html.heex:176
#, elixir-autogen, elixir-format
msgid "Wadding"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:135
#: lib/cannery_web/live/type_live/show.ex:135
#, elixir-autogen, elixir-format
msgid "Wadding:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:150
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:21
#: lib/cannery_web/live/ammo_type_live/index.html.heex:29
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
#: lib/cannery_web/components/type_table_component.ex:150
#: lib/cannery_web/live/container_live/show.html.heex:97
#: lib/cannery_web/live/pack_live/index.html.heex:50
#: lib/cannery_web/live/range_live/index.html.heex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/index.html.heex:29
#: lib/cannery_web/live/type_live/show.html.heex:46
#, elixir-autogen, elixir-format
msgid "Class"
msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:22
#: lib/cannery_web/components/add_shot_record_component.html.heex:26
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds left"
msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit Shot Record"
msgstr ""
#: lib/cannery_web/live/type_live/index.ex:28
#: lib/cannery_web/live/type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.ex:36
#: lib/cannery_web/live/type_live/index.ex:44
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:8
#: lib/cannery_web/live/type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Types"
msgstr ""

View File

@ -56,7 +56,7 @@ msgstr ""
msgid "Not found"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18
#: lib/cannery_web/live/type_live/form_component.html.heex:18
#: lib/cannery_web/templates/user_registration/new.html.heex:13
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:13
#: lib/cannery_web/templates/user_settings/edit.html.heex:22
@ -156,42 +156,42 @@ msgstr ""
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
msgstr ""
#: lib/cannery/ammo.ex:1123
#: lib/cannery/ammo.ex:1121
#, elixir-autogen, elixir-format
msgid "Invalid multiplier"
msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:74
#, elixir-autogen, elixir-format
msgid "Your browser does not support the canvas element."
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:74
#: lib/cannery/activity_log/shot_record.ex:74
#, elixir-autogen, elixir-format, fuzzy
msgid "Please select a valid user and ammo pack"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:88
#: lib/cannery/activity_log/shot_record.ex:88
#, elixir-autogen, elixir-format
msgid "Ammo left can be at most %{count} rounds"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:84
#: lib/cannery/activity_log/shot_record.ex:84
#, elixir-autogen, elixir-format
msgid "Ammo left must be at least 0"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:119
#: lib/cannery/activity_log/shot_record.ex:119
#, elixir-autogen, elixir-format, fuzzy
msgid "Count can be at most %{count} shots"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:80
#: lib/cannery/activity_log/shot_record.ex:80
#, elixir-autogen, elixir-format
msgid "can't be blank"
msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format, fuzzy
msgid "Please select a type and container"
msgstr ""

View File

@ -10,17 +10,17 @@ msgid ""
msgstr ""
"Language: en\n"
#: lib/cannery_web/live/ammo_type_live/form_component.ex:89
#: lib/cannery_web/live/container_live/form_component.ex:89
#: lib/cannery_web/live/invite_live/form_component.ex:80
#: lib/cannery_web/live/tag_live/form_component.ex:78
#: lib/cannery_web/live/type_live/form_component.ex:88
#, elixir-autogen, elixir-format
msgid "%{name} created successfully"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:72
#: lib/cannery_web/live/ammo_type_live/show.ex:27
#: lib/cannery_web/live/tag_live/index.ex:65
#: lib/cannery_web/live/type_live/index.ex:72
#: lib/cannery_web/live/type_live/show.ex:27
#, elixir-autogen, elixir-format
msgid "%{name} deleted succesfully"
msgstr ""
@ -31,10 +31,10 @@ msgstr ""
msgid "%{name} has been deleted"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.ex:70
#: lib/cannery_web/live/container_live/form_component.ex:70
#: lib/cannery_web/live/invite_live/form_component.ex:62
#: lib/cannery_web/live/tag_live/form_component.ex:60
#: lib/cannery_web/live/type_live/form_component.ex:69
#, elixir-autogen, elixir-format
msgid "%{name} updated successfully"
msgstr ""
@ -109,13 +109,13 @@ msgstr ""
msgid "Please check your email to verify your account"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:351
#: lib/cannery_web/components/add_shot_record_component.html.heex:59
#: lib/cannery_web/live/container_live/form_component.html.heex:59
#: lib/cannery_web/live/invite_live/form_component.html.heex:37
#: lib/cannery_web/live/pack_live/form_component.html.heex:85
#: lib/cannery_web/live/range_live/form_component.html.heex:47
#: lib/cannery_web/live/tag_live/form_component.html.heex:39
#: lib/cannery_web/live/type_live/form_component.html.heex:351
#, elixir-autogen, elixir-format
msgid "Saving..."
msgstr ""
@ -145,7 +145,7 @@ msgstr ""
msgid "Adding..."
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.ex:60
#: lib/cannery_web/components/add_shot_record_component.ex:60
#, elixir-autogen, elixir-format
msgid "Shots recorded successfully"
msgstr ""
@ -236,8 +236,8 @@ msgid_plural "Ammo added successfully"
msgstr[0] ""
msgstr[1] ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
#: lib/cannery_web/live/type_live/index.html.heex:116
#: lib/cannery_web/live/type_live/show.html.heex:29
#, elixir-autogen, elixir-format, fuzzy
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
msgstr ""

View File

@ -56,7 +56,7 @@ msgstr ""
msgid "Not found"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18
#: lib/cannery_web/live/type_live/form_component.html.heex:18
#: lib/cannery_web/templates/user_registration/new.html.heex:13
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:13
#: lib/cannery_web/templates/user_settings/edit.html.heex:22
@ -155,42 +155,42 @@ msgstr ""
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
msgstr ""
#: lib/cannery/ammo.ex:1123
#: lib/cannery/ammo.ex:1121
#, elixir-autogen, elixir-format
msgid "Invalid multiplier"
msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:74
#, elixir-autogen, elixir-format
msgid "Your browser does not support the canvas element."
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:74
#: lib/cannery/activity_log/shot_record.ex:74
#, elixir-autogen, elixir-format
msgid "Please select a valid user and ammo pack"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:88
#: lib/cannery/activity_log/shot_record.ex:88
#, elixir-autogen, elixir-format
msgid "Ammo left can be at most %{count} rounds"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:84
#: lib/cannery/activity_log/shot_record.ex:84
#, elixir-autogen, elixir-format
msgid "Ammo left must be at least 0"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:119
#: lib/cannery/activity_log/shot_record.ex:119
#, elixir-autogen, elixir-format
msgid "Count can be at most %{count} shots"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:80
#: lib/cannery/activity_log/shot_record.ex:80
#, elixir-autogen, elixir-format
msgid "can't be blank"
msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format
msgid "Please select a type and container"
msgstr ""

View File

@ -40,7 +40,7 @@ msgstr "¡Añade tu primera caja!"
msgid "Add your first container!"
msgstr "¡Añade tu primer contenedor!"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13
#: lib/cannery_web/live/type_live/index.html.heex:13
#, elixir-autogen, elixir-format
msgid "Add your first type!"
msgstr "¡Añade tu primer tipo!"
@ -95,11 +95,6 @@ msgstr "Entrar"
msgid "Make your first tag!"
msgstr "¡Aplica tu primera etiqueta!"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr "Nuevo tipo de Munición"
#: lib/cannery_web/live/container_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Container"
@ -133,13 +128,13 @@ msgstr "Reenviar instrucciones de confirmación"
msgid "Reset password"
msgstr "Resetear contraseña"
#: lib/cannery_web/components/add_shot_group_component.html.heex:57
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:350
#: lib/cannery_web/components/add_shot_record_component.html.heex:57
#: lib/cannery_web/live/container_live/form_component.html.heex:57
#: lib/cannery_web/live/invite_live/form_component.html.heex:35
#: lib/cannery_web/live/pack_live/form_component.html.heex:84
#: lib/cannery_web/live/range_live/form_component.html.heex:45
#: lib/cannery_web/live/tag_live/form_component.html.heex:37
#: lib/cannery_web/live/type_live/form_component.html.heex:350
#, elixir-autogen, elixir-format
msgid "Save"
msgstr "Guardar"
@ -216,11 +211,6 @@ msgstr "Cambiar lenguaje"
msgid "View in Catalog"
msgstr "Ver en Catalogo"
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "add an ammo type first"
msgstr "añade primero un tipo de munición"
#: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:89
@ -250,11 +240,6 @@ msgstr "Desmontar del campo de tiro"
msgid "Export Data as JSON"
msgstr "Exportar datos como JSON"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:110
#, elixir-autogen, elixir-format
msgid "Clone %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:87
#: lib/cannery_web/live/container_live/index.html.heex:145
#, elixir-autogen, elixir-format
@ -266,12 +251,6 @@ msgstr ""
msgid "Copy invite link for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:129
#: lib/cannery_web/live/ammo_type_live/show.html.heex:36
#, elixir-autogen, elixir-format
msgid "Delete %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:104
#: lib/cannery_web/live/container_live/index.html.heex:162
#: lib/cannery_web/live/container_live/show.html.heex:48
@ -289,18 +268,6 @@ msgstr ""
msgid "Delete invite for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format
msgid "Delete shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:100
#: lib/cannery_web/live/ammo_type_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:77
#: lib/cannery_web/live/container_live/index.html.heex:135
#: lib/cannery_web/live/container_live/show.html.heex:35
@ -318,16 +285,6 @@ msgstr ""
msgid "Edit invite for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#, elixir-autogen, elixir-format
msgid "Edit shot group of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format
msgid "Edit shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:120
#, elixir-autogen, elixir-format, fuzzy
msgid "Stage"
@ -344,11 +301,6 @@ msgstr ""
msgid "Unstage"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
#, elixir-autogen, elixir-format
msgid "View %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format, fuzzy
msgid "Clone pack of %{pack_count} bullets"
@ -366,8 +318,52 @@ msgstr ""
msgid "Edit pack of %{pack_count} bullets"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154
#: lib/cannery_web/live/type_live/show.html.heex:204
#, elixir-autogen, elixir-format, fuzzy
msgid "View pack of %{pack_count} bullets"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:105
#, elixir-autogen, elixir-format, fuzzy
msgid "Clone %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:35
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:97
#: lib/cannery_web/live/type_live/show.html.heex:19
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:17
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr "Nuevo tipo de Munición"
#: lib/cannery_web/live/type_live/index.html.heex:89
#, elixir-autogen, elixir-format, fuzzy
msgid "View %{type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format, fuzzy
msgid "add a type first"
msgstr "añade primero un tipo de munición"

View File

@ -30,7 +30,7 @@ msgid "Admins:"
msgstr "Aministradores:"
#: lib/cannery_web/components/core_components/topbar.html.heex:58
#: lib/cannery_web/components/shot_group_table_component.ex:41
#: lib/cannery_web/components/shot_record_table_component.ex:44
#: lib/cannery_web/live/pack_live/index.ex:75
#: lib/cannery_web/live/pack_live/index.ex:84
#: lib/cannery_web/live/pack_live/index.html.heex:3
@ -38,54 +38,48 @@ msgstr "Aministradores:"
msgid "Ammo"
msgstr "Munición"
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Ammo type"
msgstr "Tipo de munición"
#: lib/cannery_web/live/tag_live/form_component.html.heex:25
#, elixir-autogen, elixir-format
msgid "Background color"
msgstr "Color de fondo"
#: lib/cannery_web/components/ammo_type_table_component.ex:87
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324
#: lib/cannery_web/components/type_table_component.ex:87
#: lib/cannery_web/live/type_live/form_component.html.heex:324
#, elixir-autogen, elixir-format
msgid "Blank"
msgstr "Fogueo"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171
#: lib/cannery_web/live/type_live/form_component.html.heex:171
#, elixir-autogen, elixir-format
msgid "Brass"
msgstr "Latón"
#: lib/cannery_web/components/ammo_type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
#: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/type_live/form_component.html.heex:144
#, elixir-autogen, elixir-format
msgid "Bullet core"
msgstr "Núcleo de bala"
#: lib/cannery_web/components/ammo_type_table_component.ex:60
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
#: lib/cannery_web/components/type_table_component.ex:60
#: lib/cannery_web/live/type_live/form_component.html.heex:121
#, elixir-autogen, elixir-format
msgid "Bullet type"
msgstr "Tipo de bala"
#: lib/cannery_web/components/ammo_type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68
#: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/type_live/form_component.html.heex:68
#, elixir-autogen, elixir-format
msgid "Caliber"
msgstr "Calibre"
#: lib/cannery_web/components/ammo_type_table_component.ex:49
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52
#: lib/cannery_web/components/type_table_component.ex:49
#: lib/cannery_web/live/type_live/form_component.html.heex:52
#, elixir-autogen, elixir-format
msgid "Cartridge"
msgstr "Cartucho"
#: lib/cannery_web/components/ammo_type_table_component.ex:67
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167
#: lib/cannery_web/components/type_table_component.ex:67
#: lib/cannery_web/live/type_live/form_component.html.heex:167
#, elixir-autogen, elixir-format
msgid "Case material"
msgstr "Material del casquillo"
@ -105,8 +99,8 @@ msgstr "Contenedor"
msgid "Containers"
msgstr "Contenedores"
#: lib/cannery_web/components/ammo_type_table_component.ex:88
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328
#: lib/cannery_web/components/type_table_component.ex:88
#: lib/cannery_web/live/type_live/form_component.html.heex:328
#, elixir-autogen, elixir-format
msgid "Corrosive"
msgstr "Corrosiva"
@ -124,8 +118,8 @@ msgid "Count:"
msgstr "Cantidad:"
#: lib/cannery_web/components/container_table_component.ex:46
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:38
#: lib/cannery_web/live/container_live/form_component.html.heex:29
#: lib/cannery_web/live/type_live/form_component.html.heex:38
#, elixir-autogen, elixir-format
msgid "Description"
msgstr "Descripción"
@ -151,19 +145,19 @@ msgstr "Editar Invitación"
msgid "Edit Tag"
msgstr "Editar Etiqueta"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135
#: lib/cannery_web/live/type_live/form_component.html.heex:135
#, elixir-autogen, elixir-format
msgid "FMJ"
msgstr "Bala encamisada"
#: lib/cannery_web/components/ammo_type_table_component.ex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112
#: lib/cannery_web/components/type_table_component.ex:59
#: lib/cannery_web/live/type_live/form_component.html.heex:112
#, elixir-autogen, elixir-format
msgid "Grains"
msgstr "Grano"
#: lib/cannery_web/components/ammo_type_table_component.ex:86
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320
#: lib/cannery_web/components/type_table_component.ex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:320
#, elixir-autogen, elixir-format
msgid "Incendiary"
msgstr "Incendiaria"
@ -213,9 +207,9 @@ msgstr "Localización:"
msgid "Magazine, Clip, Ammo Box, etc"
msgstr "Cargador, Clip, Caja de Munición, etc"
#: lib/cannery_web/components/ammo_type_table_component.ex:89
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336
#: lib/cannery_web/components/type_table_component.ex:89
#: lib/cannery_web/live/type_live/form_component.html.heex:333
#: lib/cannery_web/live/type_live/form_component.html.heex:336
#, elixir-autogen, elixir-format
msgid "Manufacturer"
msgstr "Fabricante"
@ -230,22 +224,16 @@ msgstr "Lata de munición metálica con la pegatina de chica de anime"
msgid "My cool ammo can"
msgstr "Mi lata de munición guapa"
#: lib/cannery_web/components/ammo_type_table_component.ex:153
#: lib/cannery_web/components/container_table_component.ex:45
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31
#: lib/cannery_web/components/type_table_component.ex:153
#: lib/cannery_web/live/container_live/form_component.html.heex:21
#: lib/cannery_web/live/invite_live/form_component.html.heex:21
#: lib/cannery_web/live/tag_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/form_component.html.heex:31
#, elixir-autogen, elixir-format
msgid "Name"
msgstr "Nombre"
#: lib/cannery_web/live/ammo_type_live/index.ex:36
#: lib/cannery_web/live/ammo_type_live/index.ex:44
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr "Nuevo tipo de Munición"
#: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/index.ex:39
#, elixir-autogen, elixir-format
@ -267,7 +255,7 @@ msgstr "Nueva Etiqueta"
msgid "No Ammo"
msgstr "Sin Munición"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180
#: lib/cannery_web/live/type_live/show.html.heex:178
#, elixir-autogen, elixir-format
msgid "No ammo for this type"
msgstr "Sin munición para este tipo"
@ -290,8 +278,8 @@ msgstr "Sin invitaciones"
msgid "No tags"
msgstr "Sin etiquetas"
#: lib/cannery_web/components/add_shot_group_component.html.heex:38
#: lib/cannery_web/components/shot_group_table_component.ex:43
#: lib/cannery_web/components/add_shot_record_component.html.heex:38
#: lib/cannery_web/components/shot_record_table_component.ex:46
#: lib/cannery_web/live/pack_live/form_component.html.heex:50
#: lib/cannery_web/live/pack_live/show.ex:91
#: lib/cannery_web/live/range_live/form_component.html.heex:30
@ -310,8 +298,8 @@ msgstr "Notas:"
msgid "On the bookshelf"
msgstr "En la estantería"
#: lib/cannery_web/components/ammo_type_table_component.ex:80
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257
#: lib/cannery_web/components/type_table_component.ex:80
#: lib/cannery_web/live/type_live/form_component.html.heex:257
#, elixir-autogen, elixir-format
msgid "Pressure"
msgstr "Presión"
@ -327,8 +315,8 @@ msgstr "Precio pagado"
msgid "Price paid:"
msgstr "Precio pagado:"
#: lib/cannery_web/components/ammo_type_table_component.ex:83
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296
#: lib/cannery_web/components/type_table_component.ex:83
#: lib/cannery_web/live/type_live/form_component.html.heex:296
#, elixir-autogen, elixir-format
msgid "Primer type"
msgstr "Tipo de espoleta"
@ -361,7 +349,7 @@ msgstr "Ajustes"
msgid "Simple:"
msgstr "Simple:"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151
#: lib/cannery_web/live/type_live/form_component.html.heex:151
#, elixir-autogen, elixir-format
msgid "Steel"
msgstr "Acero"
@ -396,15 +384,17 @@ msgstr "Color del texto"
msgid "The self-hosted firearm tracker website"
msgstr "La página de seguimiento de armas autogestionada"
#: lib/cannery_web/components/ammo_type_table_component.ex:85
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316
#: lib/cannery_web/components/type_table_component.ex:85
#: lib/cannery_web/live/type_live/form_component.html.heex:316
#, elixir-autogen, elixir-format
msgid "Tracer"
msgstr "Trazadora"
#: lib/cannery_web/components/container_table_component.ex:48
#: lib/cannery_web/components/move_pack_component.ex:66
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/container_live/form_component.html.heex:39
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Type"
msgstr "Tipo"
@ -446,8 +436,8 @@ msgstr "Campo de tiro"
msgid "Range day"
msgstr "Día de disparar"
#: lib/cannery_web/components/add_shot_group_component.html.heex:49
#: lib/cannery_web/components/shot_group_table_component.ex:44
#: lib/cannery_web/components/add_shot_record_component.html.heex:49
#: lib/cannery_web/components/shot_record_table_component.ex:47
#: lib/cannery_web/live/pack_live/show.ex:92
#: lib/cannery_web/live/range_live/form_component.html.heex:41
#, elixir-autogen, elixir-format
@ -464,18 +454,12 @@ msgstr "Tiros disparados"
msgid "No ammo staged"
msgstr "No hay munición preparada"
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
#: lib/cannery_web/components/add_shot_record_component.html.heex:3
#: lib/cannery_web/live/pack_live/index.ex:35
#, elixir-autogen, elixir-format
msgid "Record shots"
msgstr "Tiros récord"
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format
msgid "Edit Shot Records"
msgstr "Editar Tiros Récord"
#: lib/cannery_web/live/range_live/index.ex:48
#, elixir-autogen, elixir-format
msgid "New Shot Records"
@ -487,13 +471,7 @@ msgstr "Nuevos Tiros Récord"
msgid "No shots recorded"
msgstr "No se han grabado tiros"
#: lib/cannery_web/components/add_shot_group_component.html.heex:22
#: lib/cannery_web/components/add_shot_group_component.html.heex:26
#, elixir-autogen, elixir-format
msgid "Rounds left"
msgstr "Balas restantes"
#: lib/cannery_web/components/shot_group_table_component.ex:42
#: lib/cannery_web/components/shot_record_table_component.ex:45
#: lib/cannery_web/live/pack_live/show.ex:90
#: lib/cannery_web/live/range_live/index.html.heex:69
#, elixir-autogen, elixir-format
@ -521,48 +499,48 @@ msgstr "No hay otros contenedores"
msgid "Shot log"
msgstr "Registro de tiros"
#: lib/cannery_web/components/ammo_type_table_component.ex:261
#: lib/cannery_web/components/core_components/pack_card.html.heex:42
#: lib/cannery_web/components/core_components/pack_card.html.heex:47
#: lib/cannery_web/components/pack_table_component.ex:163
#: lib/cannery_web/components/pack_table_component.ex:246
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
#: lib/cannery_web/components/type_table_component.ex:261
#: lib/cannery_web/live/pack_live/show.html.heex:37
#: lib/cannery_web/live/pack_live/show.html.heex:42
#: lib/cannery_web/live/type_live/show.html.heex:150
#, elixir-autogen, elixir-format
msgid "$%{amount}"
msgstr "$%{amount}"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160
#: lib/cannery_web/live/type_live/form_component.html.heex:160
#, elixir-autogen, elixir-format
msgid "Bimetal"
msgstr "Bimetal"
#: lib/cannery_web/components/ammo_type_table_component.ex:66
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
#: lib/cannery_web/components/type_table_component.ex:66
#: lib/cannery_web/live/type_live/form_component.html.heex:156
#, elixir-autogen, elixir-format
msgid "Jacket type"
msgstr "Tipo de camisa"
#: lib/cannery_web/components/ammo_type_table_component.ex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279
#: lib/cannery_web/components/type_table_component.ex:82
#: lib/cannery_web/live/type_live/form_component.html.heex:279
#, elixir-autogen, elixir-format
msgid "Muzzle velocity"
msgstr "Velocidad de boca"
#: lib/cannery_web/components/ammo_type_table_component.ex:76
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244
#: lib/cannery_web/components/type_table_component.ex:76
#: lib/cannery_web/live/type_live/form_component.html.heex:244
#, elixir-autogen, elixir-format
msgid "Powder grains per charge"
msgstr "Granos de polvora por carga"
#: lib/cannery_web/components/ammo_type_table_component.ex:74
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236
#: lib/cannery_web/components/type_table_component.ex:74
#: lib/cannery_web/live/type_live/form_component.html.heex:236
#, elixir-autogen, elixir-format
msgid "Powder type"
msgstr "Tipo de polvora"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343
#: lib/cannery_web/live/type_live/form_component.html.heex:343
#, elixir-autogen, elixir-format
msgid "UPC"
msgstr ""
@ -585,8 +563,8 @@ msgstr "Contraseña actual"
msgid "New password"
msgstr "Nueva contraseña"
#: lib/cannery_web/components/ammo_type_table_component.ex:84
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304
#: lib/cannery_web/components/type_table_component.ex:84
#: lib/cannery_web/live/type_live/form_component.html.heex:304
#, elixir-autogen, elixir-format
msgid "Firing type"
msgstr "Tipo de fuego"
@ -609,16 +587,16 @@ msgid "Edit %{name} tags"
msgstr "Editar etiquetas de %{name}"
#: lib/cannery_web/components/core_components/container_card.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:87
#: lib/cannery_web/live/container_live/show.html.heex:27
#: lib/cannery_web/live/type_live/show.html.heex:85
#, elixir-autogen, elixir-format
msgid "Rounds:"
msgstr "Balas:"
#: lib/cannery_web/components/ammo_type_table_component.ex:260
#: lib/cannery_web/components/pack_table_component.ex:160
#: lib/cannery_web/components/pack_table_component.ex:242
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156
#: lib/cannery_web/components/type_table_component.ex:260
#: lib/cannery_web/live/type_live/show.html.heex:154
#, elixir-autogen, elixir-format
msgid "No cost information"
msgstr "No hay información de coste"
@ -689,7 +667,7 @@ msgstr "Tiros Récord"
msgid "Copies"
msgstr "Copias"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139
#: lib/cannery_web/live/type_live/show.html.heex:137
#, elixir-autogen, elixir-format
msgid "Added on:"
msgstr "Añadido en:"
@ -736,9 +714,9 @@ msgid "View the source code"
msgstr "Ver código fuente"
#: lib/cannery_web/components/core_components/topbar.html.heex:50
#: lib/cannery_web/live/ammo_type_live/index.ex:52
#: lib/cannery_web/live/ammo_type_live/index.ex:62
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
#: lib/cannery_web/live/type_live/index.ex:52
#: lib/cannery_web/live/type_live/index.ex:62
#: lib/cannery_web/live/type_live/index.html.heex:3
#, elixir-autogen, elixir-format
msgid "Catalog"
msgstr "Catálogo"
@ -769,8 +747,8 @@ msgid "This ammo is not in a container"
msgstr "Esta munición no está en un contenedor"
#: lib/cannery_web/components/core_components/container_card.html.heex:32
#: lib/cannery_web/live/ammo_type_live/show.html.heex:113
#: lib/cannery_web/live/container_live/show.html.heex:22
#: lib/cannery_web/live/type_live/show.html.heex:111
#, elixir-autogen, elixir-format
msgid "Packs:"
msgstr "Paquetes:"
@ -797,9 +775,9 @@ msgstr ""
msgid "Container:"
msgstr "Contenedor:"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:64
#: lib/cannery_web/live/ammo_type_live/show.html.heex:166
#: lib/cannery_web/live/pack_live/index.html.heex:87
#: lib/cannery_web/live/type_live/index.html.heex:64
#: lib/cannery_web/live/type_live/show.html.heex:164
#, elixir-autogen, elixir-format
msgid "Show used"
msgstr "Mostrar usadas"
@ -815,182 +793,171 @@ msgstr "%{percentage}%"
msgid "Rounds shot: %{count}"
msgstr "Balas disparadas: %{count}"
#: lib/cannery_web/components/ammo_type_table_component.ex:123
#: lib/cannery_web/components/container_table_component.ex:64
#: lib/cannery_web/components/type_table_component.ex:123
#, elixir-autogen, elixir-format, fuzzy
msgid "Packs"
msgstr "Paquetes"
#: lib/cannery_web/components/ammo_type_table_component.ex:144
#: lib/cannery_web/components/container_table_component.ex:65
#: lib/cannery_web/components/type_table_component.ex:144
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds"
msgstr "Balas"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:172
#: lib/cannery_web/live/container_live/index.html.heex:40
#: lib/cannery_web/live/container_live/show.html.heex:115
#: lib/cannery_web/live/type_live/show.html.heex:170
#, elixir-autogen, elixir-format
msgid "View as table"
msgstr "Ver como tabla"
#: lib/cannery_web/components/ammo_type_table_component.ex:108
#: lib/cannery_web/components/type_table_component.ex:108
#, elixir-autogen, elixir-format
msgid "Total ever packs"
msgstr "Paquetes totales"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130
#: lib/cannery_web/live/type_live/show.html.heex:128
#, elixir-autogen, elixir-format
msgid "Total ever packs:"
msgstr "Paquetes totales:"
#: lib/cannery_web/components/ammo_type_table_component.ex:129
#: lib/cannery_web/components/type_table_component.ex:129
#, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds"
msgstr "Balas totales"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
#: lib/cannery_web/live/type_live/show.html.heex:102
#, elixir-autogen, elixir-format
msgid "Total ever rounds:"
msgstr "Balas totales:"
#: lib/cannery_web/components/ammo_type_table_component.ex:116
#: lib/cannery_web/components/type_table_component.ex:116
#, elixir-autogen, elixir-format
msgid "Used packs"
msgstr "Paquetes usados"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:120
#, elixir-autogen, elixir-format
msgid "Used packs:"
msgstr "Paquetes usados:"
#: lib/cannery_web/components/ammo_type_table_component.ex:137
#: lib/cannery_web/components/type_table_component.ex:137
#, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds"
msgstr "Balas usadas"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96
#: lib/cannery_web/live/type_live/show.html.heex:94
#, elixir-autogen, elixir-format
msgid "Used rounds:"
msgstr "Balas usadas:"
#: lib/cannery_web/components/add_shot_group_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Used up!"
msgstr "¡Acabada!"
#: lib/cannery_web/live/range_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds shot chart"
msgstr "Tabla de disparos"
#: lib/cannery_web/live/ammo_type_live/show.ex:154
#: lib/cannery_web/live/type_live/show.ex:154
#, elixir-autogen, elixir-format
msgid "Blank:"
msgstr "En blanco:"
#: lib/cannery_web/live/ammo_type_live/show.ex:132
#: lib/cannery_web/live/type_live/show.ex:132
#, elixir-autogen, elixir-format
msgid "Bullet core:"
msgstr "Núcleo de bala:"
#: lib/cannery_web/live/ammo_type_live/show.ex:131
#: lib/cannery_web/live/type_live/show.ex:131
#, elixir-autogen, elixir-format
msgid "Bullet type:"
msgstr "Tipo de bala:"
#: lib/cannery_web/live/ammo_type_live/show.ex:123
#: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format
msgid "Caliber:"
msgstr "Calibre:"
#: lib/cannery_web/live/ammo_type_live/show.ex:121
#: lib/cannery_web/live/type_live/show.ex:121
#, elixir-autogen, elixir-format
msgid "Cartridge:"
msgstr "Cartucho:"
#: lib/cannery_web/live/ammo_type_live/show.ex:134
#: lib/cannery_web/live/type_live/show.ex:134
#, elixir-autogen, elixir-format
msgid "Case material:"
msgstr "Material de la camisa:"
#: lib/cannery_web/live/ammo_type_live/show.ex:155
#: lib/cannery_web/live/type_live/show.ex:155
#, elixir-autogen, elixir-format
msgid "Corrosive:"
msgstr "Corrosiva:"
#: lib/cannery_web/live/ammo_type_live/show.ex:151
#: lib/cannery_web/live/type_live/show.ex:151
#, elixir-autogen, elixir-format
msgid "Firing type:"
msgstr "Tipo de fuego:"
#: lib/cannery_web/live/ammo_type_live/show.ex:130
#: lib/cannery_web/live/type_live/show.ex:130
#, elixir-autogen, elixir-format
msgid "Grains:"
msgstr "Granos:"
#: lib/cannery_web/live/ammo_type_live/show.ex:153
#: lib/cannery_web/live/type_live/show.ex:153
#, elixir-autogen, elixir-format
msgid "Incendiary:"
msgstr "Incendiarias:"
#: lib/cannery_web/live/ammo_type_live/show.ex:133
#: lib/cannery_web/live/type_live/show.ex:133
#, elixir-autogen, elixir-format
msgid "Jacket type:"
msgstr "Tipo de camisa:"
#: lib/cannery_web/live/ammo_type_live/show.ex:156
#: lib/cannery_web/live/type_live/show.ex:156
#, elixir-autogen, elixir-format
msgid "Manufacturer:"
msgstr "Fabricante:"
#: lib/cannery_web/live/ammo_type_live/show.ex:149
#: lib/cannery_web/live/type_live/show.ex:149
#, elixir-autogen, elixir-format
msgid "Muzzle velocity:"
msgstr "Velocidad de boca:"
#: lib/cannery_web/live/ammo_type_live/show.ex:143
#: lib/cannery_web/live/type_live/show.ex:143
#, elixir-autogen, elixir-format
msgid "Powder grains per charge:"
msgstr "Granos de polvora por carga:"
#: lib/cannery_web/live/ammo_type_live/show.ex:141
#: lib/cannery_web/live/type_live/show.ex:141
#, elixir-autogen, elixir-format
msgid "Powder type:"
msgstr "Tipo de polvora:"
#: lib/cannery_web/live/ammo_type_live/show.ex:147
#: lib/cannery_web/live/type_live/show.ex:147
#, elixir-autogen, elixir-format
msgid "Pressure:"
msgstr "Presión:"
#: lib/cannery_web/live/ammo_type_live/show.ex:150
#: lib/cannery_web/live/type_live/show.ex:150
#, elixir-autogen, elixir-format
msgid "Primer type:"
msgstr "Tipo de espoleta:"
#: lib/cannery_web/live/ammo_type_live/show.ex:152
#: lib/cannery_web/live/type_live/show.ex:152
#, elixir-autogen, elixir-format
msgid "Tracer:"
msgstr "Trazadora:"
#: lib/cannery_web/live/ammo_type_live/show.ex:157
#: lib/cannery_web/live/type_live/show.ex:157
#, elixir-autogen, elixir-format
msgid "UPC:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:102
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148
#: lib/cannery_web/components/type_table_component.ex:102
#: lib/cannery_web/live/type_live/show.html.heex:146
#, elixir-autogen, elixir-format
msgid "Average CPR"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:28
#: lib/cannery_web/live/ammo_type_live/show.ex:82
#, elixir-autogen, elixir-format
msgid "Edit %{ammo_type_name}"
msgstr "Editar %{ammo_type_name}"
#: lib/cannery_web/components/core_components/pack_card.html.heex:17
#: lib/cannery_web/components/pack_table_component.ex:250
#, elixir-autogen, elixir-format
@ -1054,13 +1021,7 @@ msgstr "Comprada en:"
msgid "Edit ammo"
msgstr "Editar munición"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
#: lib/cannery_web/live/ammo_type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Ammo types"
msgstr "Sin tipo de Munición"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:58
#: lib/cannery_web/live/type_live/index.html.heex:58
#, elixir-autogen, elixir-format
msgid "Search catalog"
msgstr ""
@ -1189,42 +1150,42 @@ msgstr ""
msgid "Password"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261
#: lib/cannery_web/live/type_live/form_component.html.heex:261
#, elixir-autogen, elixir-format
msgid "+P"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75
#: lib/cannery_web/live/type_live/form_component.html.heex:75
#, elixir-autogen, elixir-format
msgid ".223"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56
#: lib/cannery_web/live/type_live/form_component.html.heex:56
#, elixir-autogen, elixir-format
msgid "5.56x46mm NATO"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300
#: lib/cannery_web/live/type_live/form_component.html.heex:300
#, elixir-autogen, elixir-format
msgid "Boxer"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308
#: lib/cannery_web/live/type_live/form_component.html.heex:308
#, elixir-autogen, elixir-format
msgid "Centerfire"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:43
#: lib/cannery_web/components/add_shot_record_component.html.heex:43
#: lib/cannery_web/live/range_live/form_component.html.heex:35
#, elixir-autogen, elixir-format
msgid "Really great weather"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:100
#: lib/cannery_web/components/container_table_component.ex:67
#: lib/cannery_web/components/move_pack_component.ex:68
#: lib/cannery_web/components/pack_table_component.ex:59
#: lib/cannery_web/components/shot_group_table_component.ex:45
#: lib/cannery_web/components/shot_record_table_component.ex:48
#: lib/cannery_web/components/type_table_component.ex:100
#: lib/cannery_web/live/pack_live/show.ex:93
#, elixir-autogen, elixir-format
msgid "Actions"
@ -1251,76 +1212,76 @@ msgstr ""
msgid "Close modal"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:35
#: lib/cannery_web/live/container_live/show.html.heex:103
#: lib/cannery_web/live/pack_live/index.html.heex:58
#: lib/cannery_web/live/range_live/index.html.heex:92
#: lib/cannery_web/live/type_live/index.html.heex:35
#, elixir-autogen, elixir-format
msgid "All"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313
#: lib/cannery_web/live/type_live/form_component.html.heex:313
#, elixir-autogen, elixir-format
msgid "Attributes"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:56
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
#: lib/cannery_web/components/type_table_component.ex:56
#: lib/cannery_web/live/type_live/form_component.html.heex:89
#, elixir-autogen, elixir-format, fuzzy
msgid "Brass height"
msgstr "Latón"
#: lib/cannery_web/live/ammo_type_live/show.ex:128
#: lib/cannery_web/live/type_live/show.ex:128
#, elixir-autogen, elixir-format
msgid "Brass height:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:57
#: lib/cannery_web/components/ammo_type_table_component.ex:58
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96
#: lib/cannery_web/components/type_table_component.ex:57
#: lib/cannery_web/components/type_table_component.ex:58
#: lib/cannery_web/live/type_live/form_component.html.heex:96
#, elixir-autogen, elixir-format
msgid "Chamber size"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:129
#: lib/cannery_web/live/type_live/show.ex:129
#, elixir-autogen, elixir-format
msgid "Chamber size:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48
#: lib/cannery_web/live/type_live/form_component.html.heex:48
#, elixir-autogen, elixir-format
msgid "Dimensions"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266
#: lib/cannery_web/components/type_table_component.ex:81
#: lib/cannery_web/live/type_live/form_component.html.heex:266
#, elixir-autogen, elixir-format
msgid "Dram equivalent"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:148
#: lib/cannery_web/live/type_live/show.ex:148
#, elixir-autogen, elixir-format
msgid "Dram equivalent:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67
#: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/type_live/form_component.html.heex:67
#, elixir-autogen, elixir-format
msgid "Gauge"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123
#: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format
msgid "Gauge:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:72
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207
#: lib/cannery_web/components/type_table_component.ex:72
#: lib/cannery_web/live/type_live/form_component.html.heex:207
#, elixir-autogen, elixir-format
msgid "Load grains"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:139
#: lib/cannery_web/live/type_live/show.ex:139
#, elixir-autogen, elixir-format
msgid "Load grains:"
msgstr ""
@ -1330,140 +1291,175 @@ msgstr ""
msgid "No ammo"
msgstr "Sin Munición"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60
#: lib/cannery_web/live/type_live/show.html.heex:58
#, elixir-autogen, elixir-format
msgid "None specified"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:38
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
#: lib/cannery_web/live/container_live/show.html.heex:106
#: lib/cannery_web/live/pack_live/index.html.heex:61
#: lib/cannery_web/live/range_live/index.html.heex:95
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:38
#: lib/cannery_web/live/type_live/show.html.heex:56
#, elixir-autogen, elixir-format
msgid "Pistol"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233
#: lib/cannery_web/live/type_live/form_component.html.heex:233
#, elixir-autogen, elixir-format, fuzzy
msgid "Powder"
msgstr "Tipo de polvora"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293
#: lib/cannery_web/live/type_live/form_component.html.heex:293
#, elixir-autogen, elixir-format, fuzzy
msgid "Primer"
msgstr "Tipo de espoleta"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109
#: lib/cannery_web/live/type_live/form_component.html.heex:109
#, elixir-autogen, elixir-format
msgid "Projectile"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:36
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
#: lib/cannery_web/live/container_live/show.html.heex:104
#: lib/cannery_web/live/pack_live/index.html.heex:59
#: lib/cannery_web/live/range_live/index.html.heex:93
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:36
#: lib/cannery_web/live/type_live/show.html.heex:54
#, elixir-autogen, elixir-format
msgid "Rifle"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:73
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215
#: lib/cannery_web/components/type_table_component.ex:73
#: lib/cannery_web/live/type_live/form_component.html.heex:215
#, elixir-autogen, elixir-format
msgid "Shot charge weight"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:140
#: lib/cannery_web/live/type_live/show.ex:140
#, elixir-autogen, elixir-format
msgid "Shot charge weight:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:70
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191
#: lib/cannery_web/components/type_table_component.ex:70
#: lib/cannery_web/live/type_live/form_component.html.heex:191
#, elixir-autogen, elixir-format
msgid "Shot material"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:137
#: lib/cannery_web/live/type_live/show.ex:137
#, elixir-autogen, elixir-format
msgid "Shot material:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:71
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200
#: lib/cannery_web/components/type_table_component.ex:71
#: lib/cannery_web/live/type_live/form_component.html.heex:200
#, elixir-autogen, elixir-format, fuzzy
msgid "Shot size"
msgstr "Tiros disparados"
#: lib/cannery_web/live/ammo_type_live/show.ex:138
#: lib/cannery_web/live/type_live/show.ex:138
#, elixir-autogen, elixir-format, fuzzy
msgid "Shot size:"
msgstr "Tiros disparados"
#: lib/cannery_web/components/ammo_type_table_component.ex:69
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183
#: lib/cannery_web/components/type_table_component.ex:69
#: lib/cannery_web/live/type_live/form_component.html.heex:183
#, elixir-autogen, elixir-format
msgid "Shot type"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:136
#: lib/cannery_web/live/type_live/show.ex:136
#, elixir-autogen, elixir-format
msgid "Shot type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
#: lib/cannery_web/live/container_live/show.html.heex:105
#: lib/cannery_web/live/pack_live/index.html.heex:60
#: lib/cannery_web/live/range_live/index.html.heex:94
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:37
#: lib/cannery_web/live/type_live/show.html.heex:52
#, elixir-autogen, elixir-format
msgid "Shotgun"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143
#: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/type_live/form_component.html.heex:143
#, elixir-autogen, elixir-format
msgid "Slug core"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187
#: lib/cannery_web/live/type_live/form_component.html.heex:187
#, elixir-autogen, elixir-format
msgid "Target, bird, buck, etc"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:127
#: lib/cannery_web/live/type_live/show.ex:127
#, elixir-autogen, elixir-format
msgid "Unfired length:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:55
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80
#: lib/cannery_web/components/type_table_component.ex:55
#: lib/cannery_web/live/type_live/form_component.html.heex:80
#, elixir-autogen, elixir-format
msgid "Unfired shell length"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:68
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176
#: lib/cannery_web/components/type_table_component.ex:68
#: lib/cannery_web/live/type_live/form_component.html.heex:176
#, elixir-autogen, elixir-format
msgid "Wadding"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:135
#: lib/cannery_web/live/type_live/show.ex:135
#, elixir-autogen, elixir-format
msgid "Wadding:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:150
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:21
#: lib/cannery_web/live/ammo_type_live/index.html.heex:29
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
#: lib/cannery_web/components/type_table_component.ex:150
#: lib/cannery_web/live/container_live/show.html.heex:97
#: lib/cannery_web/live/pack_live/index.html.heex:50
#: lib/cannery_web/live/range_live/index.html.heex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/index.html.heex:29
#: lib/cannery_web/live/type_live/show.html.heex:46
#, elixir-autogen, elixir-format
msgid "Class"
msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:22
#: lib/cannery_web/components/add_shot_record_component.html.heex:26
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds left"
msgstr "Balas"
#: lib/cannery_web/components/add_shot_record_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit Shot Record"
msgstr "Editar Tiros Récord"
#: lib/cannery_web/live/type_live/index.ex:28
#: lib/cannery_web/live/type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr "Editar %{ammo_type_name}"
#: lib/cannery_web/live/type_live/index.ex:36
#: lib/cannery_web/live/type_live/index.ex:44
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr "Nuevo tipo de Munición"
#: lib/cannery_web/live/type_live/index.html.heex:8
#: lib/cannery_web/live/type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Types"
msgstr "Tipo"

View File

@ -69,7 +69,7 @@ msgstr "Correo o contraseña incorrecta"
msgid "Not found"
msgstr "No se encontró"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18
#: lib/cannery_web/live/type_live/form_component.html.heex:18
#: lib/cannery_web/templates/user_registration/new.html.heex:13
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:13
#: lib/cannery_web/templates/user_settings/edit.html.heex:22
@ -171,42 +171,42 @@ msgstr "No se ha podido procesar el número de copias"
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
msgstr "Número inválido de copias, debe ser entre 1 y %{max}. Fue %{multiplier"
#: lib/cannery/ammo.ex:1123
#: lib/cannery/ammo.ex:1121
#, elixir-autogen, elixir-format
msgid "Invalid multiplier"
msgstr "Multiplicador inválido"
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr "Por favor escoja un tipo de munición y un contenedor"
#: lib/cannery_web/live/range_live/index.html.heex:74
#, elixir-autogen, elixir-format
msgid "Your browser does not support the canvas element."
msgstr "Su navegador no es compatible con el elemento lienzo."
#: lib/cannery/activity_log/shot_group.ex:74
#: lib/cannery/activity_log/shot_record.ex:74
#, elixir-autogen, elixir-format
msgid "Please select a valid user and ammo pack"
msgstr "Por favor escoja un usuario y tipo de munición valido"
#: lib/cannery/activity_log/shot_group.ex:88
#: lib/cannery/activity_log/shot_record.ex:88
#, elixir-autogen, elixir-format
msgid "Ammo left can be at most %{count} rounds"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:84
#: lib/cannery/activity_log/shot_record.ex:84
#, elixir-autogen, elixir-format
msgid "Ammo left must be at least 0"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:119
#: lib/cannery/activity_log/shot_record.ex:119
#, elixir-autogen, elixir-format, fuzzy
msgid "Count can be at most %{count} shots"
msgstr "El recuento debe ser menos de %{count}"
#: lib/cannery/activity_log/shot_group.ex:80
#: lib/cannery/activity_log/shot_record.ex:80
#, elixir-autogen, elixir-format
msgid "can't be blank"
msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format, fuzzy
msgid "Please select a type and container"
msgstr "Por favor escoja un tipo de munición y un contenedor"

View File

@ -23,17 +23,17 @@ msgstr ""
## Run "mix gettext.extract" to bring this file up to
## date. Leave "msgstr"s empty as changing them here has no
## effect: edit them in PO (.po) files instead.
#: lib/cannery_web/live/ammo_type_live/form_component.ex:89
#: lib/cannery_web/live/container_live/form_component.ex:89
#: lib/cannery_web/live/invite_live/form_component.ex:80
#: lib/cannery_web/live/tag_live/form_component.ex:78
#: lib/cannery_web/live/type_live/form_component.ex:88
#, elixir-autogen, elixir-format
msgid "%{name} created successfully"
msgstr "%{name} creado exitosamente"
#: lib/cannery_web/live/ammo_type_live/index.ex:72
#: lib/cannery_web/live/ammo_type_live/show.ex:27
#: lib/cannery_web/live/tag_live/index.ex:65
#: lib/cannery_web/live/type_live/index.ex:72
#: lib/cannery_web/live/type_live/show.ex:27
#, elixir-autogen, elixir-format
msgid "%{name} deleted succesfully"
msgstr "%{name} borrado exitosamente"
@ -44,10 +44,10 @@ msgstr "%{name} borrado exitosamente"
msgid "%{name} has been deleted"
msgstr "%{name} ha sido borrado"
#: lib/cannery_web/live/ammo_type_live/form_component.ex:70
#: lib/cannery_web/live/container_live/form_component.ex:70
#: lib/cannery_web/live/invite_live/form_component.ex:62
#: lib/cannery_web/live/tag_live/form_component.ex:60
#: lib/cannery_web/live/type_live/form_component.ex:69
#, elixir-autogen, elixir-format
msgid "%{name} updated successfully"
msgstr "%{name} actualizado exitosamente"
@ -128,13 +128,13 @@ msgstr "Contraseña cambiada exitosamente."
msgid "Please check your email to verify your account"
msgstr "Por favor chequea el correo para verificar tu cuenta"
#: lib/cannery_web/components/add_shot_group_component.html.heex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:351
#: lib/cannery_web/components/add_shot_record_component.html.heex:59
#: lib/cannery_web/live/container_live/form_component.html.heex:59
#: lib/cannery_web/live/invite_live/form_component.html.heex:37
#: lib/cannery_web/live/pack_live/form_component.html.heex:85
#: lib/cannery_web/live/range_live/form_component.html.heex:47
#: lib/cannery_web/live/tag_live/form_component.html.heex:39
#: lib/cannery_web/live/type_live/form_component.html.heex:351
#, elixir-autogen, elixir-format
msgid "Saving..."
msgstr "Guardando..."
@ -165,7 +165,7 @@ msgstr "se ha removido %{tag_name} de %{container_name}"
msgid "Adding..."
msgstr "Añadiendo..."
#: lib/cannery_web/components/add_shot_group_component.ex:60
#: lib/cannery_web/components/add_shot_record_component.ex:60
#, elixir-autogen, elixir-format
msgid "Shots recorded successfully"
msgstr "Tiros registrados exitosamente"
@ -256,8 +256,8 @@ msgid_plural "Ammo added successfully"
msgstr[0] "Munición añadida exitosamente"
msgstr[1] "Municiones añadidas exitosamente"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
#: lib/cannery_web/live/type_live/index.html.heex:116
#: lib/cannery_web/live/type_live/show.html.heex:29
#, elixir-autogen, elixir-format
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
msgstr ""

View File

@ -40,7 +40,7 @@ msgstr "Ajoutez votre première caisse !"
msgid "Add your first container!"
msgstr "Ajoutez votre premier conteneur!"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13
#: lib/cannery_web/live/type_live/index.html.heex:13
#, elixir-autogen, elixir-format
msgid "Add your first type!"
msgstr "Ajoutez votre premier type!"
@ -95,11 +95,6 @@ msgstr "Se connecter"
msgid "Make your first tag!"
msgstr "Faîtes votre premier tag!"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr "Nouveau type de munition"
#: lib/cannery_web/live/container_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Container"
@ -133,13 +128,13 @@ msgstr "Renvoyer les instructions de confirmation"
msgid "Reset password"
msgstr "Réinitialisé le mot de passe"
#: lib/cannery_web/components/add_shot_group_component.html.heex:57
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:350
#: lib/cannery_web/components/add_shot_record_component.html.heex:57
#: lib/cannery_web/live/container_live/form_component.html.heex:57
#: lib/cannery_web/live/invite_live/form_component.html.heex:35
#: lib/cannery_web/live/pack_live/form_component.html.heex:84
#: lib/cannery_web/live/range_live/form_component.html.heex:45
#: lib/cannery_web/live/tag_live/form_component.html.heex:37
#: lib/cannery_web/live/type_live/form_component.html.heex:350
#, elixir-autogen, elixir-format
msgid "Save"
msgstr "Sauvegarder"
@ -216,11 +211,6 @@ msgstr "Changer la langue"
msgid "View in Catalog"
msgstr "Voir en catalogue"
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "add an ammo type first"
msgstr "Ajoutez d'abord un type de munitions"
#: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:89
@ -250,11 +240,6 @@ msgstr ""
msgid "Export Data as JSON"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:110
#, elixir-autogen, elixir-format
msgid "Clone %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:87
#: lib/cannery_web/live/container_live/index.html.heex:145
#, elixir-autogen, elixir-format
@ -266,12 +251,6 @@ msgstr ""
msgid "Copy invite link for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:129
#: lib/cannery_web/live/ammo_type_live/show.html.heex:36
#, elixir-autogen, elixir-format
msgid "Delete %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:104
#: lib/cannery_web/live/container_live/index.html.heex:162
#: lib/cannery_web/live/container_live/show.html.heex:48
@ -289,18 +268,6 @@ msgstr ""
msgid "Delete invite for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format
msgid "Delete shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:100
#: lib/cannery_web/live/ammo_type_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:77
#: lib/cannery_web/live/container_live/index.html.heex:135
#: lib/cannery_web/live/container_live/show.html.heex:35
@ -318,16 +285,6 @@ msgstr ""
msgid "Edit invite for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#, elixir-autogen, elixir-format
msgid "Edit shot group of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format
msgid "Edit shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:120
#, elixir-autogen, elixir-format, fuzzy
msgid "Stage"
@ -344,11 +301,6 @@ msgstr ""
msgid "Unstage"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
#, elixir-autogen, elixir-format
msgid "View %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format, fuzzy
msgid "Clone pack of %{pack_count} bullets"
@ -366,8 +318,52 @@ msgstr ""
msgid "Edit pack of %{pack_count} bullets"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154
#: lib/cannery_web/live/type_live/show.html.heex:204
#, elixir-autogen, elixir-format, fuzzy
msgid "View pack of %{pack_count} bullets"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:105
#, elixir-autogen, elixir-format, fuzzy
msgid "Clone %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:35
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:97
#: lib/cannery_web/live/type_live/show.html.heex:19
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:17
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr "Nouveau type de munition"
#: lib/cannery_web/live/type_live/index.html.heex:89
#, elixir-autogen, elixir-format, fuzzy
msgid "View %{type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format, fuzzy
msgid "add a type first"
msgstr "Ajoutez d'abord un type de munitions"

View File

@ -30,7 +30,7 @@ msgid "Admins:"
msgstr "Administrateur·ices:"
#: lib/cannery_web/components/core_components/topbar.html.heex:58
#: lib/cannery_web/components/shot_group_table_component.ex:41
#: lib/cannery_web/components/shot_record_table_component.ex:44
#: lib/cannery_web/live/pack_live/index.ex:75
#: lib/cannery_web/live/pack_live/index.ex:84
#: lib/cannery_web/live/pack_live/index.html.heex:3
@ -38,54 +38,48 @@ msgstr "Administrateur·ices:"
msgid "Ammo"
msgstr "Munition"
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Ammo type"
msgstr "Type de munition"
#: lib/cannery_web/live/tag_live/form_component.html.heex:25
#, elixir-autogen, elixir-format
msgid "Background color"
msgstr "Couleur de fond"
#: lib/cannery_web/components/ammo_type_table_component.ex:87
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324
#: lib/cannery_web/components/type_table_component.ex:87
#: lib/cannery_web/live/type_live/form_component.html.heex:324
#, elixir-autogen, elixir-format
msgid "Blank"
msgstr "Vide"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171
#: lib/cannery_web/live/type_live/form_component.html.heex:171
#, elixir-autogen, elixir-format
msgid "Brass"
msgstr "Cuivre"
#: lib/cannery_web/components/ammo_type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
#: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/type_live/form_component.html.heex:144
#, elixir-autogen, elixir-format
msgid "Bullet core"
msgstr "Noyau de balle"
#: lib/cannery_web/components/ammo_type_table_component.ex:60
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
#: lib/cannery_web/components/type_table_component.ex:60
#: lib/cannery_web/live/type_live/form_component.html.heex:121
#, elixir-autogen, elixir-format
msgid "Bullet type"
msgstr "Type de balle"
#: lib/cannery_web/components/ammo_type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68
#: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/type_live/form_component.html.heex:68
#, elixir-autogen, elixir-format
msgid "Caliber"
msgstr "Calibre"
#: lib/cannery_web/components/ammo_type_table_component.ex:49
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52
#: lib/cannery_web/components/type_table_component.ex:49
#: lib/cannery_web/live/type_live/form_component.html.heex:52
#, elixir-autogen, elixir-format
msgid "Cartridge"
msgstr "Cartouche"
#: lib/cannery_web/components/ammo_type_table_component.ex:67
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167
#: lib/cannery_web/components/type_table_component.ex:67
#: lib/cannery_web/live/type_live/form_component.html.heex:167
#, elixir-autogen, elixir-format
msgid "Case material"
msgstr "Matériau de la caisse"
@ -105,8 +99,8 @@ msgstr "Conteneur"
msgid "Containers"
msgstr "Conteneurs"
#: lib/cannery_web/components/ammo_type_table_component.ex:88
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328
#: lib/cannery_web/components/type_table_component.ex:88
#: lib/cannery_web/live/type_live/form_component.html.heex:328
#, elixir-autogen, elixir-format
msgid "Corrosive"
msgstr "Corrosive"
@ -124,8 +118,8 @@ msgid "Count:"
msgstr "Quantité:"
#: lib/cannery_web/components/container_table_component.ex:46
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:38
#: lib/cannery_web/live/container_live/form_component.html.heex:29
#: lib/cannery_web/live/type_live/form_component.html.heex:38
#, elixir-autogen, elixir-format
msgid "Description"
msgstr "Description"
@ -151,19 +145,19 @@ msgstr "Modifier linvitation"
msgid "Edit Tag"
msgstr "Modifier le tag"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135
#: lib/cannery_web/live/type_live/form_component.html.heex:135
#, elixir-autogen, elixir-format
msgid "FMJ"
msgstr "FMJ"
#: lib/cannery_web/components/ammo_type_table_component.ex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112
#: lib/cannery_web/components/type_table_component.ex:59
#: lib/cannery_web/live/type_live/form_component.html.heex:112
#, elixir-autogen, elixir-format
msgid "Grains"
msgstr "Graines"
#: lib/cannery_web/components/ammo_type_table_component.ex:86
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320
#: lib/cannery_web/components/type_table_component.ex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:320
#, elixir-autogen, elixir-format
msgid "Incendiary"
msgstr "Incendiaire"
@ -213,9 +207,9 @@ msgstr "Localisation:"
msgid "Magazine, Clip, Ammo Box, etc"
msgstr "Chargeur, lame-chargeur, boite de munition, etc."
#: lib/cannery_web/components/ammo_type_table_component.ex:89
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336
#: lib/cannery_web/components/type_table_component.ex:89
#: lib/cannery_web/live/type_live/form_component.html.heex:333
#: lib/cannery_web/live/type_live/form_component.html.heex:336
#, elixir-autogen, elixir-format
msgid "Manufacturer"
msgstr "Fabricant"
@ -230,22 +224,16 @@ msgstr "Boite de munition avec le sticker de fille danimation"
msgid "My cool ammo can"
msgstr "Ma superbe boite de munition"
#: lib/cannery_web/components/ammo_type_table_component.ex:153
#: lib/cannery_web/components/container_table_component.ex:45
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31
#: lib/cannery_web/components/type_table_component.ex:153
#: lib/cannery_web/live/container_live/form_component.html.heex:21
#: lib/cannery_web/live/invite_live/form_component.html.heex:21
#: lib/cannery_web/live/tag_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/form_component.html.heex:31
#, elixir-autogen, elixir-format
msgid "Name"
msgstr "Nom"
#: lib/cannery_web/live/ammo_type_live/index.ex:36
#: lib/cannery_web/live/ammo_type_live/index.ex:44
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr "Nouveau type de munition"
#: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/index.ex:39
#, elixir-autogen, elixir-format
@ -267,7 +255,7 @@ msgstr "Nouveau tag"
msgid "No Ammo"
msgstr "Aucune munition"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180
#: lib/cannery_web/live/type_live/show.html.heex:178
#, elixir-autogen, elixir-format
msgid "No ammo for this type"
msgstr "Aucune munition pour ce type"
@ -290,8 +278,8 @@ msgstr "Aucune invitation"
msgid "No tags"
msgstr "Aucun tag"
#: lib/cannery_web/components/add_shot_group_component.html.heex:38
#: lib/cannery_web/components/shot_group_table_component.ex:43
#: lib/cannery_web/components/add_shot_record_component.html.heex:38
#: lib/cannery_web/components/shot_record_table_component.ex:46
#: lib/cannery_web/live/pack_live/form_component.html.heex:50
#: lib/cannery_web/live/pack_live/show.ex:91
#: lib/cannery_web/live/range_live/form_component.html.heex:30
@ -310,8 +298,8 @@ msgstr "Notes:"
msgid "On the bookshelf"
msgstr "Sur létagère"
#: lib/cannery_web/components/ammo_type_table_component.ex:80
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257
#: lib/cannery_web/components/type_table_component.ex:80
#: lib/cannery_web/live/type_live/form_component.html.heex:257
#, elixir-autogen, elixir-format
msgid "Pressure"
msgstr "Pression"
@ -327,8 +315,8 @@ msgstr "Prix payé"
msgid "Price paid:"
msgstr "Prix payé:"
#: lib/cannery_web/components/ammo_type_table_component.ex:83
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296
#: lib/cannery_web/components/type_table_component.ex:83
#: lib/cannery_web/live/type_live/form_component.html.heex:296
#, elixir-autogen, elixir-format
msgid "Primer type"
msgstr "Type damorce"
@ -361,7 +349,7 @@ msgstr "Paramètres"
msgid "Simple:"
msgstr "Simple:"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151
#: lib/cannery_web/live/type_live/form_component.html.heex:151
#, elixir-autogen, elixir-format
msgid "Steel"
msgstr "Acier"
@ -397,15 +385,17 @@ msgstr "Couleur du texte"
msgid "The self-hosted firearm tracker website"
msgstr "Le site web de suivi darme à feux auto-hébergé"
#: lib/cannery_web/components/ammo_type_table_component.ex:85
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316
#: lib/cannery_web/components/type_table_component.ex:85
#: lib/cannery_web/live/type_live/form_component.html.heex:316
#, elixir-autogen, elixir-format
msgid "Tracer"
msgstr "Traceuse"
#: lib/cannery_web/components/container_table_component.ex:48
#: lib/cannery_web/components/move_pack_component.ex:66
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/container_live/form_component.html.heex:39
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Type"
msgstr "Type"
@ -447,8 +437,8 @@ msgstr "Portée"
msgid "Range day"
msgstr "Journée de stand"
#: lib/cannery_web/components/add_shot_group_component.html.heex:49
#: lib/cannery_web/components/shot_group_table_component.ex:44
#: lib/cannery_web/components/add_shot_record_component.html.heex:49
#: lib/cannery_web/components/shot_record_table_component.ex:47
#: lib/cannery_web/live/pack_live/show.ex:92
#: lib/cannery_web/live/range_live/form_component.html.heex:41
#, elixir-autogen, elixir-format
@ -465,18 +455,12 @@ msgstr "Tirs réalisés"
msgid "No ammo staged"
msgstr "Aucune munition sélectionnée"
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
#: lib/cannery_web/components/add_shot_record_component.html.heex:3
#: lib/cannery_web/live/pack_live/index.ex:35
#, elixir-autogen, elixir-format
msgid "Record shots"
msgstr "Tirs enregistrés"
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format
msgid "Edit Shot Records"
msgstr "Modifier les enregistrements de tir"
#: lib/cannery_web/live/range_live/index.ex:48
#, elixir-autogen, elixir-format
msgid "New Shot Records"
@ -488,13 +472,7 @@ msgstr "Nouveaux enregistrements de tir"
msgid "No shots recorded"
msgstr "Aucun tir enregistré"
#: lib/cannery_web/components/add_shot_group_component.html.heex:22
#: lib/cannery_web/components/add_shot_group_component.html.heex:26
#, elixir-autogen, elixir-format
msgid "Rounds left"
msgstr "Cartouches restantes"
#: lib/cannery_web/components/shot_group_table_component.ex:42
#: lib/cannery_web/components/shot_record_table_component.ex:45
#: lib/cannery_web/live/pack_live/show.ex:90
#: lib/cannery_web/live/range_live/index.html.heex:69
#, elixir-autogen, elixir-format
@ -522,48 +500,48 @@ msgstr "Aucun autre conteneur"
msgid "Shot log"
msgstr "Évènements de tir"
#: lib/cannery_web/components/ammo_type_table_component.ex:261
#: lib/cannery_web/components/core_components/pack_card.html.heex:42
#: lib/cannery_web/components/core_components/pack_card.html.heex:47
#: lib/cannery_web/components/pack_table_component.ex:163
#: lib/cannery_web/components/pack_table_component.ex:246
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
#: lib/cannery_web/components/type_table_component.ex:261
#: lib/cannery_web/live/pack_live/show.html.heex:37
#: lib/cannery_web/live/pack_live/show.html.heex:42
#: lib/cannery_web/live/type_live/show.html.heex:150
#, elixir-autogen, elixir-format
msgid "$%{amount}"
msgstr "%{amount}$"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160
#: lib/cannery_web/live/type_live/form_component.html.heex:160
#, elixir-autogen, elixir-format
msgid "Bimetal"
msgstr "Bi-métal"
#: lib/cannery_web/components/ammo_type_table_component.ex:66
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
#: lib/cannery_web/components/type_table_component.ex:66
#: lib/cannery_web/live/type_live/form_component.html.heex:156
#, elixir-autogen, elixir-format
msgid "Jacket type"
msgstr "Type de douille"
#: lib/cannery_web/components/ammo_type_table_component.ex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279
#: lib/cannery_web/components/type_table_component.ex:82
#: lib/cannery_web/live/type_live/form_component.html.heex:279
#, elixir-autogen, elixir-format
msgid "Muzzle velocity"
msgstr "Vélocité du canon"
#: lib/cannery_web/components/ammo_type_table_component.ex:76
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244
#: lib/cannery_web/components/type_table_component.ex:76
#: lib/cannery_web/live/type_live/form_component.html.heex:244
#, elixir-autogen, elixir-format
msgid "Powder grains per charge"
msgstr "Graines de poudre par charge"
#: lib/cannery_web/components/ammo_type_table_component.ex:74
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236
#: lib/cannery_web/components/type_table_component.ex:74
#: lib/cannery_web/live/type_live/form_component.html.heex:236
#, elixir-autogen, elixir-format
msgid "Powder type"
msgstr "Type de poudre"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343
#: lib/cannery_web/live/type_live/form_component.html.heex:343
#, elixir-autogen, elixir-format
msgid "UPC"
msgstr "UPC"
@ -586,8 +564,8 @@ msgstr "Mot de passe actuel"
msgid "New password"
msgstr "Nouveau mot de passe"
#: lib/cannery_web/components/ammo_type_table_component.ex:84
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304
#: lib/cannery_web/components/type_table_component.ex:84
#: lib/cannery_web/live/type_live/form_component.html.heex:304
#, elixir-autogen, elixir-format
msgid "Firing type"
msgstr "Type dallumage"
@ -610,16 +588,16 @@ msgid "Edit %{name} tags"
msgstr "Éditer les tags de %{name}"
#: lib/cannery_web/components/core_components/container_card.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:87
#: lib/cannery_web/live/container_live/show.html.heex:27
#: lib/cannery_web/live/type_live/show.html.heex:85
#, elixir-autogen, elixir-format
msgid "Rounds:"
msgstr "Cartouches:"
#: lib/cannery_web/components/ammo_type_table_component.ex:260
#: lib/cannery_web/components/pack_table_component.ex:160
#: lib/cannery_web/components/pack_table_component.ex:242
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156
#: lib/cannery_web/components/type_table_component.ex:260
#: lib/cannery_web/live/type_live/show.html.heex:154
#, elixir-autogen, elixir-format
msgid "No cost information"
msgstr "Aucune information de prix"
@ -690,7 +668,7 @@ msgstr "Enregistrer des tirs"
msgid "Copies"
msgstr "Exemplaires"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139
#: lib/cannery_web/live/type_live/show.html.heex:137
#, elixir-autogen, elixir-format
msgid "Added on:"
msgstr "Ajouté le:"
@ -737,9 +715,9 @@ msgid "View the source code"
msgstr "Voir le code source"
#: lib/cannery_web/components/core_components/topbar.html.heex:50
#: lib/cannery_web/live/ammo_type_live/index.ex:52
#: lib/cannery_web/live/ammo_type_live/index.ex:62
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
#: lib/cannery_web/live/type_live/index.ex:52
#: lib/cannery_web/live/type_live/index.ex:62
#: lib/cannery_web/live/type_live/index.html.heex:3
#, elixir-autogen, elixir-format
msgid "Catalog"
msgstr "Catalogue"
@ -770,8 +748,8 @@ msgid "This ammo is not in a container"
msgstr "Ce groupe de munition nest pas dans un conteneur"
#: lib/cannery_web/components/core_components/container_card.html.heex:32
#: lib/cannery_web/live/ammo_type_live/show.html.heex:113
#: lib/cannery_web/live/container_live/show.html.heex:22
#: lib/cannery_web/live/type_live/show.html.heex:111
#, elixir-autogen, elixir-format
msgid "Packs:"
msgstr "Packages:"
@ -798,9 +776,9 @@ msgstr ""
msgid "Container:"
msgstr "Conteneur"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:64
#: lib/cannery_web/live/ammo_type_live/show.html.heex:166
#: lib/cannery_web/live/pack_live/index.html.heex:87
#: lib/cannery_web/live/type_live/index.html.heex:64
#: lib/cannery_web/live/type_live/show.html.heex:164
#, elixir-autogen, elixir-format
msgid "Show used"
msgstr ""
@ -816,182 +794,171 @@ msgstr ""
msgid "Rounds shot: %{count}"
msgstr "Cartouches tirées"
#: lib/cannery_web/components/ammo_type_table_component.ex:123
#: lib/cannery_web/components/container_table_component.ex:64
#: lib/cannery_web/components/type_table_component.ex:123
#, elixir-autogen, elixir-format, fuzzy
msgid "Packs"
msgstr "Packages:"
#: lib/cannery_web/components/ammo_type_table_component.ex:144
#: lib/cannery_web/components/container_table_component.ex:65
#: lib/cannery_web/components/type_table_component.ex:144
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds"
msgstr "Cartouches:"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:172
#: lib/cannery_web/live/container_live/index.html.heex:40
#: lib/cannery_web/live/container_live/show.html.heex:115
#: lib/cannery_web/live/type_live/show.html.heex:170
#, elixir-autogen, elixir-format
msgid "View as table"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:108
#: lib/cannery_web/components/type_table_component.ex:108
#, elixir-autogen, elixir-format
msgid "Total ever packs"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130
#: lib/cannery_web/live/type_live/show.html.heex:128
#, elixir-autogen, elixir-format
msgid "Total ever packs:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:129
#: lib/cannery_web/components/type_table_component.ex:129
#, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds"
msgstr "Quantité de cartouches"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
#: lib/cannery_web/live/type_live/show.html.heex:102
#, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds:"
msgstr "Nombre totale de cartouches tirées:"
#: lib/cannery_web/components/ammo_type_table_component.ex:116
#: lib/cannery_web/components/type_table_component.ex:116
#, elixir-autogen, elixir-format
msgid "Used packs"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:120
#, elixir-autogen, elixir-format
msgid "Used packs:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:137
#: lib/cannery_web/components/type_table_component.ex:137
#, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96
#: lib/cannery_web/live/type_live/show.html.heex:94
#, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds:"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:34
#, elixir-autogen, elixir-format, fuzzy
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds shot chart"
msgstr "Cartouches tirées"
#: lib/cannery_web/live/ammo_type_live/show.ex:154
#: lib/cannery_web/live/type_live/show.ex:154
#, elixir-autogen, elixir-format, fuzzy
msgid "Blank:"
msgstr "Vide"
#: lib/cannery_web/live/ammo_type_live/show.ex:132
#: lib/cannery_web/live/type_live/show.ex:132
#, elixir-autogen, elixir-format, fuzzy
msgid "Bullet core:"
msgstr "Noyau de balle"
#: lib/cannery_web/live/ammo_type_live/show.ex:131
#: lib/cannery_web/live/type_live/show.ex:131
#, elixir-autogen, elixir-format, fuzzy
msgid "Bullet type:"
msgstr "Type de balle"
#: lib/cannery_web/live/ammo_type_live/show.ex:123
#: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format, fuzzy
msgid "Caliber:"
msgstr "Calibre"
#: lib/cannery_web/live/ammo_type_live/show.ex:121
#: lib/cannery_web/live/type_live/show.ex:121
#, elixir-autogen, elixir-format, fuzzy
msgid "Cartridge:"
msgstr "Cartouche"
#: lib/cannery_web/live/ammo_type_live/show.ex:134
#: lib/cannery_web/live/type_live/show.ex:134
#, elixir-autogen, elixir-format, fuzzy
msgid "Case material:"
msgstr "Matériau de la caisse"
#: lib/cannery_web/live/ammo_type_live/show.ex:155
#: lib/cannery_web/live/type_live/show.ex:155
#, elixir-autogen, elixir-format, fuzzy
msgid "Corrosive:"
msgstr "Corrosive"
#: lib/cannery_web/live/ammo_type_live/show.ex:151
#: lib/cannery_web/live/type_live/show.ex:151
#, elixir-autogen, elixir-format, fuzzy
msgid "Firing type:"
msgstr "Type dallumage"
#: lib/cannery_web/live/ammo_type_live/show.ex:130
#: lib/cannery_web/live/type_live/show.ex:130
#, elixir-autogen, elixir-format, fuzzy
msgid "Grains:"
msgstr "Graines"
#: lib/cannery_web/live/ammo_type_live/show.ex:153
#: lib/cannery_web/live/type_live/show.ex:153
#, elixir-autogen, elixir-format, fuzzy
msgid "Incendiary:"
msgstr "Incendiaire"
#: lib/cannery_web/live/ammo_type_live/show.ex:133
#: lib/cannery_web/live/type_live/show.ex:133
#, elixir-autogen, elixir-format, fuzzy
msgid "Jacket type:"
msgstr "Type de douille"
#: lib/cannery_web/live/ammo_type_live/show.ex:156
#: lib/cannery_web/live/type_live/show.ex:156
#, elixir-autogen, elixir-format, fuzzy
msgid "Manufacturer:"
msgstr "Fabricant"
#: lib/cannery_web/live/ammo_type_live/show.ex:149
#: lib/cannery_web/live/type_live/show.ex:149
#, elixir-autogen, elixir-format, fuzzy
msgid "Muzzle velocity:"
msgstr "Vélocité du canon"
#: lib/cannery_web/live/ammo_type_live/show.ex:143
#: lib/cannery_web/live/type_live/show.ex:143
#, elixir-autogen, elixir-format, fuzzy
msgid "Powder grains per charge:"
msgstr "Graines de poudre par charge"
#: lib/cannery_web/live/ammo_type_live/show.ex:141
#: lib/cannery_web/live/type_live/show.ex:141
#, elixir-autogen, elixir-format, fuzzy
msgid "Powder type:"
msgstr "Type de poudre"
#: lib/cannery_web/live/ammo_type_live/show.ex:147
#: lib/cannery_web/live/type_live/show.ex:147
#, elixir-autogen, elixir-format, fuzzy
msgid "Pressure:"
msgstr "Pression"
#: lib/cannery_web/live/ammo_type_live/show.ex:150
#: lib/cannery_web/live/type_live/show.ex:150
#, elixir-autogen, elixir-format, fuzzy
msgid "Primer type:"
msgstr "Type damorce"
#: lib/cannery_web/live/ammo_type_live/show.ex:152
#: lib/cannery_web/live/type_live/show.ex:152
#, elixir-autogen, elixir-format, fuzzy
msgid "Tracer:"
msgstr "Traceuse"
#: lib/cannery_web/live/ammo_type_live/show.ex:157
#: lib/cannery_web/live/type_live/show.ex:157
#, elixir-autogen, elixir-format, fuzzy
msgid "UPC:"
msgstr "UPC"
#: lib/cannery_web/components/ammo_type_table_component.ex:102
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148
#: lib/cannery_web/components/type_table_component.ex:102
#: lib/cannery_web/live/type_live/show.html.heex:146
#, elixir-autogen, elixir-format
msgid "Average CPR"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:28
#: lib/cannery_web/live/ammo_type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{ammo_type_name}"
msgstr "Éditer %{name}"
#: lib/cannery_web/components/core_components/pack_card.html.heex:17
#: lib/cannery_web/components/pack_table_component.ex:250
#, elixir-autogen, elixir-format
@ -1055,13 +1022,7 @@ msgstr ""
msgid "Edit ammo"
msgstr "Éditer le type de munition"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
#: lib/cannery_web/live/ammo_type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Ammo types"
msgstr "Aucun type de munition"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:58
#: lib/cannery_web/live/type_live/index.html.heex:58
#, elixir-autogen, elixir-format
msgid "Search catalog"
msgstr ""
@ -1190,42 +1151,42 @@ msgstr ""
msgid "Password"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261
#: lib/cannery_web/live/type_live/form_component.html.heex:261
#, elixir-autogen, elixir-format
msgid "+P"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75
#: lib/cannery_web/live/type_live/form_component.html.heex:75
#, elixir-autogen, elixir-format
msgid ".223"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56
#: lib/cannery_web/live/type_live/form_component.html.heex:56
#, elixir-autogen, elixir-format
msgid "5.56x46mm NATO"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300
#: lib/cannery_web/live/type_live/form_component.html.heex:300
#, elixir-autogen, elixir-format
msgid "Boxer"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308
#: lib/cannery_web/live/type_live/form_component.html.heex:308
#, elixir-autogen, elixir-format
msgid "Centerfire"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:43
#: lib/cannery_web/components/add_shot_record_component.html.heex:43
#: lib/cannery_web/live/range_live/form_component.html.heex:35
#, elixir-autogen, elixir-format
msgid "Really great weather"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:100
#: lib/cannery_web/components/container_table_component.ex:67
#: lib/cannery_web/components/move_pack_component.ex:68
#: lib/cannery_web/components/pack_table_component.ex:59
#: lib/cannery_web/components/shot_group_table_component.ex:45
#: lib/cannery_web/components/shot_record_table_component.ex:48
#: lib/cannery_web/components/type_table_component.ex:100
#: lib/cannery_web/live/pack_live/show.ex:93
#, elixir-autogen, elixir-format
msgid "Actions"
@ -1252,76 +1213,76 @@ msgstr ""
msgid "Close modal"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:35
#: lib/cannery_web/live/container_live/show.html.heex:103
#: lib/cannery_web/live/pack_live/index.html.heex:58
#: lib/cannery_web/live/range_live/index.html.heex:92
#: lib/cannery_web/live/type_live/index.html.heex:35
#, elixir-autogen, elixir-format
msgid "All"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313
#: lib/cannery_web/live/type_live/form_component.html.heex:313
#, elixir-autogen, elixir-format
msgid "Attributes"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:56
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
#: lib/cannery_web/components/type_table_component.ex:56
#: lib/cannery_web/live/type_live/form_component.html.heex:89
#, elixir-autogen, elixir-format, fuzzy
msgid "Brass height"
msgstr "Cuivre"
#: lib/cannery_web/live/ammo_type_live/show.ex:128
#: lib/cannery_web/live/type_live/show.ex:128
#, elixir-autogen, elixir-format
msgid "Brass height:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:57
#: lib/cannery_web/components/ammo_type_table_component.ex:58
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96
#: lib/cannery_web/components/type_table_component.ex:57
#: lib/cannery_web/components/type_table_component.ex:58
#: lib/cannery_web/live/type_live/form_component.html.heex:96
#, elixir-autogen, elixir-format
msgid "Chamber size"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:129
#: lib/cannery_web/live/type_live/show.ex:129
#, elixir-autogen, elixir-format
msgid "Chamber size:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48
#: lib/cannery_web/live/type_live/form_component.html.heex:48
#, elixir-autogen, elixir-format
msgid "Dimensions"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266
#: lib/cannery_web/components/type_table_component.ex:81
#: lib/cannery_web/live/type_live/form_component.html.heex:266
#, elixir-autogen, elixir-format
msgid "Dram equivalent"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:148
#: lib/cannery_web/live/type_live/show.ex:148
#, elixir-autogen, elixir-format
msgid "Dram equivalent:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67
#: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/type_live/form_component.html.heex:67
#, elixir-autogen, elixir-format
msgid "Gauge"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123
#: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format
msgid "Gauge:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:72
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207
#: lib/cannery_web/components/type_table_component.ex:72
#: lib/cannery_web/live/type_live/form_component.html.heex:207
#, elixir-autogen, elixir-format
msgid "Load grains"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:139
#: lib/cannery_web/live/type_live/show.ex:139
#, elixir-autogen, elixir-format
msgid "Load grains:"
msgstr ""
@ -1331,140 +1292,175 @@ msgstr ""
msgid "No ammo"
msgstr "Aucune munition"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60
#: lib/cannery_web/live/type_live/show.html.heex:58
#, elixir-autogen, elixir-format
msgid "None specified"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:38
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
#: lib/cannery_web/live/container_live/show.html.heex:106
#: lib/cannery_web/live/pack_live/index.html.heex:61
#: lib/cannery_web/live/range_live/index.html.heex:95
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:38
#: lib/cannery_web/live/type_live/show.html.heex:56
#, elixir-autogen, elixir-format
msgid "Pistol"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233
#: lib/cannery_web/live/type_live/form_component.html.heex:233
#, elixir-autogen, elixir-format, fuzzy
msgid "Powder"
msgstr "Type de poudre"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293
#: lib/cannery_web/live/type_live/form_component.html.heex:293
#, elixir-autogen, elixir-format, fuzzy
msgid "Primer"
msgstr "Type damorce"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109
#: lib/cannery_web/live/type_live/form_component.html.heex:109
#, elixir-autogen, elixir-format
msgid "Projectile"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:36
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
#: lib/cannery_web/live/container_live/show.html.heex:104
#: lib/cannery_web/live/pack_live/index.html.heex:59
#: lib/cannery_web/live/range_live/index.html.heex:93
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:36
#: lib/cannery_web/live/type_live/show.html.heex:54
#, elixir-autogen, elixir-format
msgid "Rifle"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:73
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215
#: lib/cannery_web/components/type_table_component.ex:73
#: lib/cannery_web/live/type_live/form_component.html.heex:215
#, elixir-autogen, elixir-format
msgid "Shot charge weight"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:140
#: lib/cannery_web/live/type_live/show.ex:140
#, elixir-autogen, elixir-format
msgid "Shot charge weight:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:70
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191
#: lib/cannery_web/components/type_table_component.ex:70
#: lib/cannery_web/live/type_live/form_component.html.heex:191
#, elixir-autogen, elixir-format
msgid "Shot material"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:137
#: lib/cannery_web/live/type_live/show.ex:137
#, elixir-autogen, elixir-format
msgid "Shot material:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:71
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200
#: lib/cannery_web/components/type_table_component.ex:71
#: lib/cannery_web/live/type_live/form_component.html.heex:200
#, elixir-autogen, elixir-format, fuzzy
msgid "Shot size"
msgstr "Tirs réalisés"
#: lib/cannery_web/live/ammo_type_live/show.ex:138
#: lib/cannery_web/live/type_live/show.ex:138
#, elixir-autogen, elixir-format, fuzzy
msgid "Shot size:"
msgstr "Tirs réalisés"
#: lib/cannery_web/components/ammo_type_table_component.ex:69
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183
#: lib/cannery_web/components/type_table_component.ex:69
#: lib/cannery_web/live/type_live/form_component.html.heex:183
#, elixir-autogen, elixir-format
msgid "Shot type"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:136
#: lib/cannery_web/live/type_live/show.ex:136
#, elixir-autogen, elixir-format
msgid "Shot type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
#: lib/cannery_web/live/container_live/show.html.heex:105
#: lib/cannery_web/live/pack_live/index.html.heex:60
#: lib/cannery_web/live/range_live/index.html.heex:94
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:37
#: lib/cannery_web/live/type_live/show.html.heex:52
#, elixir-autogen, elixir-format
msgid "Shotgun"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143
#: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/type_live/form_component.html.heex:143
#, elixir-autogen, elixir-format
msgid "Slug core"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187
#: lib/cannery_web/live/type_live/form_component.html.heex:187
#, elixir-autogen, elixir-format
msgid "Target, bird, buck, etc"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:127
#: lib/cannery_web/live/type_live/show.ex:127
#, elixir-autogen, elixir-format
msgid "Unfired length:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:55
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80
#: lib/cannery_web/components/type_table_component.ex:55
#: lib/cannery_web/live/type_live/form_component.html.heex:80
#, elixir-autogen, elixir-format
msgid "Unfired shell length"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:68
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176
#: lib/cannery_web/components/type_table_component.ex:68
#: lib/cannery_web/live/type_live/form_component.html.heex:176
#, elixir-autogen, elixir-format
msgid "Wadding"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:135
#: lib/cannery_web/live/type_live/show.ex:135
#, elixir-autogen, elixir-format
msgid "Wadding:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:150
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:21
#: lib/cannery_web/live/ammo_type_live/index.html.heex:29
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
#: lib/cannery_web/components/type_table_component.ex:150
#: lib/cannery_web/live/container_live/show.html.heex:97
#: lib/cannery_web/live/pack_live/index.html.heex:50
#: lib/cannery_web/live/range_live/index.html.heex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/index.html.heex:29
#: lib/cannery_web/live/type_live/show.html.heex:46
#, elixir-autogen, elixir-format
msgid "Class"
msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:22
#: lib/cannery_web/components/add_shot_record_component.html.heex:26
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds left"
msgstr "Cartouches:"
#: lib/cannery_web/components/add_shot_record_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit Shot Record"
msgstr "Modifier les enregistrements de tir"
#: lib/cannery_web/live/type_live/index.ex:28
#: lib/cannery_web/live/type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr "Éditer %{name}"
#: lib/cannery_web/live/type_live/index.ex:36
#: lib/cannery_web/live/type_live/index.ex:44
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr "Nouveau type de munition"
#: lib/cannery_web/live/type_live/index.html.heex:8
#: lib/cannery_web/live/type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Types"
msgstr "Type"

View File

@ -69,7 +69,7 @@ msgstr "Mél ou mot de passe invalide"
msgid "Not found"
msgstr "Pas trouvé"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18
#: lib/cannery_web/live/type_live/form_component.html.heex:18
#: lib/cannery_web/templates/user_registration/new.html.heex:13
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:13
#: lib/cannery_web/templates/user_settings/edit.html.heex:22
@ -172,42 +172,42 @@ msgstr "Impossible d'analyser le nombre de copies"
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
msgstr "Nombre de copies invalide, doit être 1 et %{max}. Été %{multiplier}"
#: lib/cannery/ammo.ex:1123
#: lib/cannery/ammo.ex:1121
#, elixir-autogen, elixir-format
msgid "Invalid multiplier"
msgstr "Multiplicateur invalide"
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr "Veuillez choisir un type de munitions et un conteneur"
#: lib/cannery_web/live/range_live/index.html.heex:74
#, elixir-autogen, elixir-format
msgid "Your browser does not support the canvas element."
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:74
#: lib/cannery/activity_log/shot_record.ex:74
#, elixir-autogen, elixir-format, fuzzy
msgid "Please select a valid user and ammo pack"
msgstr "Veuillez choisir un utilisateur valide et un groupe de munitions"
#: lib/cannery/activity_log/shot_group.ex:88
#: lib/cannery/activity_log/shot_record.ex:88
#, elixir-autogen, elixir-format
msgid "Ammo left can be at most %{count} rounds"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:84
#: lib/cannery/activity_log/shot_record.ex:84
#, elixir-autogen, elixir-format
msgid "Ammo left must be at least 0"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:119
#: lib/cannery/activity_log/shot_record.ex:119
#, elixir-autogen, elixir-format, fuzzy
msgid "Count can be at most %{count} shots"
msgstr "La quantité doit être inférieur à %{count}"
#: lib/cannery/activity_log/shot_group.ex:80
#: lib/cannery/activity_log/shot_record.ex:80
#, elixir-autogen, elixir-format
msgid "can't be blank"
msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format, fuzzy
msgid "Please select a type and container"
msgstr "Veuillez choisir un type de munitions et un conteneur"

View File

@ -23,17 +23,17 @@ msgstr ""
## Run "mix gettext.extract" to bring this file up to
## date. Leave "msgstr"s empty as changing them here has no
## effect: edit them in PO (.po) files instead.
#: lib/cannery_web/live/ammo_type_live/form_component.ex:89
#: lib/cannery_web/live/container_live/form_component.ex:89
#: lib/cannery_web/live/invite_live/form_component.ex:80
#: lib/cannery_web/live/tag_live/form_component.ex:78
#: lib/cannery_web/live/type_live/form_component.ex:88
#, elixir-autogen, elixir-format
msgid "%{name} created successfully"
msgstr "%{name} créé· avec succès"
#: lib/cannery_web/live/ammo_type_live/index.ex:72
#: lib/cannery_web/live/ammo_type_live/show.ex:27
#: lib/cannery_web/live/tag_live/index.ex:65
#: lib/cannery_web/live/type_live/index.ex:72
#: lib/cannery_web/live/type_live/show.ex:27
#, elixir-autogen, elixir-format
msgid "%{name} deleted succesfully"
msgstr "%{name} supprimé· avec succès"
@ -44,10 +44,10 @@ msgstr "%{name} supprimé· avec succès"
msgid "%{name} has been deleted"
msgstr "%{name} a été supprimé·e"
#: lib/cannery_web/live/ammo_type_live/form_component.ex:70
#: lib/cannery_web/live/container_live/form_component.ex:70
#: lib/cannery_web/live/invite_live/form_component.ex:62
#: lib/cannery_web/live/tag_live/form_component.ex:60
#: lib/cannery_web/live/type_live/form_component.ex:69
#, elixir-autogen, elixir-format
msgid "%{name} updated successfully"
msgstr "%{name} mis à jour avec succès"
@ -129,13 +129,13 @@ msgstr "Mot de passe mis à jour avec succès."
msgid "Please check your email to verify your account"
msgstr "Veuillez vérifier votre mél pour confirmer votre compte"
#: lib/cannery_web/components/add_shot_group_component.html.heex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:351
#: lib/cannery_web/components/add_shot_record_component.html.heex:59
#: lib/cannery_web/live/container_live/form_component.html.heex:59
#: lib/cannery_web/live/invite_live/form_component.html.heex:37
#: lib/cannery_web/live/pack_live/form_component.html.heex:85
#: lib/cannery_web/live/range_live/form_component.html.heex:47
#: lib/cannery_web/live/tag_live/form_component.html.heex:39
#: lib/cannery_web/live/type_live/form_component.html.heex:351
#, elixir-autogen, elixir-format
msgid "Saving..."
msgstr "Sauvegarde en cours…"
@ -167,7 +167,7 @@ msgstr "%{tag_name} a été retiré de %{container_name}"
msgid "Adding..."
msgstr "Ajout en cours…"
#: lib/cannery_web/components/add_shot_group_component.ex:60
#: lib/cannery_web/components/add_shot_record_component.ex:60
#, elixir-autogen, elixir-format
msgid "Shots recorded successfully"
msgstr "Tirs enregistré avec succès"
@ -258,8 +258,8 @@ msgid_plural "Ammo added successfully"
msgstr[0] "Groupe de munition mis à jour avec succès"
msgstr[1] "Groupe de munition mis à jour avec succès"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
#: lib/cannery_web/live/type_live/index.html.heex:116
#: lib/cannery_web/live/type_live/show.html.heex:29
#, elixir-autogen, elixir-format, fuzzy
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
msgstr "Êtes-vous certain·e de supprimer %{name}?"

View File

@ -38,7 +38,7 @@ msgstr ""
msgid "Add your first container!"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13
#: lib/cannery_web/live/type_live/index.html.heex:13
#, elixir-autogen, elixir-format
msgid "Add your first type!"
msgstr ""
@ -93,11 +93,6 @@ msgstr ""
msgid "Make your first tag!"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Container"
@ -131,13 +126,13 @@ msgstr ""
msgid "Reset password"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:57
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:350
#: lib/cannery_web/components/add_shot_record_component.html.heex:57
#: lib/cannery_web/live/container_live/form_component.html.heex:57
#: lib/cannery_web/live/invite_live/form_component.html.heex:35
#: lib/cannery_web/live/pack_live/form_component.html.heex:84
#: lib/cannery_web/live/range_live/form_component.html.heex:45
#: lib/cannery_web/live/tag_live/form_component.html.heex:37
#: lib/cannery_web/live/type_live/form_component.html.heex:350
#, elixir-autogen, elixir-format
msgid "Save"
msgstr ""
@ -214,11 +209,6 @@ msgstr ""
msgid "View in Catalog"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "add an ammo type first"
msgstr ""
#: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:89
@ -248,11 +238,6 @@ msgstr ""
msgid "Export Data as JSON"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:110
#, elixir-autogen, elixir-format
msgid "Clone %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:87
#: lib/cannery_web/live/container_live/index.html.heex:145
#, elixir-autogen, elixir-format
@ -264,12 +249,6 @@ msgstr ""
msgid "Copy invite link for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:129
#: lib/cannery_web/live/ammo_type_live/show.html.heex:36
#, elixir-autogen, elixir-format
msgid "Delete %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:104
#: lib/cannery_web/live/container_live/index.html.heex:162
#: lib/cannery_web/live/container_live/show.html.heex:48
@ -287,18 +266,6 @@ msgstr ""
msgid "Delete invite for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format
msgid "Delete shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:100
#: lib/cannery_web/live/ammo_type_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:77
#: lib/cannery_web/live/container_live/index.html.heex:135
#: lib/cannery_web/live/container_live/show.html.heex:35
@ -316,16 +283,6 @@ msgstr ""
msgid "Edit invite for %{invite_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#, elixir-autogen, elixir-format
msgid "Edit shot group of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format
msgid "Edit shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:120
#, elixir-autogen, elixir-format, fuzzy
msgid "Stage"
@ -342,11 +299,6 @@ msgstr ""
msgid "Unstage"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
#, elixir-autogen, elixir-format
msgid "View %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format, fuzzy
msgid "Clone pack of %{pack_count} bullets"
@ -364,8 +316,52 @@ msgstr ""
msgid "Edit pack of %{pack_count} bullets"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154
#: lib/cannery_web/live/type_live/show.html.heex:204
#, elixir-autogen, elixir-format, fuzzy
msgid "View pack of %{pack_count} bullets"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:105
#, elixir-autogen, elixir-format, fuzzy
msgid "Clone %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:35
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:97
#: lib/cannery_web/live/type_live/show.html.heex:19
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:17
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:89
#, elixir-autogen, elixir-format, fuzzy
msgid "View %{type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format, fuzzy
msgid "add a type first"
msgstr ""

View File

@ -28,7 +28,7 @@ msgid "Admins:"
msgstr ""
#: lib/cannery_web/components/core_components/topbar.html.heex:58
#: lib/cannery_web/components/shot_group_table_component.ex:41
#: lib/cannery_web/components/shot_record_table_component.ex:44
#: lib/cannery_web/live/pack_live/index.ex:75
#: lib/cannery_web/live/pack_live/index.ex:84
#: lib/cannery_web/live/pack_live/index.html.heex:3
@ -36,54 +36,48 @@ msgstr ""
msgid "Ammo"
msgstr ""
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Ammo type"
msgstr ""
#: lib/cannery_web/live/tag_live/form_component.html.heex:25
#, elixir-autogen, elixir-format
msgid "Background color"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:87
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324
#: lib/cannery_web/components/type_table_component.ex:87
#: lib/cannery_web/live/type_live/form_component.html.heex:324
#, elixir-autogen, elixir-format
msgid "Blank"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171
#: lib/cannery_web/live/type_live/form_component.html.heex:171
#, elixir-autogen, elixir-format
msgid "Brass"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
#: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/type_live/form_component.html.heex:144
#, elixir-autogen, elixir-format
msgid "Bullet core"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:60
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
#: lib/cannery_web/components/type_table_component.ex:60
#: lib/cannery_web/live/type_live/form_component.html.heex:121
#, elixir-autogen, elixir-format
msgid "Bullet type"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68
#: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/type_live/form_component.html.heex:68
#, elixir-autogen, elixir-format
msgid "Caliber"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:49
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52
#: lib/cannery_web/components/type_table_component.ex:49
#: lib/cannery_web/live/type_live/form_component.html.heex:52
#, elixir-autogen, elixir-format
msgid "Cartridge"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:67
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167
#: lib/cannery_web/components/type_table_component.ex:67
#: lib/cannery_web/live/type_live/form_component.html.heex:167
#, elixir-autogen, elixir-format
msgid "Case material"
msgstr ""
@ -103,8 +97,8 @@ msgstr ""
msgid "Containers"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:88
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328
#: lib/cannery_web/components/type_table_component.ex:88
#: lib/cannery_web/live/type_live/form_component.html.heex:328
#, elixir-autogen, elixir-format
msgid "Corrosive"
msgstr ""
@ -122,8 +116,8 @@ msgid "Count:"
msgstr ""
#: lib/cannery_web/components/container_table_component.ex:46
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:38
#: lib/cannery_web/live/container_live/form_component.html.heex:29
#: lib/cannery_web/live/type_live/form_component.html.heex:38
#, elixir-autogen, elixir-format
msgid "Description"
msgstr ""
@ -149,19 +143,19 @@ msgstr ""
msgid "Edit Tag"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135
#: lib/cannery_web/live/type_live/form_component.html.heex:135
#, elixir-autogen, elixir-format
msgid "FMJ"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112
#: lib/cannery_web/components/type_table_component.ex:59
#: lib/cannery_web/live/type_live/form_component.html.heex:112
#, elixir-autogen, elixir-format
msgid "Grains"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:86
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320
#: lib/cannery_web/components/type_table_component.ex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:320
#, elixir-autogen, elixir-format
msgid "Incendiary"
msgstr ""
@ -211,9 +205,9 @@ msgstr ""
msgid "Magazine, Clip, Ammo Box, etc"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:89
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336
#: lib/cannery_web/components/type_table_component.ex:89
#: lib/cannery_web/live/type_live/form_component.html.heex:333
#: lib/cannery_web/live/type_live/form_component.html.heex:336
#, elixir-autogen, elixir-format
msgid "Manufacturer"
msgstr ""
@ -228,22 +222,16 @@ msgstr ""
msgid "My cool ammo can"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:153
#: lib/cannery_web/components/container_table_component.ex:45
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31
#: lib/cannery_web/components/type_table_component.ex:153
#: lib/cannery_web/live/container_live/form_component.html.heex:21
#: lib/cannery_web/live/invite_live/form_component.html.heex:21
#: lib/cannery_web/live/tag_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/form_component.html.heex:31
#, elixir-autogen, elixir-format
msgid "Name"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:36
#: lib/cannery_web/live/ammo_type_live/index.ex:44
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr ""
#: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/index.ex:39
#, elixir-autogen, elixir-format
@ -265,7 +253,7 @@ msgstr ""
msgid "No Ammo"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180
#: lib/cannery_web/live/type_live/show.html.heex:178
#, elixir-autogen, elixir-format
msgid "No ammo for this type"
msgstr ""
@ -288,8 +276,8 @@ msgstr ""
msgid "No tags"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:38
#: lib/cannery_web/components/shot_group_table_component.ex:43
#: lib/cannery_web/components/add_shot_record_component.html.heex:38
#: lib/cannery_web/components/shot_record_table_component.ex:46
#: lib/cannery_web/live/pack_live/form_component.html.heex:50
#: lib/cannery_web/live/pack_live/show.ex:91
#: lib/cannery_web/live/range_live/form_component.html.heex:30
@ -308,8 +296,8 @@ msgstr ""
msgid "On the bookshelf"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:80
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257
#: lib/cannery_web/components/type_table_component.ex:80
#: lib/cannery_web/live/type_live/form_component.html.heex:257
#, elixir-autogen, elixir-format
msgid "Pressure"
msgstr ""
@ -325,8 +313,8 @@ msgstr ""
msgid "Price paid:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:83
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296
#: lib/cannery_web/components/type_table_component.ex:83
#: lib/cannery_web/live/type_live/form_component.html.heex:296
#, elixir-autogen, elixir-format
msgid "Primer type"
msgstr ""
@ -357,7 +345,7 @@ msgstr ""
msgid "Simple:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151
#: lib/cannery_web/live/type_live/form_component.html.heex:151
#, elixir-autogen, elixir-format
msgid "Steel"
msgstr ""
@ -391,15 +379,17 @@ msgstr ""
msgid "The self-hosted firearm tracker website"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:85
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316
#: lib/cannery_web/components/type_table_component.ex:85
#: lib/cannery_web/live/type_live/form_component.html.heex:316
#, elixir-autogen, elixir-format
msgid "Tracer"
msgstr ""
#: lib/cannery_web/components/container_table_component.ex:48
#: lib/cannery_web/components/move_pack_component.ex:66
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/container_live/form_component.html.heex:39
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Type"
msgstr ""
@ -441,8 +431,8 @@ msgstr ""
msgid "Range day"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:49
#: lib/cannery_web/components/shot_group_table_component.ex:44
#: lib/cannery_web/components/add_shot_record_component.html.heex:49
#: lib/cannery_web/components/shot_record_table_component.ex:47
#: lib/cannery_web/live/pack_live/show.ex:92
#: lib/cannery_web/live/range_live/form_component.html.heex:41
#, elixir-autogen, elixir-format
@ -459,18 +449,12 @@ msgstr ""
msgid "No ammo staged"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
#: lib/cannery_web/components/add_shot_record_component.html.heex:3
#: lib/cannery_web/live/pack_live/index.ex:35
#, elixir-autogen, elixir-format
msgid "Record shots"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format
msgid "Edit Shot Records"
msgstr ""
#: lib/cannery_web/live/range_live/index.ex:48
#, elixir-autogen, elixir-format
msgid "New Shot Records"
@ -482,13 +466,7 @@ msgstr ""
msgid "No shots recorded"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:22
#: lib/cannery_web/components/add_shot_group_component.html.heex:26
#, elixir-autogen, elixir-format
msgid "Rounds left"
msgstr ""
#: lib/cannery_web/components/shot_group_table_component.ex:42
#: lib/cannery_web/components/shot_record_table_component.ex:45
#: lib/cannery_web/live/pack_live/show.ex:90
#: lib/cannery_web/live/range_live/index.html.heex:69
#, elixir-autogen, elixir-format
@ -516,48 +494,48 @@ msgstr ""
msgid "Shot log"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:261
#: lib/cannery_web/components/core_components/pack_card.html.heex:42
#: lib/cannery_web/components/core_components/pack_card.html.heex:47
#: lib/cannery_web/components/pack_table_component.ex:163
#: lib/cannery_web/components/pack_table_component.ex:246
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
#: lib/cannery_web/components/type_table_component.ex:261
#: lib/cannery_web/live/pack_live/show.html.heex:37
#: lib/cannery_web/live/pack_live/show.html.heex:42
#: lib/cannery_web/live/type_live/show.html.heex:150
#, elixir-autogen, elixir-format
msgid "$%{amount}"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160
#: lib/cannery_web/live/type_live/form_component.html.heex:160
#, elixir-autogen, elixir-format
msgid "Bimetal"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:66
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
#: lib/cannery_web/components/type_table_component.ex:66
#: lib/cannery_web/live/type_live/form_component.html.heex:156
#, elixir-autogen, elixir-format
msgid "Jacket type"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279
#: lib/cannery_web/components/type_table_component.ex:82
#: lib/cannery_web/live/type_live/form_component.html.heex:279
#, elixir-autogen, elixir-format
msgid "Muzzle velocity"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:76
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244
#: lib/cannery_web/components/type_table_component.ex:76
#: lib/cannery_web/live/type_live/form_component.html.heex:244
#, elixir-autogen, elixir-format
msgid "Powder grains per charge"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:74
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236
#: lib/cannery_web/components/type_table_component.ex:74
#: lib/cannery_web/live/type_live/form_component.html.heex:236
#, elixir-autogen, elixir-format
msgid "Powder type"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343
#: lib/cannery_web/live/type_live/form_component.html.heex:343
#, elixir-autogen, elixir-format
msgid "UPC"
msgstr ""
@ -580,8 +558,8 @@ msgstr ""
msgid "New password"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:84
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304
#: lib/cannery_web/components/type_table_component.ex:84
#: lib/cannery_web/live/type_live/form_component.html.heex:304
#, elixir-autogen, elixir-format
msgid "Firing type"
msgstr ""
@ -604,16 +582,16 @@ msgid "Edit %{name} tags"
msgstr ""
#: lib/cannery_web/components/core_components/container_card.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:87
#: lib/cannery_web/live/container_live/show.html.heex:27
#: lib/cannery_web/live/type_live/show.html.heex:85
#, elixir-autogen, elixir-format
msgid "Rounds:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:260
#: lib/cannery_web/components/pack_table_component.ex:160
#: lib/cannery_web/components/pack_table_component.ex:242
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156
#: lib/cannery_web/components/type_table_component.ex:260
#: lib/cannery_web/live/type_live/show.html.heex:154
#, elixir-autogen, elixir-format
msgid "No cost information"
msgstr ""
@ -684,7 +662,7 @@ msgstr ""
msgid "Copies"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139
#: lib/cannery_web/live/type_live/show.html.heex:137
#, elixir-autogen, elixir-format
msgid "Added on:"
msgstr ""
@ -731,9 +709,9 @@ msgid "View the source code"
msgstr ""
#: lib/cannery_web/components/core_components/topbar.html.heex:50
#: lib/cannery_web/live/ammo_type_live/index.ex:52
#: lib/cannery_web/live/ammo_type_live/index.ex:62
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
#: lib/cannery_web/live/type_live/index.ex:52
#: lib/cannery_web/live/type_live/index.ex:62
#: lib/cannery_web/live/type_live/index.html.heex:3
#, elixir-autogen, elixir-format
msgid "Catalog"
msgstr ""
@ -764,8 +742,8 @@ msgid "This ammo is not in a container"
msgstr ""
#: lib/cannery_web/components/core_components/container_card.html.heex:32
#: lib/cannery_web/live/ammo_type_live/show.html.heex:113
#: lib/cannery_web/live/container_live/show.html.heex:22
#: lib/cannery_web/live/type_live/show.html.heex:111
#, elixir-autogen, elixir-format
msgid "Packs:"
msgstr ""
@ -791,9 +769,9 @@ msgstr ""
msgid "Container:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:64
#: lib/cannery_web/live/ammo_type_live/show.html.heex:166
#: lib/cannery_web/live/pack_live/index.html.heex:87
#: lib/cannery_web/live/type_live/index.html.heex:64
#: lib/cannery_web/live/type_live/show.html.heex:164
#, elixir-autogen, elixir-format
msgid "Show used"
msgstr ""
@ -809,182 +787,171 @@ msgstr ""
msgid "Rounds shot: %{count}"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:123
#: lib/cannery_web/components/container_table_component.ex:64
#: lib/cannery_web/components/type_table_component.ex:123
#, elixir-autogen, elixir-format, fuzzy
msgid "Packs"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:144
#: lib/cannery_web/components/container_table_component.ex:65
#: lib/cannery_web/components/type_table_component.ex:144
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:172
#: lib/cannery_web/live/container_live/index.html.heex:40
#: lib/cannery_web/live/container_live/show.html.heex:115
#: lib/cannery_web/live/type_live/show.html.heex:170
#, elixir-autogen, elixir-format
msgid "View as table"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:108
#: lib/cannery_web/components/type_table_component.ex:108
#, elixir-autogen, elixir-format
msgid "Total ever packs"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130
#: lib/cannery_web/live/type_live/show.html.heex:128
#, elixir-autogen, elixir-format
msgid "Total ever packs:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:129
#: lib/cannery_web/components/type_table_component.ex:129
#, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
#: lib/cannery_web/live/type_live/show.html.heex:102
#, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:116
#: lib/cannery_web/components/type_table_component.ex:116
#, elixir-autogen, elixir-format
msgid "Used packs"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:120
#, elixir-autogen, elixir-format
msgid "Used packs:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:137
#: lib/cannery_web/components/type_table_component.ex:137
#, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96
#: lib/cannery_web/live/type_live/show.html.heex:94
#, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds:"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:34
#, elixir-autogen, elixir-format, fuzzy
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds shot chart"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:154
#: lib/cannery_web/live/type_live/show.ex:154
#, elixir-autogen, elixir-format, fuzzy
msgid "Blank:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:132
#: lib/cannery_web/live/type_live/show.ex:132
#, elixir-autogen, elixir-format, fuzzy
msgid "Bullet core:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:131
#: lib/cannery_web/live/type_live/show.ex:131
#, elixir-autogen, elixir-format, fuzzy
msgid "Bullet type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123
#: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format, fuzzy
msgid "Caliber:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:121
#: lib/cannery_web/live/type_live/show.ex:121
#, elixir-autogen, elixir-format, fuzzy
msgid "Cartridge:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:134
#: lib/cannery_web/live/type_live/show.ex:134
#, elixir-autogen, elixir-format, fuzzy
msgid "Case material:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:155
#: lib/cannery_web/live/type_live/show.ex:155
#, elixir-autogen, elixir-format, fuzzy
msgid "Corrosive:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:151
#: lib/cannery_web/live/type_live/show.ex:151
#, elixir-autogen, elixir-format, fuzzy
msgid "Firing type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:130
#: lib/cannery_web/live/type_live/show.ex:130
#, elixir-autogen, elixir-format, fuzzy
msgid "Grains:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:153
#: lib/cannery_web/live/type_live/show.ex:153
#, elixir-autogen, elixir-format, fuzzy
msgid "Incendiary:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:133
#: lib/cannery_web/live/type_live/show.ex:133
#, elixir-autogen, elixir-format, fuzzy
msgid "Jacket type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:156
#: lib/cannery_web/live/type_live/show.ex:156
#, elixir-autogen, elixir-format, fuzzy
msgid "Manufacturer:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:149
#: lib/cannery_web/live/type_live/show.ex:149
#, elixir-autogen, elixir-format, fuzzy
msgid "Muzzle velocity:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:143
#: lib/cannery_web/live/type_live/show.ex:143
#, elixir-autogen, elixir-format, fuzzy
msgid "Powder grains per charge:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:141
#: lib/cannery_web/live/type_live/show.ex:141
#, elixir-autogen, elixir-format, fuzzy
msgid "Powder type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:147
#: lib/cannery_web/live/type_live/show.ex:147
#, elixir-autogen, elixir-format, fuzzy
msgid "Pressure:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:150
#: lib/cannery_web/live/type_live/show.ex:150
#, elixir-autogen, elixir-format, fuzzy
msgid "Primer type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:152
#: lib/cannery_web/live/type_live/show.ex:152
#, elixir-autogen, elixir-format, fuzzy
msgid "Tracer:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:157
#: lib/cannery_web/live/type_live/show.ex:157
#, elixir-autogen, elixir-format, fuzzy
msgid "UPC:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:102
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148
#: lib/cannery_web/components/type_table_component.ex:102
#: lib/cannery_web/live/type_live/show.html.heex:146
#, elixir-autogen, elixir-format
msgid "Average CPR"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:28
#: lib/cannery_web/live/ammo_type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/components/core_components/pack_card.html.heex:17
#: lib/cannery_web/components/pack_table_component.ex:250
#, elixir-autogen, elixir-format
@ -1048,13 +1015,7 @@ msgstr ""
msgid "Edit ammo"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
#: lib/cannery_web/live/ammo_type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Ammo types"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:58
#: lib/cannery_web/live/type_live/index.html.heex:58
#, elixir-autogen, elixir-format
msgid "Search catalog"
msgstr ""
@ -1181,42 +1142,42 @@ msgstr ""
msgid "Password"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261
#: lib/cannery_web/live/type_live/form_component.html.heex:261
#, elixir-autogen, elixir-format
msgid "+P"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75
#: lib/cannery_web/live/type_live/form_component.html.heex:75
#, elixir-autogen, elixir-format
msgid ".223"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56
#: lib/cannery_web/live/type_live/form_component.html.heex:56
#, elixir-autogen, elixir-format
msgid "5.56x46mm NATO"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300
#: lib/cannery_web/live/type_live/form_component.html.heex:300
#, elixir-autogen, elixir-format
msgid "Boxer"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308
#: lib/cannery_web/live/type_live/form_component.html.heex:308
#, elixir-autogen, elixir-format
msgid "Centerfire"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:43
#: lib/cannery_web/components/add_shot_record_component.html.heex:43
#: lib/cannery_web/live/range_live/form_component.html.heex:35
#, elixir-autogen, elixir-format
msgid "Really great weather"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:100
#: lib/cannery_web/components/container_table_component.ex:67
#: lib/cannery_web/components/move_pack_component.ex:68
#: lib/cannery_web/components/pack_table_component.ex:59
#: lib/cannery_web/components/shot_group_table_component.ex:45
#: lib/cannery_web/components/shot_record_table_component.ex:48
#: lib/cannery_web/components/type_table_component.ex:100
#: lib/cannery_web/live/pack_live/show.ex:93
#, elixir-autogen, elixir-format
msgid "Actions"
@ -1243,76 +1204,76 @@ msgstr ""
msgid "Close modal"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:35
#: lib/cannery_web/live/container_live/show.html.heex:103
#: lib/cannery_web/live/pack_live/index.html.heex:58
#: lib/cannery_web/live/range_live/index.html.heex:92
#: lib/cannery_web/live/type_live/index.html.heex:35
#, elixir-autogen, elixir-format
msgid "All"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313
#: lib/cannery_web/live/type_live/form_component.html.heex:313
#, elixir-autogen, elixir-format
msgid "Attributes"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:56
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
#: lib/cannery_web/components/type_table_component.ex:56
#: lib/cannery_web/live/type_live/form_component.html.heex:89
#, elixir-autogen, elixir-format, fuzzy
msgid "Brass height"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:128
#: lib/cannery_web/live/type_live/show.ex:128
#, elixir-autogen, elixir-format
msgid "Brass height:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:57
#: lib/cannery_web/components/ammo_type_table_component.ex:58
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96
#: lib/cannery_web/components/type_table_component.ex:57
#: lib/cannery_web/components/type_table_component.ex:58
#: lib/cannery_web/live/type_live/form_component.html.heex:96
#, elixir-autogen, elixir-format
msgid "Chamber size"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:129
#: lib/cannery_web/live/type_live/show.ex:129
#, elixir-autogen, elixir-format
msgid "Chamber size:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48
#: lib/cannery_web/live/type_live/form_component.html.heex:48
#, elixir-autogen, elixir-format
msgid "Dimensions"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266
#: lib/cannery_web/components/type_table_component.ex:81
#: lib/cannery_web/live/type_live/form_component.html.heex:266
#, elixir-autogen, elixir-format
msgid "Dram equivalent"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:148
#: lib/cannery_web/live/type_live/show.ex:148
#, elixir-autogen, elixir-format
msgid "Dram equivalent:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67
#: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/type_live/form_component.html.heex:67
#, elixir-autogen, elixir-format
msgid "Gauge"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123
#: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format
msgid "Gauge:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:72
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207
#: lib/cannery_web/components/type_table_component.ex:72
#: lib/cannery_web/live/type_live/form_component.html.heex:207
#, elixir-autogen, elixir-format
msgid "Load grains"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:139
#: lib/cannery_web/live/type_live/show.ex:139
#, elixir-autogen, elixir-format
msgid "Load grains:"
msgstr ""
@ -1322,140 +1283,175 @@ msgstr ""
msgid "No ammo"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60
#: lib/cannery_web/live/type_live/show.html.heex:58
#, elixir-autogen, elixir-format
msgid "None specified"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:38
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
#: lib/cannery_web/live/container_live/show.html.heex:106
#: lib/cannery_web/live/pack_live/index.html.heex:61
#: lib/cannery_web/live/range_live/index.html.heex:95
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:38
#: lib/cannery_web/live/type_live/show.html.heex:56
#, elixir-autogen, elixir-format
msgid "Pistol"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233
#: lib/cannery_web/live/type_live/form_component.html.heex:233
#, elixir-autogen, elixir-format, fuzzy
msgid "Powder"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293
#: lib/cannery_web/live/type_live/form_component.html.heex:293
#, elixir-autogen, elixir-format, fuzzy
msgid "Primer"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109
#: lib/cannery_web/live/type_live/form_component.html.heex:109
#, elixir-autogen, elixir-format
msgid "Projectile"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:36
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
#: lib/cannery_web/live/container_live/show.html.heex:104
#: lib/cannery_web/live/pack_live/index.html.heex:59
#: lib/cannery_web/live/range_live/index.html.heex:93
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:36
#: lib/cannery_web/live/type_live/show.html.heex:54
#, elixir-autogen, elixir-format
msgid "Rifle"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:73
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215
#: lib/cannery_web/components/type_table_component.ex:73
#: lib/cannery_web/live/type_live/form_component.html.heex:215
#, elixir-autogen, elixir-format
msgid "Shot charge weight"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:140
#: lib/cannery_web/live/type_live/show.ex:140
#, elixir-autogen, elixir-format
msgid "Shot charge weight:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:70
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191
#: lib/cannery_web/components/type_table_component.ex:70
#: lib/cannery_web/live/type_live/form_component.html.heex:191
#, elixir-autogen, elixir-format
msgid "Shot material"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:137
#: lib/cannery_web/live/type_live/show.ex:137
#, elixir-autogen, elixir-format
msgid "Shot material:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:71
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200
#: lib/cannery_web/components/type_table_component.ex:71
#: lib/cannery_web/live/type_live/form_component.html.heex:200
#, elixir-autogen, elixir-format, fuzzy
msgid "Shot size"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:138
#: lib/cannery_web/live/type_live/show.ex:138
#, elixir-autogen, elixir-format, fuzzy
msgid "Shot size:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:69
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183
#: lib/cannery_web/components/type_table_component.ex:69
#: lib/cannery_web/live/type_live/form_component.html.heex:183
#, elixir-autogen, elixir-format
msgid "Shot type"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:136
#: lib/cannery_web/live/type_live/show.ex:136
#, elixir-autogen, elixir-format
msgid "Shot type:"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
#: lib/cannery_web/live/container_live/show.html.heex:105
#: lib/cannery_web/live/pack_live/index.html.heex:60
#: lib/cannery_web/live/range_live/index.html.heex:94
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:37
#: lib/cannery_web/live/type_live/show.html.heex:52
#, elixir-autogen, elixir-format
msgid "Shotgun"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143
#: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/type_live/form_component.html.heex:143
#, elixir-autogen, elixir-format
msgid "Slug core"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187
#: lib/cannery_web/live/type_live/form_component.html.heex:187
#, elixir-autogen, elixir-format
msgid "Target, bird, buck, etc"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:127
#: lib/cannery_web/live/type_live/show.ex:127
#, elixir-autogen, elixir-format
msgid "Unfired length:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:55
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80
#: lib/cannery_web/components/type_table_component.ex:55
#: lib/cannery_web/live/type_live/form_component.html.heex:80
#, elixir-autogen, elixir-format
msgid "Unfired shell length"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:68
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176
#: lib/cannery_web/components/type_table_component.ex:68
#: lib/cannery_web/live/type_live/form_component.html.heex:176
#, elixir-autogen, elixir-format
msgid "Wadding"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:135
#: lib/cannery_web/live/type_live/show.ex:135
#, elixir-autogen, elixir-format
msgid "Wadding:"
msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:150
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:21
#: lib/cannery_web/live/ammo_type_live/index.html.heex:29
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
#: lib/cannery_web/components/type_table_component.ex:150
#: lib/cannery_web/live/container_live/show.html.heex:97
#: lib/cannery_web/live/pack_live/index.html.heex:50
#: lib/cannery_web/live/range_live/index.html.heex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/index.html.heex:29
#: lib/cannery_web/live/type_live/show.html.heex:46
#, elixir-autogen, elixir-format
msgid "Class"
msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:22
#: lib/cannery_web/components/add_shot_record_component.html.heex:26
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds left"
msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit Shot Record"
msgstr ""
#: lib/cannery_web/live/type_live/index.ex:28
#: lib/cannery_web/live/type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.ex:36
#: lib/cannery_web/live/type_live/index.ex:44
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:8
#: lib/cannery_web/live/type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Types"
msgstr ""

View File

@ -70,7 +70,7 @@ msgstr "Seoladh email nó pasfhocal neamhbhailí"
msgid "Not found"
msgstr "Ní feidir é a fáil"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18
#: lib/cannery_web/live/type_live/form_component.html.heex:18
#: lib/cannery_web/templates/user_registration/new.html.heex:13
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:13
#: lib/cannery_web/templates/user_settings/edit.html.heex:22
@ -171,42 +171,42 @@ msgstr ""
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
msgstr ""
#: lib/cannery/ammo.ex:1123
#: lib/cannery/ammo.ex:1121
#, elixir-autogen, elixir-format
msgid "Invalid multiplier"
msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:74
#, elixir-autogen, elixir-format
msgid "Your browser does not support the canvas element."
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:74
#: lib/cannery/activity_log/shot_record.ex:74
#, elixir-autogen, elixir-format, fuzzy
msgid "Please select a valid user and ammo pack"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:88
#: lib/cannery/activity_log/shot_record.ex:88
#, elixir-autogen, elixir-format
msgid "Ammo left can be at most %{count} rounds"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:84
#: lib/cannery/activity_log/shot_record.ex:84
#, elixir-autogen, elixir-format
msgid "Ammo left must be at least 0"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:119
#: lib/cannery/activity_log/shot_record.ex:119
#, elixir-autogen, elixir-format, fuzzy
msgid "Count can be at most %{count} shots"
msgstr ""
#: lib/cannery/activity_log/shot_group.ex:80
#: lib/cannery/activity_log/shot_record.ex:80
#, elixir-autogen, elixir-format
msgid "can't be blank"
msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format, fuzzy
msgid "Please select a type and container"
msgstr ""

View File

@ -21,17 +21,17 @@ msgstr ""
## Run "mix gettext.extract" to bring this file up to
## date. Leave "msgstr"s empty as changing them here has no
## effect: edit them in PO (.po) files instead.
#: lib/cannery_web/live/ammo_type_live/form_component.ex:89
#: lib/cannery_web/live/container_live/form_component.ex:89
#: lib/cannery_web/live/invite_live/form_component.ex:80
#: lib/cannery_web/live/tag_live/form_component.ex:78
#: lib/cannery_web/live/type_live/form_component.ex:88
#, elixir-autogen, elixir-format
msgid "%{name} created successfully"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:72
#: lib/cannery_web/live/ammo_type_live/show.ex:27
#: lib/cannery_web/live/tag_live/index.ex:65
#: lib/cannery_web/live/type_live/index.ex:72
#: lib/cannery_web/live/type_live/show.ex:27
#, elixir-autogen, elixir-format
msgid "%{name} deleted succesfully"
msgstr ""
@ -42,10 +42,10 @@ msgstr ""
msgid "%{name} has been deleted"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.ex:70
#: lib/cannery_web/live/container_live/form_component.ex:70
#: lib/cannery_web/live/invite_live/form_component.ex:62
#: lib/cannery_web/live/tag_live/form_component.ex:60
#: lib/cannery_web/live/type_live/form_component.ex:69
#, elixir-autogen, elixir-format
msgid "%{name} updated successfully"
msgstr ""
@ -120,13 +120,13 @@ msgstr ""
msgid "Please check your email to verify your account"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:351
#: lib/cannery_web/components/add_shot_record_component.html.heex:59
#: lib/cannery_web/live/container_live/form_component.html.heex:59
#: lib/cannery_web/live/invite_live/form_component.html.heex:37
#: lib/cannery_web/live/pack_live/form_component.html.heex:85
#: lib/cannery_web/live/range_live/form_component.html.heex:47
#: lib/cannery_web/live/tag_live/form_component.html.heex:39
#: lib/cannery_web/live/type_live/form_component.html.heex:351
#, elixir-autogen, elixir-format
msgid "Saving..."
msgstr ""
@ -156,7 +156,7 @@ msgstr ""
msgid "Adding..."
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.ex:60
#: lib/cannery_web/components/add_shot_record_component.ex:60
#, elixir-autogen, elixir-format
msgid "Shots recorded successfully"
msgstr ""
@ -250,8 +250,8 @@ msgstr[2] ""
msgstr[3] ""
msgstr[4] ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
#: lib/cannery_web/live/type_live/index.html.heex:116
#: lib/cannery_web/live/type_live/show.html.heex:29
#, elixir-autogen, elixir-format
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
msgstr ""

View File

@ -10,17 +10,17 @@
msgid ""
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.ex:89
#: lib/cannery_web/live/container_live/form_component.ex:89
#: lib/cannery_web/live/invite_live/form_component.ex:80
#: lib/cannery_web/live/tag_live/form_component.ex:78
#: lib/cannery_web/live/type_live/form_component.ex:88
#, elixir-autogen, elixir-format
msgid "%{name} created successfully"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:72
#: lib/cannery_web/live/ammo_type_live/show.ex:27
#: lib/cannery_web/live/tag_live/index.ex:65
#: lib/cannery_web/live/type_live/index.ex:72
#: lib/cannery_web/live/type_live/show.ex:27
#, elixir-autogen, elixir-format
msgid "%{name} deleted succesfully"
msgstr ""
@ -31,10 +31,10 @@ msgstr ""
msgid "%{name} has been deleted"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.ex:70
#: lib/cannery_web/live/container_live/form_component.ex:70
#: lib/cannery_web/live/invite_live/form_component.ex:62
#: lib/cannery_web/live/tag_live/form_component.ex:60
#: lib/cannery_web/live/type_live/form_component.ex:69
#, elixir-autogen, elixir-format
msgid "%{name} updated successfully"
msgstr ""
@ -109,13 +109,13 @@ msgstr ""
msgid "Please check your email to verify your account"
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:351
#: lib/cannery_web/components/add_shot_record_component.html.heex:59
#: lib/cannery_web/live/container_live/form_component.html.heex:59
#: lib/cannery_web/live/invite_live/form_component.html.heex:37
#: lib/cannery_web/live/pack_live/form_component.html.heex:85
#: lib/cannery_web/live/range_live/form_component.html.heex:47
#: lib/cannery_web/live/tag_live/form_component.html.heex:39
#: lib/cannery_web/live/type_live/form_component.html.heex:351
#, elixir-autogen, elixir-format
msgid "Saving..."
msgstr ""
@ -145,7 +145,7 @@ msgstr ""
msgid "Adding..."
msgstr ""
#: lib/cannery_web/components/add_shot_group_component.ex:60
#: lib/cannery_web/components/add_shot_record_component.ex:60
#, elixir-autogen, elixir-format
msgid "Shots recorded successfully"
msgstr ""
@ -236,8 +236,8 @@ msgid_plural "Ammo added successfully"
msgstr[0] ""
msgstr[1] ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
#: lib/cannery_web/live/type_live/index.html.heex:116
#: lib/cannery_web/live/type_live/show.html.heex:29
#, elixir-autogen, elixir-format
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
msgstr ""

View File

@ -2,10 +2,6 @@ defmodule Cannery.Repo.Migrations.RenameTypeToClass do
use Ecto.Migration
def up do
drop index(:ammo_types, [:type])
flush()
rename table(:ammo_types), :type, to: :class
alter table(:ammo_types) do
@ -14,8 +10,6 @@ defmodule Cannery.Repo.Migrations.RenameTypeToClass do
flush()
create index(:ammo_types, [:class])
execute """
ALTER TABLE ammo_types
ADD COLUMN search tsvector
@ -59,10 +53,6 @@ defmodule Cannery.Repo.Migrations.RenameTypeToClass do
end
def down do
drop index(:ammo_types, [:class])
flush()
rename table(:ammo_types), :class, to: :type
alter table(:ammo_types) do
@ -71,8 +61,6 @@ defmodule Cannery.Repo.Migrations.RenameTypeToClass do
flush()
create index(:ammo_types, [:type])
execute """
ALTER TABLE ammo_types
ADD COLUMN search TSVECTOR

View File

@ -3,11 +3,7 @@ defmodule Cannery.Repo.Migrations.RenameAmmoGroupsToPacks do
def up do
drop index(:ammo_groups, [:user_id], where: "count = 0", name: :empty_ammo_groups_index)
drop index(:ammo_groups, [:user_id, :ammo_type_id])
drop index(:ammo_groups, [:user_id, :container_id])
drop index(:ammo_groups, [:ammo_type_id])
drop index(:ammo_groups, [:container_id])
drop index(:ammo_groups, [:user_id])
drop index(:shot_groups, [:user_id, :ammo_group_id])
flush()
@ -16,22 +12,11 @@ defmodule Cannery.Repo.Migrations.RenameAmmoGroupsToPacks do
flush()
create index(:packs, [:user_id], where: "count = 0", name: :empty_packs_index)
create index(:packs, [:user_id, :ammo_type_id])
create index(:packs, [:user_id, :container_id])
create index(:packs, [:ammo_type_id])
create index(:packs, [:container_id])
create index(:packs, [:user_id])
rename table(:shot_groups), :ammo_group_id, to: :pack_id
end
def down do
drop index(:packs, [:user_id], where: "count = 0", name: :empty_packs_index)
drop index(:packs, [:user_id, :ammo_type_id])
drop index(:packs, [:user_id, :container_id])
drop index(:packs, [:ammo_type_id])
drop index(:packs, [:container_id])
drop index(:packs, [:user_id])
flush()
@ -40,12 +25,10 @@ defmodule Cannery.Repo.Migrations.RenameAmmoGroupsToPacks do
flush()
create index(:ammo_groups, [:user_id], where: "count = 0", name: :empty_ammo_groups_index)
create index(:ammo_groups, [:user_id, :ammo_type_id])
create index(:ammo_groups, [:user_id, :container_id])
create index(:ammo_groups, [:ammo_type_id])
create index(:ammo_groups, [:container_id])
create index(:ammo_groups, [:user_id])
rename table(:shot_groups), :pack_id, to: :ammo_group_id
flush()
create index(:shot_groups, [:user_id, :ammo_group_id])
end
end

View File

@ -0,0 +1,7 @@
defmodule Cannery.Repo.Migrations.RenameShotGroupsToShotRecords do
use Ecto.Migration
def change do
rename table(:shot_groups), to: table(:shot_records)
end
end

View File

@ -0,0 +1,8 @@
defmodule Cannery.Repo.Migrations.RenameAmmoTypeToType do
use Ecto.Migration
def change do
rename table(:ammo_types), to: table(:types)
rename table(:packs), :ammo_type_id, to: :type_id
end
end

View File

@ -5,31 +5,30 @@ defmodule Cannery.ActivityLogTest do
use Cannery.DataCase
import Cannery.Fixtures
alias Cannery.{ActivityLog, ActivityLog.ShotGroup, Ammo}
alias Cannery.{ActivityLog, ActivityLog.ShotRecord, Ammo}
@moduletag :activity_log_test
describe "shot_groups" do
describe "shot_records" do
setup do
current_user = user_fixture()
container = container_fixture(current_user)
ammo_type = ammo_type_fixture(current_user)
type = type_fixture(current_user)
{1, [%{id: pack_id} = pack]} =
pack_fixture(%{count: 25}, ammo_type, container, current_user)
{1, [%{id: pack_id} = pack]} = pack_fixture(%{count: 25}, type, container, current_user)
shot_group =
shot_record =
%{count: 5, date: ~N[2022-02-13 03:17:00], notes: "some notes"}
|> shot_group_fixture(current_user, pack)
|> shot_record_fixture(current_user, pack)
pack = pack_id |> Ammo.get_pack!(current_user)
[
current_user: current_user,
container: container,
ammo_type: ammo_type,
type: type,
pack: pack,
shot_group: shot_group
shot_record: shot_record
]
end
@ -37,95 +36,96 @@ defmodule Cannery.ActivityLogTest do
%{pack: pack, current_user: current_user} do
assert ActivityLog.get_shot_record_count!(current_user) == 1
shot_group_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, current_user, pack)
shot_record_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, current_user, pack)
assert ActivityLog.get_shot_record_count!(current_user) == 2
shot_group_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, current_user, pack)
shot_record_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, current_user, pack)
assert ActivityLog.get_shot_record_count!(current_user) == 3
other_user = user_fixture()
assert ActivityLog.get_shot_record_count!(other_user) == 0
container = container_fixture(other_user)
ammo_type = ammo_type_fixture(other_user)
{1, [pack]} = pack_fixture(%{count: 25}, ammo_type, container, other_user)
shot_group_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, other_user, pack)
type = type_fixture(other_user)
{1, [pack]} = pack_fixture(%{count: 25}, type, container, other_user)
shot_record_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, other_user, pack)
assert ActivityLog.get_shot_record_count!(other_user) == 1
end
test "get_shot_group!/2 returns the shot_group with given id",
%{shot_group: shot_group, current_user: current_user} do
assert ActivityLog.get_shot_group!(shot_group.id, current_user) == shot_group
test "get_shot_record!/2 returns the shot_record with given id",
%{shot_record: shot_record, current_user: current_user} do
assert ActivityLog.get_shot_record!(shot_record.id, current_user) == shot_record
end
test "get_shot_group!/2 does not return a shot_group of another user",
%{shot_group: shot_group} do
test "get_shot_record!/2 does not return a shot_record of another user",
%{shot_record: shot_record} do
another_user = user_fixture()
assert_raise Ecto.NoResultsError, fn ->
ActivityLog.get_shot_group!(shot_group.id, another_user)
ActivityLog.get_shot_record!(shot_record.id, another_user)
end
end
test "create_shot_group/3 with valid data creates a shot_group",
test "create_shot_record/3 with valid data creates a shot_record",
%{current_user: current_user, pack: pack} do
valid_attrs = %{count: 10, date: ~D[2022-02-13], notes: "some notes"}
assert {:ok, %ShotGroup{} = shot_group} =
ActivityLog.create_shot_group(valid_attrs, current_user, pack)
assert {:ok, %ShotRecord{} = shot_record} =
ActivityLog.create_shot_record(valid_attrs, current_user, pack)
assert shot_group.count == 10
assert shot_group.date == ~D[2022-02-13]
assert shot_group.notes == "some notes"
assert shot_record.count == 10
assert shot_record.date == ~D[2022-02-13]
assert shot_record.notes == "some notes"
end
test "create_shot_group/3 removes corresponding count from pack",
test "create_shot_record/3 removes corresponding count from pack",
%{
current_user: current_user,
pack: %{id: pack_id, count: org_count} = pack
} do
valid_attrs = %{count: 10, date: ~D[2022-02-13], notes: "some notes"}
assert {:ok, %ShotGroup{} = shot_group} =
ActivityLog.create_shot_group(valid_attrs, current_user, pack)
assert {:ok, %ShotRecord{} = shot_record} =
ActivityLog.create_shot_record(valid_attrs, current_user, pack)
%{count: new_count} = pack_id |> Ammo.get_pack!(current_user)
assert org_count - shot_group.count == new_count
assert org_count - shot_record.count == new_count
assert new_count == 10
end
test "create_shot_group/3 does not remove more tha pack amount",
test "create_shot_record/3 does not remove more tha pack amount",
%{current_user: current_user, pack: %{id: pack_id} = pack} do
valid_attrs = %{count: 20, date: ~D[2022-02-13], notes: "some notes"}
assert {:ok, %ShotGroup{}} = ActivityLog.create_shot_group(valid_attrs, current_user, pack)
assert {:ok, %ShotRecord{}} =
ActivityLog.create_shot_record(valid_attrs, current_user, pack)
pack = pack_id |> Ammo.get_pack!(current_user)
assert pack.count == 0
assert {:error, %Ecto.Changeset{}} =
ActivityLog.create_shot_group(%{count: 1}, current_user, pack)
ActivityLog.create_shot_record(%{count: 1}, current_user, pack)
end
test "create_shot_group/3 with invalid data returns error changeset",
test "create_shot_record/3 with invalid data returns error changeset",
%{current_user: current_user, pack: pack} do
invalid_params = %{count: nil, date: nil, notes: nil}
assert {:error, %Ecto.Changeset{}} =
ActivityLog.create_shot_group(invalid_params, current_user, pack)
ActivityLog.create_shot_record(invalid_params, current_user, pack)
end
test "update_shot_group/3 with valid data updates the shot_group and pack",
test "update_shot_record/3 with valid data updates the shot_record and pack",
%{
shot_group: shot_group,
shot_record: shot_record,
pack: %{id: pack_id},
current_user: current_user
} do
assert {:ok, %ShotGroup{} = shot_group} =
ActivityLog.update_shot_group(
shot_group,
assert {:ok, %ShotRecord{} = shot_record} =
ActivityLog.update_shot_record(
shot_record,
%{
count: 10,
date: ~D[2022-02-13],
@ -136,14 +136,14 @@ defmodule Cannery.ActivityLogTest do
pack = pack_id |> Ammo.get_pack!(current_user)
assert shot_group.count == 10
assert shot_record.count == 10
assert pack.count == 15
assert shot_group.date == ~D[2022-02-13]
assert shot_group.notes == "some updated notes"
assert shot_record.date == ~D[2022-02-13]
assert shot_record.notes == "some updated notes"
assert {:ok, %ShotGroup{} = shot_group} =
ActivityLog.update_shot_group(
shot_group,
assert {:ok, %ShotRecord{} = shot_record} =
ActivityLog.update_shot_record(
shot_record,
%{
count: 25,
date: ~D[2022-02-13],
@ -154,83 +154,82 @@ defmodule Cannery.ActivityLogTest do
pack = pack_id |> Ammo.get_pack!(current_user)
assert shot_group.count == 25
assert shot_record.count == 25
assert pack.count == 0
end
test "update_shot_group/3 with invalid data returns error changeset",
%{shot_group: shot_group, current_user: current_user} do
test "update_shot_record/3 with invalid data returns error changeset",
%{shot_record: shot_record, current_user: current_user} do
assert {:error, %Ecto.Changeset{}} =
ActivityLog.update_shot_group(
shot_group,
ActivityLog.update_shot_record(
shot_record,
%{count: 26, date: nil, notes: nil},
current_user
)
assert {:error, %Ecto.Changeset{}} =
ActivityLog.update_shot_group(
shot_group,
ActivityLog.update_shot_record(
shot_record,
%{count: -1, date: nil, notes: nil},
current_user
)
assert shot_group == ActivityLog.get_shot_group!(shot_group.id, current_user)
assert shot_record == ActivityLog.get_shot_record!(shot_record.id, current_user)
end
test "delete_shot_group/2 deletes the shot_group and adds value back",
%{shot_group: shot_group, current_user: current_user, pack: %{id: pack_id}} do
assert {:ok, %ShotGroup{}} = ActivityLog.delete_shot_group(shot_group, current_user)
test "delete_shot_record/2 deletes the shot_record and adds value back",
%{shot_record: shot_record, current_user: current_user, pack: %{id: pack_id}} do
assert {:ok, %ShotRecord{}} = ActivityLog.delete_shot_record(shot_record, current_user)
assert %{count: 25} = pack_id |> Ammo.get_pack!(current_user)
assert_raise Ecto.NoResultsError, fn ->
ActivityLog.get_shot_group!(shot_group.id, current_user)
ActivityLog.get_shot_record!(shot_record.id, current_user)
end
end
test "get_used_count/2 returns accurate used count", %{
pack: pack,
ammo_type: ammo_type,
type: type,
container: container,
current_user: current_user
} do
{1, [another_pack]} = pack_fixture(ammo_type, container, current_user)
{1, [another_pack]} = pack_fixture(type, container, current_user)
assert 0 = another_pack |> ActivityLog.get_used_count(current_user)
assert 5 = pack |> ActivityLog.get_used_count(current_user)
shot_group_fixture(%{count: 15}, current_user, pack)
shot_record_fixture(%{count: 15}, current_user, pack)
assert 20 = pack |> ActivityLog.get_used_count(current_user)
shot_group_fixture(%{count: 10}, current_user, pack)
shot_record_fixture(%{count: 10}, current_user, pack)
assert 30 = pack |> ActivityLog.get_used_count(current_user)
{1, [another_pack]} = pack_fixture(ammo_type, container, current_user)
{1, [another_pack]} = pack_fixture(type, container, current_user)
assert 0 = another_pack |> ActivityLog.get_used_count(current_user)
end
test "get_used_counts/2 returns accurate used counts", %{
pack: %{id: pack_id} = pack,
ammo_type: ammo_type,
type: type,
container: container,
current_user: current_user
} do
{1, [%{id: another_pack_id} = another_pack]} =
pack_fixture(ammo_type, container, current_user)
{1, [%{id: another_pack_id} = another_pack]} = pack_fixture(type, container, current_user)
assert %{pack_id => 5} ==
[pack, another_pack] |> ActivityLog.get_used_counts(current_user)
shot_group_fixture(%{count: 5}, current_user, another_pack)
shot_record_fixture(%{count: 5}, current_user, another_pack)
used_counts = [pack, another_pack] |> ActivityLog.get_used_counts(current_user)
assert %{^pack_id => 5} = used_counts
assert %{^another_pack_id => 5} = used_counts
shot_group_fixture(%{count: 15}, current_user, pack)
shot_record_fixture(%{count: 15}, current_user, pack)
used_counts = [pack, another_pack] |> ActivityLog.get_used_counts(current_user)
assert %{^pack_id => 20} = used_counts
assert %{^another_pack_id => 5} = used_counts
shot_group_fixture(%{count: 10}, current_user, pack)
shot_record_fixture(%{count: 10}, current_user, pack)
used_counts = [pack, another_pack] |> ActivityLog.get_used_counts(current_user)
assert %{^pack_id => 30} = used_counts
assert %{^another_pack_id => 5} = used_counts
@ -238,200 +237,196 @@ defmodule Cannery.ActivityLogTest do
test "get_last_used_date/2 returns accurate used count", %{
pack: pack,
ammo_type: ammo_type,
type: type,
container: container,
shot_group: %{date: date},
shot_record: %{date: date},
current_user: current_user
} do
{1, [another_pack]} = pack_fixture(ammo_type, container, current_user)
{1, [another_pack]} = pack_fixture(type, container, current_user)
assert another_pack |> ActivityLog.get_last_used_date(current_user) |> is_nil()
assert ^date = pack |> ActivityLog.get_last_used_date(current_user)
%{date: date} = shot_group_fixture(%{date: ~D[2022-11-10]}, current_user, pack)
%{date: date} = shot_record_fixture(%{date: ~D[2022-11-10]}, current_user, pack)
assert ^date = pack |> ActivityLog.get_last_used_date(current_user)
%{date: date} = shot_group_fixture(%{date: ~D[2022-11-11]}, current_user, pack)
%{date: date} = shot_record_fixture(%{date: ~D[2022-11-11]}, current_user, pack)
assert ^date = pack |> ActivityLog.get_last_used_date(current_user)
end
test "get_last_used_dates/2 returns accurate used counts", %{
pack: %{id: pack_id} = pack,
ammo_type: ammo_type,
type: type,
container: container,
shot_group: %{date: date},
shot_record: %{date: date},
current_user: current_user
} do
{1, [%{id: another_pack_id} = another_pack]} =
pack_fixture(ammo_type, container, current_user)
{1, [%{id: another_pack_id} = another_pack]} = pack_fixture(type, container, current_user)
# unset date
assert %{pack_id => date} ==
[pack, another_pack] |> ActivityLog.get_last_used_dates(current_user)
shot_group_fixture(%{date: ~D[2022-11-09]}, current_user, another_pack)
shot_record_fixture(%{date: ~D[2022-11-09]}, current_user, another_pack)
# setting initial date
last_used_shot_groups =
last_used_shot_records =
[pack, another_pack] |> ActivityLog.get_last_used_dates(current_user)
assert %{^pack_id => ^date} = last_used_shot_groups
assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_groups
assert %{^pack_id => ^date} = last_used_shot_records
assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_records
# setting another date
shot_group_fixture(%{date: ~D[2022-11-10]}, current_user, pack)
shot_record_fixture(%{date: ~D[2022-11-10]}, current_user, pack)
last_used_shot_groups =
last_used_shot_records =
[pack, another_pack] |> ActivityLog.get_last_used_dates(current_user)
assert %{^pack_id => ~D[2022-11-10]} = last_used_shot_groups
assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_groups
assert %{^pack_id => ~D[2022-11-10]} = last_used_shot_records
assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_records
# setting yet another date
shot_group_fixture(%{date: ~D[2022-11-11]}, current_user, pack)
shot_record_fixture(%{date: ~D[2022-11-11]}, current_user, pack)
last_used_shot_groups =
last_used_shot_records =
[pack, another_pack] |> ActivityLog.get_last_used_dates(current_user)
assert %{^pack_id => ~D[2022-11-11]} = last_used_shot_groups
assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_groups
assert %{^pack_id => ~D[2022-11-11]} = last_used_shot_records
assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_records
end
test "get_used_count_for_ammo_type/2 gets accurate used round count for ammo type",
%{ammo_type: ammo_type, pack: pack, current_user: current_user} do
another_ammo_type = ammo_type_fixture(current_user)
assert 0 = another_ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user)
assert 5 = ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user)
test "get_used_count_for_type/2 gets accurate used round count for type",
%{type: type, pack: pack, current_user: current_user} do
another_type = type_fixture(current_user)
assert 0 = another_type |> ActivityLog.get_used_count_for_type(current_user)
assert 5 = type |> ActivityLog.get_used_count_for_type(current_user)
shot_group_fixture(%{count: 5}, current_user, pack)
assert 10 = ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user)
shot_record_fixture(%{count: 5}, current_user, pack)
assert 10 = type |> ActivityLog.get_used_count_for_type(current_user)
shot_group_fixture(%{count: 1}, current_user, pack)
assert 11 = ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user)
shot_record_fixture(%{count: 1}, current_user, pack)
assert 11 = type |> ActivityLog.get_used_count_for_type(current_user)
end
test "get_used_count_for_ammo_types/2 gets accurate used round count for ammo types", %{
ammo_type: %{id: ammo_type_id} = ammo_type,
test "get_used_count_for_types/2 gets accurate used round count for types", %{
type: %{id: type_id} = type,
container: container,
current_user: current_user
} do
# testing unused ammo type
%{id: another_ammo_type_id} = another_ammo_type = ammo_type_fixture(current_user)
{1, [pack]} = pack_fixture(another_ammo_type, container, current_user)
# testing unused type
%{id: another_type_id} = another_type = type_fixture(current_user)
{1, [pack]} = pack_fixture(another_type, container, current_user)
assert %{ammo_type_id => 5} ==
[ammo_type, another_ammo_type]
|> ActivityLog.get_used_count_for_ammo_types(current_user)
assert %{type_id => 5} ==
[type, another_type]
|> ActivityLog.get_used_count_for_types(current_user)
# use generated pack
shot_group_fixture(%{count: 5}, current_user, pack)
shot_record_fixture(%{count: 5}, current_user, pack)
used_counts =
[ammo_type, another_ammo_type] |> ActivityLog.get_used_count_for_ammo_types(current_user)
used_counts = [type, another_type] |> ActivityLog.get_used_count_for_types(current_user)
assert %{^ammo_type_id => 5} = used_counts
assert %{^another_ammo_type_id => 5} = used_counts
assert %{^type_id => 5} = used_counts
assert %{^another_type_id => 5} = used_counts
# use generated pack again
shot_group_fixture(%{count: 1}, current_user, pack)
shot_record_fixture(%{count: 1}, current_user, pack)
used_counts =
[ammo_type, another_ammo_type] |> ActivityLog.get_used_count_for_ammo_types(current_user)
used_counts = [type, another_type] |> ActivityLog.get_used_count_for_types(current_user)
assert %{^ammo_type_id => 5} = used_counts
assert %{^another_ammo_type_id => 6} = used_counts
assert %{^type_id => 5} = used_counts
assert %{^another_type_id => 6} = used_counts
end
end
describe "list_shot_groups/3" do
describe "list_shot_records/3" do
setup do
current_user = user_fixture()
container = container_fixture(current_user)
ammo_type = ammo_type_fixture(current_user)
{1, [pack]} = pack_fixture(ammo_type, container, current_user)
type = type_fixture(current_user)
{1, [pack]} = pack_fixture(type, container, current_user)
[
current_user: current_user,
container: container,
ammo_type: ammo_type,
type: type,
pack: pack
]
end
test "list_shot_groups/3 returns relevant shot_groups for a type",
test "list_shot_records/3 returns relevant shot_records for a type",
%{current_user: current_user, container: container} do
other_user = user_fixture()
other_container = container_fixture(other_user)
for class <- ["rifle", "shotgun", "pistol"] do
other_ammo_type = ammo_type_fixture(%{class: class}, other_user)
{1, [other_pack]} = pack_fixture(other_ammo_type, other_container, other_user)
shot_group_fixture(other_user, other_pack)
other_type = type_fixture(%{class: class}, other_user)
{1, [other_pack]} = pack_fixture(other_type, other_container, other_user)
shot_record_fixture(other_user, other_pack)
end
rifle_ammo_type = ammo_type_fixture(%{class: :rifle}, current_user)
{1, [rifle_pack]} = pack_fixture(rifle_ammo_type, container, current_user)
rifle_shot_group = shot_group_fixture(current_user, rifle_pack)
rifle_type = type_fixture(%{class: :rifle}, current_user)
{1, [rifle_pack]} = pack_fixture(rifle_type, container, current_user)
rifle_shot_record = shot_record_fixture(current_user, rifle_pack)
shotgun_ammo_type = ammo_type_fixture(%{class: :shotgun}, current_user)
{1, [shotgun_pack]} = pack_fixture(shotgun_ammo_type, container, current_user)
shotgun_shot_group = shot_group_fixture(current_user, shotgun_pack)
shotgun_type = type_fixture(%{class: :shotgun}, current_user)
{1, [shotgun_pack]} = pack_fixture(shotgun_type, container, current_user)
shotgun_shot_record = shot_record_fixture(current_user, shotgun_pack)
pistol_ammo_type = ammo_type_fixture(%{class: :pistol}, current_user)
{1, [pistol_pack]} = pack_fixture(pistol_ammo_type, container, current_user)
pistol_shot_group = shot_group_fixture(current_user, pistol_pack)
pistol_type = type_fixture(%{class: :pistol}, current_user)
{1, [pistol_pack]} = pack_fixture(pistol_type, container, current_user)
pistol_shot_record = shot_record_fixture(current_user, pistol_pack)
assert [^rifle_shot_group] = ActivityLog.list_shot_groups(:rifle, current_user)
assert [^shotgun_shot_group] = ActivityLog.list_shot_groups(:shotgun, current_user)
assert [^pistol_shot_group] = ActivityLog.list_shot_groups(:pistol, current_user)
assert [^rifle_shot_record] = ActivityLog.list_shot_records(:rifle, current_user)
assert [^shotgun_shot_record] = ActivityLog.list_shot_records(:shotgun, current_user)
assert [^pistol_shot_record] = ActivityLog.list_shot_records(:pistol, current_user)
shot_groups = ActivityLog.list_shot_groups(:all, current_user)
assert Enum.count(shot_groups) == 3
assert rifle_shot_group in shot_groups
assert shotgun_shot_group in shot_groups
assert pistol_shot_group in shot_groups
shot_records = ActivityLog.list_shot_records(:all, current_user)
assert Enum.count(shot_records) == 3
assert rifle_shot_record in shot_records
assert shotgun_shot_record in shot_records
assert pistol_shot_record in shot_records
shot_groups = ActivityLog.list_shot_groups(nil, current_user)
assert Enum.count(shot_groups) == 3
assert rifle_shot_group in shot_groups
assert shotgun_shot_group in shot_groups
assert pistol_shot_group in shot_groups
shot_records = ActivityLog.list_shot_records(nil, current_user)
assert Enum.count(shot_records) == 3
assert rifle_shot_record in shot_records
assert shotgun_shot_record in shot_records
assert pistol_shot_record in shot_records
end
test "list_shot_groups/3 returns relevant shot_groups for a search", %{
ammo_type: ammo_type,
test "list_shot_records/3 returns relevant shot_records for a search", %{
type: type,
pack: pack,
container: container,
current_user: current_user
} do
shot_group_a = shot_group_fixture(%{notes: "amazing"}, current_user, pack)
shot_record_a = shot_record_fixture(%{notes: "amazing"}, current_user, pack)
{1, [another_pack]} =
pack_fixture(%{notes: "stupendous"}, ammo_type, container, current_user)
{1, [another_pack]} = pack_fixture(%{notes: "stupendous"}, type, container, current_user)
shot_group_b = shot_group_fixture(current_user, another_pack)
shot_record_b = shot_record_fixture(current_user, another_pack)
another_ammo_type = ammo_type_fixture(%{name: "fabulous ammo"}, current_user)
another_type = type_fixture(%{name: "fabulous ammo"}, current_user)
{1, [yet_another_pack]} = pack_fixture(another_ammo_type, container, current_user)
{1, [yet_another_pack]} = pack_fixture(another_type, container, current_user)
shot_group_c = shot_group_fixture(current_user, yet_another_pack)
shot_record_c = shot_record_fixture(current_user, yet_another_pack)
another_user = user_fixture()
another_container = container_fixture(another_user)
another_ammo_type = ammo_type_fixture(another_user)
another_type = type_fixture(another_user)
{1, [another_pack]} = pack_fixture(another_ammo_type, another_container, another_user)
{1, [another_pack]} = pack_fixture(another_type, another_container, another_user)
_shouldnt_return = shot_group_fixture(another_user, another_pack)
_shouldnt_return = shot_record_fixture(another_user, another_pack)
# notes
assert ActivityLog.list_shot_groups("amazing", :all, current_user) == [shot_group_a]
assert ActivityLog.list_shot_records("amazing", :all, current_user) == [shot_record_a]
# pack attributes
assert ActivityLog.list_shot_groups("stupendous", :all, current_user) == [shot_group_b]
assert ActivityLog.list_shot_records("stupendous", :all, current_user) == [shot_record_b]
# ammo type attributes
assert ActivityLog.list_shot_groups("fabulous", :all, current_user) == [shot_group_c]
# type attributes
assert ActivityLog.list_shot_records("fabulous", :all, current_user) == [shot_record_c]
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -11,19 +11,19 @@ defmodule CanneryWeb.ExportControllerTest do
setup [:register_and_log_in_user]
defp add_data(%{current_user: current_user}) do
ammo_type = ammo_type_fixture(current_user)
type = type_fixture(current_user)
container = container_fixture(current_user)
tag = tag_fixture(current_user)
Containers.add_tag!(container, tag, current_user)
{1, [pack]} = pack_fixture(ammo_type, container, current_user)
shot_group = shot_group_fixture(current_user, pack)
{1, [pack]} = pack_fixture(type, container, current_user)
shot_record = shot_record_fixture(current_user, pack)
pack = pack |> Repo.reload!()
%{
ammo_type: ammo_type,
type: type,
pack: pack,
container: container,
shot_group: shot_group,
shot_record: shot_record,
tag: tag
}
end
@ -35,15 +35,15 @@ defmodule CanneryWeb.ExportControllerTest do
conn: conn,
current_user: current_user,
container: container,
ammo_type: ammo_type,
type: type,
pack: pack,
shot_group: shot_group,
shot_record: shot_record,
tag: tag
} do
conn = get(conn, Routes.export_path(conn, :export, :json))
ideal_pack = %{
"ammo_type_id" => pack.ammo_type_id,
"type_id" => pack.type_id,
"container_id" => pack.container_id,
"count" => pack.count,
"id" => pack.id,
@ -56,34 +56,34 @@ defmodule CanneryWeb.ExportControllerTest do
"percentage_remaining" => pack |> Ammo.get_percentage_remaining(current_user)
}
ideal_ammo_type = %{
"blank" => ammo_type.blank,
"bullet_core" => ammo_type.bullet_core,
"bullet_type" => ammo_type.bullet_type,
"caliber" => ammo_type.caliber,
"cartridge" => ammo_type.cartridge,
"case_material" => ammo_type.case_material,
"corrosive" => ammo_type.corrosive,
"desc" => ammo_type.desc,
"firing_type" => ammo_type.firing_type,
"grains" => ammo_type.grains,
"id" => ammo_type.id,
"incendiary" => ammo_type.incendiary,
"jacket_type" => ammo_type.jacket_type,
"manufacturer" => ammo_type.manufacturer,
"muzzle_velocity" => ammo_type.muzzle_velocity,
"name" => ammo_type.name,
"powder_grains_per_charge" => ammo_type.powder_grains_per_charge,
"powder_type" => ammo_type.powder_type,
"pressure" => ammo_type.pressure,
"primer_type" => ammo_type.primer_type,
"tracer" => ammo_type.tracer,
"upc" => ammo_type.upc,
"average_cost" => ammo_type |> Ammo.get_average_cost_for_ammo_type(current_user),
"round_count" => ammo_type |> Ammo.get_round_count_for_ammo_type(current_user),
"used_count" => ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user),
"pack_count" => ammo_type |> Ammo.get_packs_count_for_type(current_user),
"total_pack_count" => ammo_type |> Ammo.get_packs_count_for_type(current_user, true)
ideal_type = %{
"blank" => type.blank,
"bullet_core" => type.bullet_core,
"bullet_type" => type.bullet_type,
"caliber" => type.caliber,
"cartridge" => type.cartridge,
"case_material" => type.case_material,
"corrosive" => type.corrosive,
"desc" => type.desc,
"firing_type" => type.firing_type,
"grains" => type.grains,
"id" => type.id,
"incendiary" => type.incendiary,
"jacket_type" => type.jacket_type,
"manufacturer" => type.manufacturer,
"muzzle_velocity" => type.muzzle_velocity,
"name" => type.name,
"powder_grains_per_charge" => type.powder_grains_per_charge,
"powder_type" => type.powder_type,
"pressure" => type.pressure,
"primer_type" => type.primer_type,
"tracer" => type.tracer,
"upc" => type.upc,
"average_cost" => type |> Ammo.get_average_cost_for_type(current_user),
"round_count" => type |> Ammo.get_round_count_for_type(current_user),
"used_count" => type |> ActivityLog.get_used_count_for_type(current_user),
"pack_count" => type |> Ammo.get_packs_count_for_type(current_user),
"total_pack_count" => type |> Ammo.get_packs_count_for_type(current_user, true)
}
ideal_container = %{
@ -104,12 +104,12 @@ defmodule CanneryWeb.ExportControllerTest do
"round_count" => container |> Ammo.get_round_count_for_container!(current_user)
}
ideal_shot_group = %{
"pack_id" => shot_group.pack_id,
"count" => shot_group.count,
"date" => to_string(shot_group.date),
"id" => shot_group.id,
"notes" => shot_group.notes
ideal_shot_record = %{
"pack_id" => shot_record.pack_id,
"count" => shot_record.count,
"date" => to_string(shot_record.date),
"id" => shot_record.id,
"notes" => shot_record.notes
}
ideal_user = %{
@ -125,9 +125,9 @@ defmodule CanneryWeb.ExportControllerTest do
json_resp = conn |> json_response(200)
assert %{"packs" => [^ideal_pack]} = json_resp
assert %{"ammo_types" => [^ideal_ammo_type]} = json_resp
assert %{"types" => [^ideal_type]} = json_resp
assert %{"containers" => [^ideal_container]} = json_resp
assert %{"shot_groups" => [^ideal_shot_group]} = json_resp
assert %{"shot_records" => [^ideal_shot_record]} = json_resp
assert %{"user" => ^ideal_user} = json_resp
end
end

View File

@ -1,400 +0,0 @@
defmodule CanneryWeb.AmmoTypeLiveTest do
@moduledoc """
Tests the ammo type liveview
"""
use CanneryWeb.ConnCase
import Phoenix.LiveViewTest
alias Cannery.{Ammo, Repo}
@moduletag :ammo_type_live_test
@create_attrs %{
bullet_type: "some bullet_type",
case_material: "some case_material",
desc: "some desc",
manufacturer: "some manufacturer",
name: "some name",
grains: 120
}
@update_attrs %{
bullet_type: "some updated bullet_type",
case_material: "some updated case_material",
desc: "some updated desc",
manufacturer: "some updated manufacturer",
name: "some updated name",
grains: 456
}
@invalid_attrs %{
bullet_type: nil,
case_material: nil,
desc: nil,
manufacturer: nil,
name: nil,
grains: nil
}
@pack_attrs %{
notes: "some pack",
count: 20
}
@shot_group_attrs %{
notes: "some shot group",
count: 20
}
defp create_ammo_type(%{current_user: current_user}) do
[ammo_type: ammo_type_fixture(@create_attrs, current_user)]
end
defp create_pack(%{ammo_type: ammo_type, current_user: current_user}) do
container = container_fixture(current_user)
{1, [pack]} = pack_fixture(@pack_attrs, ammo_type, container, current_user)
[pack: pack, container: container]
end
defp create_empty_pack(%{ammo_type: ammo_type, current_user: current_user}) do
container = container_fixture(current_user)
{1, [pack]} = pack_fixture(@pack_attrs, ammo_type, container, current_user)
shot_group = shot_group_fixture(@shot_group_attrs, current_user, pack)
pack = pack |> Repo.reload!()
[pack: pack, container: container, shot_group: shot_group]
end
describe "Index" do
setup [:register_and_log_in_user, :create_ammo_type]
test "lists all ammo_types", %{conn: conn, ammo_type: ammo_type} do
{:ok, _index_live, html} = live(conn, Routes.ammo_type_index_path(conn, :index))
assert html =~ "Catalog"
assert html =~ ammo_type.bullet_type
end
test "can sort by class", %{conn: conn, current_user: current_user} do
rifle_type = ammo_type_fixture(%{class: :rifle}, current_user)
shotgun_type = ammo_type_fixture(%{class: :shotgun}, current_user)
pistol_type = ammo_type_fixture(%{class: :pistol}, current_user)
{:ok, index_live, html} = live(conn, Routes.ammo_type_index_path(conn, :index))
assert html =~ "All"
assert html =~ rifle_type.name
assert html =~ shotgun_type.name
assert html =~ pistol_type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :rifle})
assert html =~ rifle_type.name
refute html =~ shotgun_type.name
refute html =~ pistol_type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :shotgun})
refute html =~ rifle_type.name
assert html =~ shotgun_type.name
refute html =~ pistol_type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :pistol})
refute html =~ rifle_type.name
refute html =~ shotgun_type.name
assert html =~ pistol_type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :all})
assert html =~ rifle_type.name
assert html =~ shotgun_type.name
assert html =~ pistol_type.name
end
test "can search for ammo_type", %{conn: conn, ammo_type: ammo_type} do
{:ok, index_live, html} = live(conn, Routes.ammo_type_index_path(conn, :index))
assert html =~ ammo_type.bullet_type
assert index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: ammo_type.bullet_type}) =~
ammo_type.bullet_type
assert_patch(index_live, Routes.ammo_type_index_path(conn, :search, ammo_type.bullet_type))
refute index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: "something_else"}) =~ ammo_type.bullet_type
assert_patch(index_live, Routes.ammo_type_index_path(conn, :search, "something_else"))
assert index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: ""}) =~ ammo_type.bullet_type
assert_patch(index_live, Routes.ammo_type_index_path(conn, :index))
end
test "saves new ammo_type", %{conn: conn, current_user: current_user, ammo_type: ammo_type} do
{:ok, index_live, _html} = live(conn, Routes.ammo_type_index_path(conn, :index))
assert index_live |> element("a", "New Ammo type") |> render_click() =~ "New Ammo type"
assert_patch(index_live, Routes.ammo_type_index_path(conn, :new))
assert index_live
|> form("#ammo_type-form")
|> render_change(ammo_type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#ammo_type-form")
|> render_submit(ammo_type: @create_attrs)
|> follow_redirect(conn, Routes.ammo_type_index_path(conn, :index))
ammo_type = ammo_type.id |> Ammo.get_ammo_type!(current_user)
assert html =~ "#{ammo_type.name} created successfully"
assert html =~ "some bullet_type"
end
test "updates ammo_type in listing",
%{conn: conn, current_user: current_user, ammo_type: ammo_type} do
{:ok, index_live, _html} = live(conn, Routes.ammo_type_index_path(conn, :index))
assert index_live |> element(~s/a[aria-label="Edit #{ammo_type.name}"]/) |> render_click() =~
"Edit #{ammo_type.name}"
assert_patch(index_live, Routes.ammo_type_index_path(conn, :edit, ammo_type))
assert index_live
|> form("#ammo_type-form")
|> render_change(ammo_type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#ammo_type-form")
|> render_submit(ammo_type: @update_attrs)
|> follow_redirect(conn, Routes.ammo_type_index_path(conn, :index))
ammo_type = ammo_type.id |> Ammo.get_ammo_type!(current_user)
assert html =~ "#{ammo_type.name} updated successfully"
assert html =~ "some updated bullet_type"
end
test "clones ammo_type in listing",
%{conn: conn, current_user: current_user, ammo_type: ammo_type} do
{:ok, index_live, _html} = live(conn, Routes.ammo_type_index_path(conn, :index))
html = index_live |> element(~s/a[aria-label="Clone #{ammo_type.name}"]/) |> render_click()
assert html =~ "New Ammo type"
assert html =~ "some bullet_type"
assert_patch(index_live, Routes.ammo_type_index_path(conn, :clone, ammo_type))
assert index_live
|> form("#ammo_type-form")
|> render_change(ammo_type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#ammo_type-form")
|> render_submit(ammo_type: @create_attrs)
|> follow_redirect(conn, Routes.ammo_type_index_path(conn, :index))
ammo_type = ammo_type.id |> Ammo.get_ammo_type!(current_user)
assert html =~ "#{ammo_type.name} created successfully"
assert html =~ "some bullet_type"
end
test "clones ammo_type in listing with updates",
%{conn: conn, current_user: current_user, ammo_type: ammo_type} do
{:ok, index_live, _html} = live(conn, Routes.ammo_type_index_path(conn, :index))
html = index_live |> element(~s/a[aria-label="Clone #{ammo_type.name}"]/) |> render_click()
assert html =~ "New Ammo type"
assert html =~ "some bullet_type"
assert_patch(index_live, Routes.ammo_type_index_path(conn, :clone, ammo_type))
assert index_live
|> form("#ammo_type-form")
|> render_change(ammo_type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#ammo_type-form")
|> render_submit(
ammo_type: Map.merge(@create_attrs, %{bullet_type: "some updated bullet_type"})
)
|> follow_redirect(conn, Routes.ammo_type_index_path(conn, :index))
ammo_type = ammo_type.id |> Ammo.get_ammo_type!(current_user)
assert html =~ "#{ammo_type.name} created successfully"
assert html =~ "some updated bullet_type"
end
test "deletes ammo_type in listing", %{conn: conn, ammo_type: ammo_type} do
{:ok, index_live, _html} = live(conn, Routes.ammo_type_index_path(conn, :index))
assert index_live |> element(~s/a[aria-label="Delete #{ammo_type.name}"]/) |> render_click()
refute has_element?(index_live, "#ammo_type-#{ammo_type.id}")
end
end
describe "Index with pack" do
setup [:register_and_log_in_user, :create_ammo_type, :create_pack]
test "shows used packs on toggle",
%{conn: conn, pack: pack, current_user: current_user} do
{:ok, index_live, html} = live(conn, Routes.ammo_type_index_path(conn, :index))
assert html =~ "Show used"
refute html =~ "Used rounds"
refute html =~ "Total ever rounds"
refute html =~ "Used packs"
refute html =~ "Total ever packs"
html =
index_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_show_used-label"}]/)
|> render_click()
assert html =~ "Used rounds"
assert html =~ "Total ever rounds"
assert html =~ "Used packs"
assert html =~ "Total ever packs"
assert html =~ "\n20\n"
assert html =~ "\n0\n"
assert html =~ "\n1\n"
shot_group_fixture(%{count: 5}, current_user, pack)
{:ok, index_live, _html} = live(conn, Routes.ammo_type_index_path(conn, :index))
html =
index_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_show_used-label"}]/)
|> render_click()
assert html =~ "\n15\n"
assert html =~ "\n5\n"
end
end
describe "Show ammo type" do
setup [:register_and_log_in_user, :create_ammo_type]
test "displays ammo_type", %{
conn: conn,
ammo_type: %{name: name, bullet_type: bullet_type} = ammo_type
} do
{:ok, _show_live, html} = live(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))
assert html =~ name
assert html =~ bullet_type
end
test "updates ammo_type within modal",
%{conn: conn, current_user: current_user, ammo_type: %{name: name} = ammo_type} do
{:ok, show_live, _html} = live(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))
assert show_live |> element(~s/a[aria-label="Edit #{ammo_type.name}"]/) |> render_click() =~
"Edit #{name}"
assert_patch(show_live, Routes.ammo_type_show_path(conn, :edit, ammo_type))
assert show_live
|> form("#ammo_type-form")
|> render_change(ammo_type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
show_live
|> form("#ammo_type-form")
|> render_submit(ammo_type: @update_attrs)
|> follow_redirect(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))
ammo_type = ammo_type.id |> Ammo.get_ammo_type!(current_user)
assert html =~ "#{ammo_type.name} updated successfully"
assert html =~ "some updated bullet_type"
end
end
describe "Show ammo type with pack" do
setup [:register_and_log_in_user, :create_ammo_type, :create_pack]
test "displays pack", %{
conn: conn,
ammo_type: %{name: ammo_type_name} = ammo_type,
container: %{name: container_name}
} do
{:ok, _show_live, html} = live(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))
assert html =~ ammo_type_name
assert html =~ "\n20\n"
assert html =~ container_name
end
test "displays pack in table",
%{conn: conn, ammo_type: ammo_type, container: %{name: container_name}} do
{:ok, show_live, _html} = live(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))
html =
show_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_table-label"}]/)
|> render_click()
assert html =~ "\n20\n"
assert html =~ container_name
end
end
describe "Show ammo type with empty pack" do
setup [:register_and_log_in_user, :create_ammo_type, :create_empty_pack]
test "displays empty packs on toggle",
%{conn: conn, ammo_type: ammo_type, container: %{name: container_name}} do
{:ok, show_live, html} = live(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))
assert html =~ "Show used"
refute html =~ "\n20\n"
html =
show_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_show_used-label"}]/)
|> render_click()
assert html =~ "\n20\n"
assert html =~ "Empty"
assert html =~ container_name
end
test "displays empty packs in table on toggle",
%{conn: conn, ammo_type: ammo_type, container: %{name: container_name}} do
{:ok, show_live, _html} = live(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))
html =
show_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_table-label"}]/)
|> render_click()
assert html =~ "Show used"
refute html =~ "\n20\n"
html =
show_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_show_used-label"}]/)
|> render_click()
assert html =~ "\n20\n"
assert html =~ "Empty"
assert html =~ container_name
end
end
end

View File

@ -22,7 +22,7 @@ defmodule CanneryWeb.ContainerLiveTest do
type: "some updated type"
}
@invalid_attrs %{desc: nil, location: nil, name: nil, type: nil}
@ammo_type_attrs %{
@type_attrs %{
bullet_type: "some bullet_type",
case_material: "some case_material",
desc: "some desc",
@ -41,10 +41,10 @@ defmodule CanneryWeb.ContainerLiveTest do
end
defp create_pack(%{container: container, current_user: current_user}) do
ammo_type = ammo_type_fixture(@ammo_type_attrs, current_user)
{1, [pack]} = pack_fixture(@pack_attrs, ammo_type, container, current_user)
type = type_fixture(@type_attrs, current_user)
{1, [pack]} = pack_fixture(@pack_attrs, type, container, current_user)
[ammo_type: ammo_type, pack: pack]
[type: type, pack: pack]
end
describe "Index" do
@ -245,56 +245,56 @@ defmodule CanneryWeb.ContainerLiveTest do
test "can sort by type",
%{conn: conn, container: container, current_user: current_user} do
rifle_type = ammo_type_fixture(%{class: :rifle}, current_user)
rifle_type = type_fixture(%{class: :rifle}, current_user)
{1, [rifle_pack]} = pack_fixture(rifle_type, container, current_user)
shotgun_type = ammo_type_fixture(%{class: :shotgun}, current_user)
shotgun_type = type_fixture(%{class: :shotgun}, current_user)
{1, [shotgun_pack]} = pack_fixture(shotgun_type, container, current_user)
pistol_type = ammo_type_fixture(%{class: :pistol}, current_user)
pistol_type = type_fixture(%{class: :pistol}, current_user)
{1, [pistol_pack]} = pack_fixture(pistol_type, container, current_user)
{:ok, index_live, html} = live(conn, Routes.container_show_path(conn, :show, container))
assert html =~ "All"
assert html =~ rifle_pack.ammo_type.name
assert html =~ shotgun_pack.ammo_type.name
assert html =~ pistol_pack.ammo_type.name
assert html =~ rifle_pack.type.name
assert html =~ shotgun_pack.type.name
assert html =~ pistol_pack.type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :rifle})
|> render_change(type: %{class: :rifle})
assert html =~ rifle_pack.ammo_type.name
refute html =~ shotgun_pack.ammo_type.name
refute html =~ pistol_pack.ammo_type.name
assert html =~ rifle_pack.type.name
refute html =~ shotgun_pack.type.name
refute html =~ pistol_pack.type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :shotgun})
|> render_change(type: %{class: :shotgun})
refute html =~ rifle_pack.ammo_type.name
assert html =~ shotgun_pack.ammo_type.name
refute html =~ pistol_pack.ammo_type.name
refute html =~ rifle_pack.type.name
assert html =~ shotgun_pack.type.name
refute html =~ pistol_pack.type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :pistol})
|> render_change(type: %{class: :pistol})
refute html =~ rifle_pack.ammo_type.name
refute html =~ shotgun_pack.ammo_type.name
assert html =~ pistol_pack.ammo_type.name
refute html =~ rifle_pack.type.name
refute html =~ shotgun_pack.type.name
assert html =~ pistol_pack.type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :all})
|> render_change(type: %{class: :all})
assert html =~ rifle_pack.ammo_type.name
assert html =~ shotgun_pack.ammo_type.name
assert html =~ pistol_pack.ammo_type.name
assert html =~ rifle_pack.type.name
assert html =~ shotgun_pack.type.name
assert html =~ pistol_pack.type.name
end
end
@ -302,15 +302,15 @@ defmodule CanneryWeb.ContainerLiveTest do
setup [:register_and_log_in_user, :create_container, :create_pack]
test "displays pack",
%{conn: conn, ammo_type: %{name: ammo_type_name}, container: container} do
%{conn: conn, type: %{name: type_name}, container: container} do
{:ok, _show_live, html} = live(conn, Routes.container_show_path(conn, :show, container))
assert html =~ ammo_type_name
assert html =~ type_name
assert html =~ "\n20\n"
end
test "displays pack in table",
%{conn: conn, ammo_type: %{name: ammo_type_name}, container: container} do
%{conn: conn, type: %{name: type_name}, container: container} do
{:ok, show_live, _html} = live(conn, Routes.container_show_path(conn, :show, container))
html =
@ -318,7 +318,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_table-label"}]/)
|> render_click()
assert html =~ ammo_type_name
assert html =~ type_name
assert html =~ "\n20\n"
end
end

View File

@ -12,44 +12,44 @@ defmodule CanneryWeb.PackLiveTest do
@update_attrs %{count: 43, notes: "some updated notes", price_paid: 456.7}
@invalid_attrs %{count: nil, notes: nil, price_paid: nil}
@pack_create_limit 10_000
@shot_group_create_attrs %{ammo_left: 5, notes: "some notes"}
@shot_group_update_attrs %{
@shot_record_create_attrs %{ammo_left: 5, notes: "some notes"}
@shot_record_update_attrs %{
count: 5,
date: ~N[2022-02-13 03:17:00],
notes: "some updated notes"
}
@shot_group_invalid_attrs %{ammo_left: nil, count: nil, notes: nil}
@shot_record_invalid_attrs %{ammo_left: nil, count: nil, notes: nil}
@empty_attrs %{
price_paid: 50,
count: 20
}
@shot_group_attrs %{
@shot_record_attrs %{
price_paid: 50,
count: 20
}
defp create_pack(%{current_user: current_user}) do
ammo_type = ammo_type_fixture(current_user)
type = type_fixture(current_user)
container = container_fixture(current_user)
{1, [pack]} = pack_fixture(@create_attrs, ammo_type, container, current_user)
[ammo_type: ammo_type, pack: pack, container: container]
{1, [pack]} = pack_fixture(@create_attrs, type, container, current_user)
[type: type, pack: pack, container: container]
end
defp create_shot_group(%{current_user: current_user, pack: pack}) do
shot_group = shot_group_fixture(@shot_group_update_attrs, current_user, pack)
defp create_shot_record(%{current_user: current_user, pack: pack}) do
shot_record = shot_record_fixture(@shot_record_update_attrs, current_user, pack)
pack = pack |> Repo.reload!()
[pack: pack, shot_group: shot_group]
[pack: pack, shot_record: shot_record]
end
defp create_empty_pack(%{
current_user: current_user,
ammo_type: ammo_type,
type: type,
container: container
}) do
{1, [pack]} = pack_fixture(@empty_attrs, ammo_type, container, current_user)
shot_group = shot_group_fixture(@shot_group_attrs, current_user, pack)
{1, [pack]} = pack_fixture(@empty_attrs, type, container, current_user)
shot_record = shot_record_fixture(@shot_record_attrs, current_user, pack)
pack = pack |> Repo.reload!()
[empty_pack: pack, shot_group: shot_group]
[empty_pack: pack, shot_record: shot_record]
end
describe "Index of pack" do
@ -57,92 +57,92 @@ defmodule CanneryWeb.PackLiveTest do
test "lists all packs", %{conn: conn, pack: pack} do
{:ok, _index_live, html} = live(conn, Routes.pack_index_path(conn, :index))
pack = pack |> Repo.preload(:ammo_type)
pack = pack |> Repo.preload(:type)
assert html =~ "Ammo"
assert html =~ pack.ammo_type.name
assert html =~ pack.type.name
end
test "can sort by type",
%{conn: conn, container: container, current_user: current_user} do
rifle_type = ammo_type_fixture(%{class: :rifle}, current_user)
rifle_type = type_fixture(%{class: :rifle}, current_user)
{1, [rifle_pack]} = pack_fixture(rifle_type, container, current_user)
shotgun_type = ammo_type_fixture(%{class: :shotgun}, current_user)
shotgun_type = type_fixture(%{class: :shotgun}, current_user)
{1, [shotgun_pack]} = pack_fixture(shotgun_type, container, current_user)
pistol_type = ammo_type_fixture(%{class: :pistol}, current_user)
pistol_type = type_fixture(%{class: :pistol}, current_user)
{1, [pistol_pack]} = pack_fixture(pistol_type, container, current_user)
{:ok, index_live, html} = live(conn, Routes.pack_index_path(conn, :index))
assert html =~ "All"
assert html =~ rifle_pack.ammo_type.name
assert html =~ shotgun_pack.ammo_type.name
assert html =~ pistol_pack.ammo_type.name
assert html =~ rifle_pack.type.name
assert html =~ shotgun_pack.type.name
assert html =~ pistol_pack.type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :rifle})
|> render_change(type: %{class: :rifle})
assert html =~ rifle_pack.ammo_type.name
refute html =~ shotgun_pack.ammo_type.name
refute html =~ pistol_pack.ammo_type.name
assert html =~ rifle_pack.type.name
refute html =~ shotgun_pack.type.name
refute html =~ pistol_pack.type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :shotgun})
|> render_change(type: %{class: :shotgun})
refute html =~ rifle_pack.ammo_type.name
assert html =~ shotgun_pack.ammo_type.name
refute html =~ pistol_pack.ammo_type.name
refute html =~ rifle_pack.type.name
assert html =~ shotgun_pack.type.name
refute html =~ pistol_pack.type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :pistol})
|> render_change(type: %{class: :pistol})
refute html =~ rifle_pack.ammo_type.name
refute html =~ shotgun_pack.ammo_type.name
assert html =~ pistol_pack.ammo_type.name
refute html =~ rifle_pack.type.name
refute html =~ shotgun_pack.type.name
assert html =~ pistol_pack.type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :all})
|> render_change(type: %{class: :all})
assert html =~ rifle_pack.ammo_type.name
assert html =~ shotgun_pack.ammo_type.name
assert html =~ pistol_pack.ammo_type.name
assert html =~ rifle_pack.type.name
assert html =~ shotgun_pack.type.name
assert html =~ pistol_pack.type.name
end
test "can search for packs", %{conn: conn, pack: pack} do
{:ok, index_live, html} = live(conn, Routes.pack_index_path(conn, :index))
pack = pack |> Repo.preload(:ammo_type)
pack = pack |> Repo.preload(:type)
assert html =~ pack.ammo_type.name
assert html =~ pack.type.name
assert index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: pack.ammo_type.name}) =~
pack.ammo_type.name
|> render_change(search: %{search_term: pack.type.name}) =~
pack.type.name
assert_patch(
index_live,
Routes.pack_index_path(conn, :search, pack.ammo_type.name)
Routes.pack_index_path(conn, :search, pack.type.name)
)
refute index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: "something_else"}) =~
pack.ammo_type.name
pack.type.name
assert_patch(index_live, Routes.pack_index_path(conn, :search, "something_else"))
assert index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: ""}) =~ pack.ammo_type.name
|> render_change(search: %{search_term: ""}) =~ pack.type.name
assert_patch(index_live, Routes.pack_index_path(conn, :index))
end
@ -311,20 +311,20 @@ defmodule CanneryWeb.PackLiveTest do
refute has_element?(index_live, "#pack-#{pack.id}")
end
test "saves new shot_group", %{conn: conn, pack: pack} do
test "saves new shot_record", %{conn: conn, pack: pack} do
{:ok, index_live, _html} = live(conn, Routes.pack_index_path(conn, :index))
assert index_live |> element("a", "Record shots") |> render_click() =~ "Record shots"
assert_patch(index_live, Routes.pack_index_path(conn, :add_shot_group, pack))
assert_patch(index_live, Routes.pack_index_path(conn, :add_shot_record, pack))
assert index_live
|> form("#shot-group-form")
|> render_change(shot_group: @shot_group_invalid_attrs) =~ "can&#39;t be blank"
|> form("#shot-record-form")
|> render_change(shot_record: @shot_record_invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#shot-group-form")
|> render_submit(shot_group: @shot_group_create_attrs)
|> form("#shot-record-form")
|> render_submit(shot_record: @shot_record_create_attrs)
|> follow_redirect(conn, Routes.pack_index_path(conn, :index))
assert html =~ "Shots recorded successfully"
@ -366,9 +366,9 @@ defmodule CanneryWeb.PackLiveTest do
test "displays pack", %{conn: conn, pack: pack} do
{:ok, _show_live, html} = live(conn, Routes.pack_show_path(conn, :show, pack))
pack = pack |> Repo.preload(:ammo_type)
pack = pack |> Repo.preload(:type)
assert html =~ "Show Ammo"
assert html =~ pack.ammo_type.name
assert html =~ pack.type.name
end
test "updates pack within modal", %{conn: conn, pack: pack} do
@ -394,66 +394,66 @@ defmodule CanneryWeb.PackLiveTest do
assert html =~ "some updated notes"
end
test "saves new shot_group", %{conn: conn, pack: pack} do
test "saves new shot_record", %{conn: conn, pack: pack} do
{:ok, index_live, _html} = live(conn, Routes.pack_show_path(conn, :show, pack))
assert index_live |> element("a", "Record shots") |> render_click() =~ "Record shots"
assert_patch(index_live, Routes.pack_show_path(conn, :add_shot_group, pack))
assert_patch(index_live, Routes.pack_show_path(conn, :add_shot_record, pack))
assert index_live
|> form("#shot-group-form")
|> render_change(shot_group: @shot_group_invalid_attrs) =~ "can&#39;t be blank"
|> form("#shot-record-form")
|> render_change(shot_record: @shot_record_invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#shot-group-form")
|> render_submit(shot_group: @shot_group_create_attrs)
|> form("#shot-record-form")
|> render_submit(shot_record: @shot_record_create_attrs)
|> follow_redirect(conn, Routes.pack_show_path(conn, :show, pack))
assert html =~ "Shots recorded successfully"
end
end
describe "Show pack with shot group" do
setup [:register_and_log_in_user, :create_pack, :create_shot_group]
describe "Show pack with shot record" do
setup [:register_and_log_in_user, :create_pack, :create_shot_record]
test "updates shot_group in listing",
%{conn: conn, pack: pack, shot_group: shot_group} do
test "updates shot_record in listing",
%{conn: conn, pack: pack, shot_record: shot_record} do
{:ok, index_live, _html} = live(conn, Routes.pack_show_path(conn, :edit, pack))
assert index_live
|> element(~s/a[aria-label="Edit shot group of #{shot_group.count} shots"]/)
|> render_click() =~ "Edit Shot Records"
|> element(~s/a[aria-label="Edit shot record of #{shot_record.count} shots"]/)
|> render_click() =~ "Edit Shot Record"
assert_patch(
index_live,
Routes.pack_show_path(conn, :edit_shot_group, pack, shot_group)
Routes.pack_show_path(conn, :edit_shot_record, pack, shot_record)
)
assert index_live
|> form("#shot-group-form")
|> render_change(shot_group: @shot_group_invalid_attrs) =~ "can&#39;t be blank"
|> form("#shot-record-form")
|> render_change(shot_record: @shot_record_invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#shot-group-form")
|> render_submit(shot_group: @shot_group_update_attrs)
|> form("#shot-record-form")
|> render_submit(shot_record: @shot_record_update_attrs)
|> follow_redirect(conn, Routes.pack_show_path(conn, :show, pack))
assert html =~ "Shot records updated successfully"
assert html =~ "some updated notes"
end
test "deletes shot_group in listing",
%{conn: conn, pack: pack, shot_group: shot_group} do
test "deletes shot_record in listing",
%{conn: conn, pack: pack, shot_record: shot_record} do
{:ok, index_live, _html} =
live(conn, Routes.pack_show_path(conn, :edit_shot_group, pack, shot_group))
live(conn, Routes.pack_show_path(conn, :edit_shot_record, pack, shot_record))
assert index_live
|> element(~s/a[aria-label="Delete shot record of #{shot_group.count} shots"]/)
|> element(~s/a[aria-label="Delete shot record of #{shot_record.count} shots"]/)
|> render_click()
refute has_element?(index_live, "#shot_group-#{shot_group.id}")
refute has_element?(index_live, "#shot_record-#{shot_record.id}")
end
end
end

View File

@ -12,156 +12,156 @@ defmodule CanneryWeb.RangeLiveTest do
@update_attrs %{count: 16, notes: "some updated notes"}
@invalid_attrs %{count: nil, notes: nil}
defp create_shot_group(%{current_user: current_user}) do
defp create_shot_record(%{current_user: current_user}) do
container = container_fixture(%{staged: true}, current_user)
ammo_type = ammo_type_fixture(current_user)
type = type_fixture(current_user)
{1, [pack]} = pack_fixture(%{staged: true}, ammo_type, container, current_user)
{1, [pack]} = pack_fixture(%{staged: true}, type, container, current_user)
shot_group =
shot_record =
%{count: 5, date: ~N[2022-02-13 03:17:00], notes: "some notes"}
|> shot_group_fixture(current_user, pack)
|> shot_record_fixture(current_user, pack)
[
container: container,
ammo_type: ammo_type,
type: type,
pack: pack,
shot_group: shot_group
shot_record: shot_record
]
end
describe "Index" do
setup [:register_and_log_in_user, :create_shot_group]
setup [:register_and_log_in_user, :create_shot_record]
test "lists all shot_groups", %{conn: conn, shot_group: shot_group} do
test "lists all shot_records", %{conn: conn, shot_record: shot_record} do
{:ok, _index_live, html} = live(conn, Routes.range_index_path(conn, :index))
assert html =~ "Range day"
assert html =~ shot_group.notes
assert html =~ shot_record.notes
end
test "can sort by type",
%{conn: conn, container: container, current_user: current_user} do
rifle_ammo_type = ammo_type_fixture(%{class: :rifle}, current_user)
{1, [rifle_pack]} = pack_fixture(rifle_ammo_type, container, current_user)
rifle_type = type_fixture(%{class: :rifle}, current_user)
{1, [rifle_pack]} = pack_fixture(rifle_type, container, current_user)
rifle_shot_group = shot_group_fixture(%{notes: "group_one"}, current_user, rifle_pack)
rifle_shot_record = shot_record_fixture(%{notes: "group_one"}, current_user, rifle_pack)
shotgun_ammo_type = ammo_type_fixture(%{class: :shotgun}, current_user)
{1, [shotgun_pack]} = pack_fixture(shotgun_ammo_type, container, current_user)
shotgun_type = type_fixture(%{class: :shotgun}, current_user)
{1, [shotgun_pack]} = pack_fixture(shotgun_type, container, current_user)
shotgun_shot_group = shot_group_fixture(%{notes: "group_two"}, current_user, shotgun_pack)
shotgun_shot_record = shot_record_fixture(%{notes: "group_two"}, current_user, shotgun_pack)
pistol_ammo_type = ammo_type_fixture(%{class: :pistol}, current_user)
{1, [pistol_pack]} = pack_fixture(pistol_ammo_type, container, current_user)
pistol_type = type_fixture(%{class: :pistol}, current_user)
{1, [pistol_pack]} = pack_fixture(pistol_type, container, current_user)
pistol_shot_group = shot_group_fixture(%{notes: "group_three"}, current_user, pistol_pack)
pistol_shot_record = shot_record_fixture(%{notes: "group_three"}, current_user, pistol_pack)
{:ok, index_live, html} = live(conn, Routes.range_index_path(conn, :index))
assert html =~ "All"
assert html =~ rifle_shot_group.notes
assert html =~ shotgun_shot_group.notes
assert html =~ pistol_shot_group.notes
assert html =~ rifle_shot_record.notes
assert html =~ shotgun_shot_record.notes
assert html =~ pistol_shot_record.notes
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :rifle})
|> render_change(type: %{class: :rifle})
assert html =~ rifle_shot_group.notes
refute html =~ shotgun_shot_group.notes
refute html =~ pistol_shot_group.notes
assert html =~ rifle_shot_record.notes
refute html =~ shotgun_shot_record.notes
refute html =~ pistol_shot_record.notes
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :shotgun})
|> render_change(type: %{class: :shotgun})
refute html =~ rifle_shot_group.notes
assert html =~ shotgun_shot_group.notes
refute html =~ pistol_shot_group.notes
refute html =~ rifle_shot_record.notes
assert html =~ shotgun_shot_record.notes
refute html =~ pistol_shot_record.notes
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :pistol})
|> render_change(type: %{class: :pistol})
refute html =~ rifle_shot_group.notes
refute html =~ shotgun_shot_group.notes
assert html =~ pistol_shot_group.notes
refute html =~ rifle_shot_record.notes
refute html =~ shotgun_shot_record.notes
assert html =~ pistol_shot_record.notes
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :all})
|> render_change(type: %{class: :all})
assert html =~ rifle_shot_group.notes
assert html =~ shotgun_shot_group.notes
assert html =~ pistol_shot_group.notes
assert html =~ rifle_shot_record.notes
assert html =~ shotgun_shot_record.notes
assert html =~ pistol_shot_record.notes
end
test "can search for shot_group", %{conn: conn, shot_group: shot_group} do
test "can search for shot_record", %{conn: conn, shot_record: shot_record} do
{:ok, index_live, html} = live(conn, Routes.range_index_path(conn, :index))
assert html =~ shot_group.notes
assert html =~ shot_record.notes
assert index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: shot_group.notes}) =~ shot_group.notes
|> render_change(search: %{search_term: shot_record.notes}) =~ shot_record.notes
assert_patch(index_live, Routes.range_index_path(conn, :search, shot_group.notes))
assert_patch(index_live, Routes.range_index_path(conn, :search, shot_record.notes))
refute index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: "something_else"}) =~ shot_group.notes
|> render_change(search: %{search_term: "something_else"}) =~ shot_record.notes
assert_patch(index_live, Routes.range_index_path(conn, :search, "something_else"))
assert index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: ""}) =~ shot_group.notes
|> render_change(search: %{search_term: ""}) =~ shot_record.notes
assert_patch(index_live, Routes.range_index_path(conn, :index))
end
test "saves new shot_group", %{conn: conn, pack: pack} do
test "saves new shot_record", %{conn: conn, pack: pack} do
{:ok, index_live, _html} = live(conn, Routes.range_index_path(conn, :index))
assert index_live |> element("a", "Record shots") |> render_click() =~ "Record shots"
assert_patch(index_live, Routes.range_index_path(conn, :add_shot_group, pack))
assert_patch(index_live, Routes.range_index_path(conn, :add_shot_record, pack))
assert index_live
|> form("#shot-group-form")
|> render_change(shot_group: @invalid_attrs) =~ "can&#39;t be blank"
|> form("#shot-record-form")
|> render_change(shot_record: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#shot-group-form")
|> render_submit(shot_group: @create_attrs)
|> form("#shot-record-form")
|> render_submit(shot_record: @create_attrs)
|> follow_redirect(conn, Routes.range_index_path(conn, :index))
assert html =~ "Shots recorded successfully"
assert html =~ "some notes"
end
test "updates shot_group in listing", %{conn: conn, shot_group: shot_group} do
test "updates shot_record in listing", %{conn: conn, shot_record: shot_record} do
{:ok, index_live, _html} = live(conn, Routes.range_index_path(conn, :index))
assert index_live
|> element(~s/a[aria-label="Edit shot record of #{shot_group.count} shots"]/)
|> render_click() =~ "Edit Shot Records"
|> element(~s/a[aria-label="Edit shot record of #{shot_record.count} shots"]/)
|> render_click() =~ "Edit Shot Record"
assert_patch(index_live, Routes.range_index_path(conn, :edit, shot_group))
assert_patch(index_live, Routes.range_index_path(conn, :edit, shot_record))
assert index_live
|> form("#shot-group-form")
|> render_change(shot_group: @invalid_attrs) =~ "can&#39;t be blank"
|> form("#shot-record-form")
|> render_change(shot_record: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#shot-group-form", shot_group: @update_attrs)
|> form("#shot-record-form", shot_record: @update_attrs)
|> render_submit()
|> follow_redirect(conn, Routes.range_index_path(conn, :index))
@ -169,14 +169,14 @@ defmodule CanneryWeb.RangeLiveTest do
assert html =~ "some updated notes"
end
test "deletes shot_group in listing", %{conn: conn, shot_group: shot_group} do
test "deletes shot_record in listing", %{conn: conn, shot_record: shot_record} do
{:ok, index_live, _html} = live(conn, Routes.range_index_path(conn, :index))
assert index_live
|> element(~s/a[aria-label="Delete shot record of #{shot_group.count} shots"]/)
|> element(~s/a[aria-label="Delete shot record of #{shot_record.count} shots"]/)
|> render_click()
refute has_element?(index_live, "#shot_group-#{shot_group.id}")
refute has_element?(index_live, "#shot_record-#{shot_record.id}")
end
end
end

View File

@ -0,0 +1,400 @@
defmodule CanneryWeb.TypeLiveTest do
@moduledoc """
Tests the type liveview
"""
use CanneryWeb.ConnCase
import Phoenix.LiveViewTest
alias Cannery.{Ammo, Repo}
@moduletag :type_live_test
@create_attrs %{
bullet_type: "some bullet_type",
case_material: "some case_material",
desc: "some desc",
manufacturer: "some manufacturer",
name: "some name",
grains: 120
}
@update_attrs %{
bullet_type: "some updated bullet_type",
case_material: "some updated case_material",
desc: "some updated desc",
manufacturer: "some updated manufacturer",
name: "some updated name",
grains: 456
}
@invalid_attrs %{
bullet_type: nil,
case_material: nil,
desc: nil,
manufacturer: nil,
name: nil,
grains: nil
}
@pack_attrs %{
notes: "some pack",
count: 20
}
@shot_record_attrs %{
notes: "some shot record",
count: 20
}
defp create_type(%{current_user: current_user}) do
[type: type_fixture(@create_attrs, current_user)]
end
defp create_pack(%{type: type, current_user: current_user}) do
container = container_fixture(current_user)
{1, [pack]} = pack_fixture(@pack_attrs, type, container, current_user)
[pack: pack, container: container]
end
defp create_empty_pack(%{type: type, current_user: current_user}) do
container = container_fixture(current_user)
{1, [pack]} = pack_fixture(@pack_attrs, type, container, current_user)
shot_record = shot_record_fixture(@shot_record_attrs, current_user, pack)
pack = pack |> Repo.reload!()
[pack: pack, container: container, shot_record: shot_record]
end
describe "Index" do
setup [:register_and_log_in_user, :create_type]
test "lists all types", %{conn: conn, type: type} do
{:ok, _index_live, html} = live(conn, Routes.type_index_path(conn, :index))
assert html =~ "Catalog"
assert html =~ type.bullet_type
end
test "can sort by class", %{conn: conn, current_user: current_user} do
rifle_type = type_fixture(%{class: :rifle}, current_user)
shotgun_type = type_fixture(%{class: :shotgun}, current_user)
pistol_type = type_fixture(%{class: :pistol}, current_user)
{:ok, index_live, html} = live(conn, Routes.type_index_path(conn, :index))
assert html =~ "All"
assert html =~ rifle_type.name
assert html =~ shotgun_type.name
assert html =~ pistol_type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(type: %{class: :rifle})
assert html =~ rifle_type.name
refute html =~ shotgun_type.name
refute html =~ pistol_type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(type: %{class: :shotgun})
refute html =~ rifle_type.name
assert html =~ shotgun_type.name
refute html =~ pistol_type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(type: %{class: :pistol})
refute html =~ rifle_type.name
refute html =~ shotgun_type.name
assert html =~ pistol_type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(type: %{class: :all})
assert html =~ rifle_type.name
assert html =~ shotgun_type.name
assert html =~ pistol_type.name
end
test "can search for type", %{conn: conn, type: type} do
{:ok, index_live, html} = live(conn, Routes.type_index_path(conn, :index))
assert html =~ type.bullet_type
assert index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: type.bullet_type}) =~
type.bullet_type
assert_patch(index_live, Routes.type_index_path(conn, :search, type.bullet_type))
refute index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: "something_else"}) =~ type.bullet_type
assert_patch(index_live, Routes.type_index_path(conn, :search, "something_else"))
assert index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: ""}) =~ type.bullet_type
assert_patch(index_live, Routes.type_index_path(conn, :index))
end
test "saves new type", %{conn: conn, current_user: current_user, type: type} do
{:ok, index_live, _html} = live(conn, Routes.type_index_path(conn, :index))
assert index_live |> element("a", "New Type") |> render_click() =~ "New Type"
assert_patch(index_live, Routes.type_index_path(conn, :new))
assert index_live
|> form("#type-form")
|> render_change(type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#type-form")
|> render_submit(type: @create_attrs)
|> follow_redirect(conn, Routes.type_index_path(conn, :index))
type = type.id |> Ammo.get_type!(current_user)
assert html =~ "#{type.name} created successfully"
assert html =~ "some bullet_type"
end
test "updates type in listing",
%{conn: conn, current_user: current_user, type: type} do
{:ok, index_live, _html} = live(conn, Routes.type_index_path(conn, :index))
assert index_live |> element(~s/a[aria-label="Edit #{type.name}"]/) |> render_click() =~
"Edit #{type.name}"
assert_patch(index_live, Routes.type_index_path(conn, :edit, type))
assert index_live
|> form("#type-form")
|> render_change(type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#type-form")
|> render_submit(type: @update_attrs)
|> follow_redirect(conn, Routes.type_index_path(conn, :index))
type = type.id |> Ammo.get_type!(current_user)
assert html =~ "#{type.name} updated successfully"
assert html =~ "some updated bullet_type"
end
test "clones type in listing",
%{conn: conn, current_user: current_user, type: type} do
{:ok, index_live, _html} = live(conn, Routes.type_index_path(conn, :index))
html = index_live |> element(~s/a[aria-label="Clone #{type.name}"]/) |> render_click()
assert html =~ "New Type"
assert html =~ "some bullet_type"
assert_patch(index_live, Routes.type_index_path(conn, :clone, type))
assert index_live
|> form("#type-form")
|> render_change(type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#type-form")
|> render_submit(type: @create_attrs)
|> follow_redirect(conn, Routes.type_index_path(conn, :index))
type = type.id |> Ammo.get_type!(current_user)
assert html =~ "#{type.name} created successfully"
assert html =~ "some bullet_type"
end
test "clones type in listing with updates",
%{conn: conn, current_user: current_user, type: type} do
{:ok, index_live, _html} = live(conn, Routes.type_index_path(conn, :index))
html = index_live |> element(~s/a[aria-label="Clone #{type.name}"]/) |> render_click()
assert html =~ "New Type"
assert html =~ "some bullet_type"
assert_patch(index_live, Routes.type_index_path(conn, :clone, type))
assert index_live
|> form("#type-form")
|> render_change(type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#type-form")
|> render_submit(
type: Map.merge(@create_attrs, %{bullet_type: "some updated bullet_type"})
)
|> follow_redirect(conn, Routes.type_index_path(conn, :index))
type = type.id |> Ammo.get_type!(current_user)
assert html =~ "#{type.name} created successfully"
assert html =~ "some updated bullet_type"
end
test "deletes type in listing", %{conn: conn, type: type} do
{:ok, index_live, _html} = live(conn, Routes.type_index_path(conn, :index))
assert index_live |> element(~s/a[aria-label="Delete #{type.name}"]/) |> render_click()
refute has_element?(index_live, "#type-#{type.id}")
end
end
describe "Index with pack" do
setup [:register_and_log_in_user, :create_type, :create_pack]
test "shows used packs on toggle",
%{conn: conn, pack: pack, current_user: current_user} do
{:ok, index_live, html} = live(conn, Routes.type_index_path(conn, :index))
assert html =~ "Show used"
refute html =~ "Used rounds"
refute html =~ "Total ever rounds"
refute html =~ "Used packs"
refute html =~ "Total ever packs"
html =
index_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_show_used-label"}]/)
|> render_click()
assert html =~ "Used rounds"
assert html =~ "Total ever rounds"
assert html =~ "Used packs"
assert html =~ "Total ever packs"
assert html =~ "\n20\n"
assert html =~ "\n0\n"
assert html =~ "\n1\n"
shot_record_fixture(%{count: 5}, current_user, pack)
{:ok, index_live, _html} = live(conn, Routes.type_index_path(conn, :index))
html =
index_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_show_used-label"}]/)
|> render_click()
assert html =~ "\n15\n"
assert html =~ "\n5\n"
end
end
describe "Show type" do
setup [:register_and_log_in_user, :create_type]
test "displays type", %{
conn: conn,
type: %{name: name, bullet_type: bullet_type} = type
} do
{:ok, _show_live, html} = live(conn, Routes.type_show_path(conn, :show, type))
assert html =~ name
assert html =~ bullet_type
end
test "updates type within modal",
%{conn: conn, current_user: current_user, type: %{name: name} = type} do
{:ok, show_live, _html} = live(conn, Routes.type_show_path(conn, :show, type))
assert show_live |> element(~s/a[aria-label="Edit #{type.name}"]/) |> render_click() =~
"Edit #{name}"
assert_patch(show_live, Routes.type_show_path(conn, :edit, type))
assert show_live
|> form("#type-form")
|> render_change(type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
show_live
|> form("#type-form")
|> render_submit(type: @update_attrs)
|> follow_redirect(conn, Routes.type_show_path(conn, :show, type))
type = type.id |> Ammo.get_type!(current_user)
assert html =~ "#{type.name} updated successfully"
assert html =~ "some updated bullet_type"
end
end
describe "Show type with pack" do
setup [:register_and_log_in_user, :create_type, :create_pack]
test "displays pack", %{
conn: conn,
type: %{name: type_name} = type,
container: %{name: container_name}
} do
{:ok, _show_live, html} = live(conn, Routes.type_show_path(conn, :show, type))
assert html =~ type_name
assert html =~ "\n20\n"
assert html =~ container_name
end
test "displays pack in table",
%{conn: conn, type: type, container: %{name: container_name}} do
{:ok, show_live, _html} = live(conn, Routes.type_show_path(conn, :show, type))
html =
show_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_table-label"}]/)
|> render_click()
assert html =~ "\n20\n"
assert html =~ container_name
end
end
describe "Show type with empty pack" do
setup [:register_and_log_in_user, :create_type, :create_empty_pack]
test "displays empty packs on toggle",
%{conn: conn, type: type, container: %{name: container_name}} do
{:ok, show_live, html} = live(conn, Routes.type_show_path(conn, :show, type))
assert html =~ "Show used"
refute html =~ "\n20\n"
html =
show_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_show_used-label"}]/)
|> render_click()
assert html =~ "\n20\n"
assert html =~ "Empty"
assert html =~ container_name
end
test "displays empty packs in table on toggle",
%{conn: conn, type: type, container: %{name: container_name}} do
{:ok, show_live, _html} = live(conn, Routes.type_show_path(conn, :show, type))
html =
show_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_table-label"}]/)
|> render_click()
assert html =~ "Show used"
refute html =~ "\n20\n"
html =
show_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_show_used-label"}]/)
|> render_click()
assert html =~ "\n20\n"
assert html =~ "Empty"
assert html =~ container_name
end
end
end

View File

@ -8,10 +8,10 @@ defmodule Cannery.Fixtures do
alias Cannery.{
Accounts,
Accounts.User,
ActivityLog.ShotGroup,
ActivityLog.ShotRecord,
Ammo,
Ammo.AmmoType,
Ammo.Pack,
Ammo.Type,
Containers,
Containers.Container,
Containers.Tag,
@ -69,18 +69,18 @@ defmodule Cannery.Fixtures do
end
@doc """
Generate a ShotGroup
Generate a ShotRecord
"""
@spec shot_group_fixture(User.t(), Pack.t()) :: ShotGroup.t()
@spec shot_group_fixture(attrs :: map(), User.t(), Pack.t()) :: ShotGroup.t()
def shot_group_fixture(attrs \\ %{}, %User{} = user, %Pack{} = pack) do
@spec shot_record_fixture(User.t(), Pack.t()) :: ShotRecord.t()
@spec shot_record_fixture(attrs :: map(), User.t(), Pack.t()) :: ShotRecord.t()
def shot_record_fixture(attrs \\ %{}, %User{} = user, %Pack{} = pack) do
attrs
|> Enum.into(%{
count: 20,
date: ~N[2022-02-13 03:17:00],
notes: random_string()
})
|> Cannery.ActivityLog.create_shot_group(user, pack)
|> Cannery.ActivityLog.create_shot_record(user, pack)
|> unwrap_ok_tuple()
end
@ -102,11 +102,11 @@ defmodule Cannery.Fixtures do
end
@doc """
Generate a AmmoType
Generate a Type
"""
@spec ammo_type_fixture(User.t()) :: AmmoType.t()
@spec ammo_type_fixture(attrs :: map(), User.t()) :: AmmoType.t()
def ammo_type_fixture(attrs \\ %{}, %User{} = user) do
@spec type_fixture(User.t()) :: Type.t()
@spec type_fixture(attrs :: map(), User.t()) :: Type.t()
def type_fixture(attrs \\ %{}, %User{} = user) do
attrs
|> Enum.into(%{
name: random_string(),
@ -142,34 +142,34 @@ defmodule Cannery.Fixtures do
manufacturer: random_string(),
upc: random_string()
})
|> Ammo.create_ammo_type(user)
|> Ammo.create_type(user)
|> unwrap_ok_tuple()
end
@doc """
Generate a Pack
"""
@spec pack_fixture(AmmoType.t(), Container.t(), User.t()) ::
@spec pack_fixture(Type.t(), Container.t(), User.t()) ::
{count :: non_neg_integer(), [Pack.t()]}
@spec pack_fixture(attrs :: map(), AmmoType.t(), Container.t(), User.t()) ::
@spec pack_fixture(attrs :: map(), Type.t(), Container.t(), User.t()) ::
{count :: non_neg_integer(), [Pack.t()]}
@spec pack_fixture(
attrs :: map(),
multiplier :: non_neg_integer(),
AmmoType.t(),
Type.t(),
Container.t(),
User.t()
) :: {count :: non_neg_integer(), [Pack.t()]}
def pack_fixture(
attrs \\ %{},
multiplier \\ 1,
%AmmoType{id: ammo_type_id},
%Type{id: type_id},
%Container{id: container_id},
%User{} = user
) do
attrs
|> Enum.into(%{
ammo_type_id: ammo_type_id,
type_id: type_id,
container_id: container_id,
count: 20,
purchased_on: Date.utc_today()