Compare commits
No commits in common. "91288a9ffa7465d554e2c30ab408ab5a75f41de1" and "cad2fc9c3a1532e918e95cb898cd6411abe3692c" have entirely different histories.
91288a9ffa
...
cad2fc9c3a
12
CHANGELOG.md
12
CHANGELOG.md
@ -1,12 +0,0 @@
|
|||||||
# 0.2.0
|
|
||||||
- Add or remove tags from Containers list and details page
|
|
||||||
- Show tags on containers
|
|
||||||
- Add "Cannery" to page titles
|
|
||||||
- Don't show true/false column for ammo types if all values are false
|
|
||||||
- Fix ammo type firing type display
|
|
||||||
- Show original count, current value, and percentage remaining for ammo groups
|
|
||||||
- Show shot history for an ammo group
|
|
||||||
- Show ammo round totals and total shot for ammo types
|
|
||||||
|
|
||||||
# 0.1.0
|
|
||||||
- Initial release!
|
|
@ -67,59 +67,6 @@ defmodule Cannery.Ammo do
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc """
|
|
||||||
Gets the total number of rounds for an ammo type
|
|
||||||
|
|
||||||
Raises `Ecto.NoResultsError` if the Ammo type does not exist.
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
iex> get_round_count_for_ammo_type(123, %User{id: 123})
|
|
||||||
%AmmoType{}
|
|
||||||
|
|
||||||
iex> get_round_count_for_ammo_type(456, %User{id: 123})
|
|
||||||
** (Ecto.NoResultsError)
|
|
||||||
|
|
||||||
"""
|
|
||||||
@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, user_id: user_id},
|
|
||||||
%User{id: user_id}
|
|
||||||
) do
|
|
||||||
Repo.one!(
|
|
||||||
from ag in AmmoGroup,
|
|
||||||
where: ag.ammo_type_id == ^ammo_type_id,
|
|
||||||
select: sum(ag.count)
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
@doc """
|
|
||||||
Gets the total number of rounds shot for an ammo type
|
|
||||||
|
|
||||||
Raises `Ecto.NoResultsError` if the Ammo type does not exist.
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
iex> get_used_count_for_ammo_type(123, %User{id: 123})
|
|
||||||
%AmmoType{}
|
|
||||||
|
|
||||||
iex> get_used_count_for_ammo_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, user_id: user_id},
|
|
||||||
%User{id: user_id}
|
|
||||||
) do
|
|
||||||
Repo.one!(
|
|
||||||
from ag in AmmoGroup,
|
|
||||||
left_join: sg in assoc(ag, :shot_groups),
|
|
||||||
where: ag.ammo_type_id == ^ammo_type_id,
|
|
||||||
select: sum(sg.count)
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Creates a ammo_type.
|
Creates a ammo_type.
|
||||||
|
|
||||||
@ -215,12 +162,10 @@ defmodule Cannery.Ammo do
|
|||||||
@spec list_ammo_groups_for_type(AmmoType.t(), User.t()) :: [AmmoGroup.t()]
|
@spec list_ammo_groups_for_type(AmmoType.t(), User.t()) :: [AmmoGroup.t()]
|
||||||
def list_ammo_groups_for_type(%AmmoType{id: ammo_type_id, user_id: user_id}, %User{id: user_id}) do
|
def list_ammo_groups_for_type(%AmmoType{id: ammo_type_id, user_id: user_id}, %User{id: user_id}) do
|
||||||
Repo.all(
|
Repo.all(
|
||||||
from ag in AmmoGroup,
|
from am in AmmoGroup,
|
||||||
left_join: sg in assoc(ag, :shot_groups),
|
where: am.ammo_type_id == ^ammo_type_id,
|
||||||
where: ag.ammo_type_id == ^ammo_type_id,
|
where: am.user_id == ^user_id,
|
||||||
where: ag.user_id == ^user_id,
|
order_by: am.id
|
||||||
preload: [shot_groups: sg],
|
|
||||||
order_by: ag.id
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -237,18 +182,12 @@ defmodule Cannery.Ammo do
|
|||||||
@spec list_ammo_groups(User.t(), include_empty :: boolean()) :: [AmmoGroup.t()]
|
@spec list_ammo_groups(User.t(), include_empty :: boolean()) :: [AmmoGroup.t()]
|
||||||
def list_ammo_groups(%User{id: user_id}, include_empty \\ false) do
|
def list_ammo_groups(%User{id: user_id}, include_empty \\ false) do
|
||||||
if include_empty do
|
if include_empty do
|
||||||
from ag in AmmoGroup,
|
from am in AmmoGroup, where: am.user_id == ^user_id, order_by: am.id
|
||||||
left_join: sg in assoc(ag, :shot_groups),
|
|
||||||
where: ag.user_id == ^user_id,
|
|
||||||
preload: [shot_groups: sg],
|
|
||||||
order_by: ag.id
|
|
||||||
else
|
else
|
||||||
from ag in AmmoGroup,
|
from am in AmmoGroup,
|
||||||
left_join: sg in assoc(ag, :shot_groups),
|
where: am.user_id == ^user_id,
|
||||||
where: ag.user_id == ^user_id,
|
where: not (am.count == 0),
|
||||||
where: not (ag.count == 0),
|
order_by: am.id
|
||||||
preload: [shot_groups: sg],
|
|
||||||
order_by: ag.id
|
|
||||||
end
|
end
|
||||||
|> Repo.all()
|
|> Repo.all()
|
||||||
end
|
end
|
||||||
@ -265,12 +204,10 @@ defmodule Cannery.Ammo do
|
|||||||
@spec list_staged_ammo_groups(User.t()) :: [AmmoGroup.t()]
|
@spec list_staged_ammo_groups(User.t()) :: [AmmoGroup.t()]
|
||||||
def list_staged_ammo_groups(%User{id: user_id}) do
|
def list_staged_ammo_groups(%User{id: user_id}) do
|
||||||
Repo.all(
|
Repo.all(
|
||||||
from ag in AmmoGroup,
|
from am in AmmoGroup,
|
||||||
left_join: sg in assoc(ag, :shot_groups),
|
where: am.user_id == ^user_id,
|
||||||
where: ag.user_id == ^user_id,
|
where: am.staged == true,
|
||||||
where: ag.staged == true,
|
order_by: am.id
|
||||||
preload: [shot_groups: sg],
|
|
||||||
order_by: ag.id
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -289,42 +226,8 @@ defmodule Cannery.Ammo do
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
@spec get_ammo_group!(AmmoGroup.id(), User.t()) :: AmmoGroup.t()
|
@spec get_ammo_group!(AmmoGroup.id(), User.t()) :: AmmoGroup.t()
|
||||||
def get_ammo_group!(id, %User{id: user_id}) do
|
def get_ammo_group!(id, %User{id: user_id}),
|
||||||
Repo.one!(
|
do: Repo.one!(from am in AmmoGroup, where: am.id == ^id and am.user_id == ^user_id)
|
||||||
from ag in AmmoGroup,
|
|
||||||
left_join: sg in assoc(ag, :shot_groups),
|
|
||||||
where: ag.id == ^id,
|
|
||||||
where: ag.user_id == ^user_id,
|
|
||||||
preload: [shot_groups: sg]
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
@doc """
|
|
||||||
Returns the number of shot rounds for an ammo group
|
|
||||||
"""
|
|
||||||
@spec get_used_count(AmmoGroup.t()) :: non_neg_integer()
|
|
||||||
def get_used_count(%AmmoGroup{} = ammo_group) do
|
|
||||||
ammo_group
|
|
||||||
|> Repo.preload(:shot_groups)
|
|
||||||
|> Map.get(:shot_groups)
|
|
||||||
|> Enum.map(fn %{count: count} -> count end)
|
|
||||||
|> Enum.sum()
|
|
||||||
end
|
|
||||||
|
|
||||||
@doc """
|
|
||||||
Calculates the percentage remaining of an ammo group out of 100
|
|
||||||
"""
|
|
||||||
@spec get_percentage_remaining(AmmoGroup.t()) :: non_neg_integer()
|
|
||||||
def get_percentage_remaining(%AmmoGroup{count: 0}), do: 0
|
|
||||||
|
|
||||||
def get_percentage_remaining(%AmmoGroup{count: count} = ammo_group) do
|
|
||||||
ammo_group = ammo_group |> Repo.preload(:shot_groups)
|
|
||||||
|
|
||||||
shot_group_sum =
|
|
||||||
ammo_group.shot_groups |> Enum.map(fn %{count: count} -> count end) |> Enum.sum()
|
|
||||||
|
|
||||||
round(count / (count + shot_group_sum) * 100)
|
|
||||||
end
|
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Creates a ammo_group.
|
Creates a ammo_group.
|
||||||
|
@ -19,16 +19,8 @@ defmodule Cannery.Containers do
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
@spec list_containers(User.t()) :: [Container.t()]
|
@spec list_containers(User.t()) :: [Container.t()]
|
||||||
def list_containers(%User{id: user_id}) do
|
def list_containers(%User{id: user_id}),
|
||||||
Repo.all(
|
do: Repo.all(from c in Container, where: c.user_id == ^user_id, order_by: c.name)
|
||||||
from c in Container,
|
|
||||||
left_join: t in assoc(c, :tags),
|
|
||||||
left_join: ag in assoc(c, :ammo_groups),
|
|
||||||
where: c.user_id == ^user_id,
|
|
||||||
order_by: c.name,
|
|
||||||
preload: [tags: t, ammo_groups: ag]
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Gets a single container.
|
Gets a single container.
|
||||||
@ -45,17 +37,8 @@ defmodule Cannery.Containers do
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
@spec get_container!(Container.id(), User.t()) :: Container.t()
|
@spec get_container!(Container.id(), User.t()) :: Container.t()
|
||||||
def get_container!(id, %User{id: user_id}) do
|
def get_container!(id, %User{id: user_id}),
|
||||||
Repo.one!(
|
do: Repo.one!(from c in Container, where: c.id == ^id and c.user_id == ^user_id)
|
||||||
from c in Container,
|
|
||||||
left_join: t in assoc(c, :tags),
|
|
||||||
left_join: ag in assoc(c, :ammo_groups),
|
|
||||||
where: c.user_id == ^user_id,
|
|
||||||
where: c.id == ^id,
|
|
||||||
order_by: c.name,
|
|
||||||
preload: [tags: t, ammo_groups: ag]
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Creates a container.
|
Creates a container.
|
||||||
@ -206,17 +189,4 @@ defmodule Cannery.Containers do
|
|||||||
|
|
||||||
if count == 0, do: raise("could not delete container tag"), else: count
|
if count == 0, do: raise("could not delete container tag"), else: count
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc """
|
|
||||||
Returns number of rounds in container. If data is already preloaded, then
|
|
||||||
there will be no db hit.
|
|
||||||
"""
|
|
||||||
@spec get_container_rounds!(Container.t()) :: non_neg_integer()
|
|
||||||
def get_container_rounds!(%Container{} = container) do
|
|
||||||
container
|
|
||||||
|> Repo.preload(:ammo_groups)
|
|
||||||
|> Map.get(:ammo_groups)
|
|
||||||
|> Enum.map(fn %{count: count} -> count end)
|
|
||||||
|> Enum.sum()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
@ -4,21 +4,17 @@ defmodule CanneryWeb.Components.ContainerCard do
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
use CanneryWeb, :component
|
use CanneryWeb, :component
|
||||||
import CanneryWeb.Components.TagCard
|
|
||||||
alias Cannery.{Containers, Repo}
|
|
||||||
alias CanneryWeb.Endpoint
|
alias CanneryWeb.Endpoint
|
||||||
|
|
||||||
def container_card(%{container: container} = assigns) do
|
def container_card(assigns) do
|
||||||
assigns = assigns |> Map.put(:container, container |> Repo.preload([:tags, :ammo_groups]))
|
|
||||||
|
|
||||||
~H"""
|
~H"""
|
||||||
<div
|
<div
|
||||||
id={"container-#{@container.id}"}
|
id={"container-#{@container.id}"}
|
||||||
class="mx-4 my-2 px-8 py-4 flex flex-col justify-center items-center space-y-4
|
class="mx-4 my-2 px-8 py-4 flex flex-col justify-center items-center
|
||||||
border border-gray-400 rounded-lg shadow-lg hover:shadow-md
|
border border-gray-400 rounded-lg shadow-lg hover:shadow-md
|
||||||
transition-all duration-300 ease-in-out"
|
transition-all duration-300 ease-in-out"
|
||||||
>
|
>
|
||||||
<div class="mb-4 flex flex-col justify-center items-center space-y-2">
|
<div class="mb-4 flex flex-col justify-center items-center">
|
||||||
<%= live_redirect to: Routes.container_show_path(Endpoint, :show, @container),
|
<%= live_redirect to: Routes.container_show_path(Endpoint, :show, @container),
|
||||||
class: "link" do %>
|
class: "link" do %>
|
||||||
<h1 class="px-4 py-2 rounded-lg title text-xl">
|
<h1 class="px-4 py-2 rounded-lg title text-xl">
|
||||||
@ -44,25 +40,6 @@ defmodule CanneryWeb.Components.ContainerCard do
|
|||||||
<%= @container.location %>
|
<%= @container.location %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= if @container.ammo_groups do %>
|
|
||||||
<span class="rounded-lg title text-lg">
|
|
||||||
<%= gettext("Rounds:") %>
|
|
||||||
<%= @container |> Containers.get_container_rounds!() %>
|
|
||||||
</span>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="flex flex-wrap justify-center items-center">
|
|
||||||
<%= unless @container.tags |> Enum.empty?() do %>
|
|
||||||
<%= for tag <- @container.tags do %>
|
|
||||||
<.simple_tag_card tag={tag} />
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= if assigns |> Map.has_key?(:tag_actions) do %>
|
|
||||||
<%= render_slot(@tag_actions) %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= if assigns |> Map.has_key?(:inner_block) do %>
|
<%= if assigns |> Map.has_key?(:inner_block) do %>
|
||||||
|
@ -13,20 +13,15 @@ defmodule CanneryWeb.Components.TagCard do
|
|||||||
border border-gray-400 rounded-lg shadow-lg hover:shadow-md
|
border border-gray-400 rounded-lg shadow-lg hover:shadow-md
|
||||||
transition-all duration-300 ease-in-out"
|
transition-all duration-300 ease-in-out"
|
||||||
>
|
>
|
||||||
<.simple_tag_card tag={@tag} />
|
|
||||||
<%= render_slot(@inner_block) %>
|
|
||||||
</div>
|
|
||||||
"""
|
|
||||||
end
|
|
||||||
|
|
||||||
def simple_tag_card(assigns) do
|
|
||||||
~H"""
|
|
||||||
<h1
|
<h1
|
||||||
class="mx-2 my-1 px-4 py-2 rounded-lg title text-xl"
|
class="px-4 py-2 rounded-lg title text-xl"
|
||||||
style={"color: #{@tag.text_color}; background-color: #{@tag.bg_color}"}
|
style={"color: #{@tag.text_color}; background-color: #{@tag.bg_color}"}
|
||||||
>
|
>
|
||||||
<%= @tag.name %>
|
<%= @tag.name %>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
<%= render_slot(@inner_block) %>
|
||||||
|
</div>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<%= gettext("Price paid") %>
|
<%= gettext("Price paid") %>
|
||||||
</th>
|
</th>
|
||||||
<th class="p-2">
|
<th class="p-2">
|
||||||
<%= gettext("% left") %>
|
<%= gettext("Notes") %>
|
||||||
</th>
|
</th>
|
||||||
<th class="p-2">
|
<th class="p-2">
|
||||||
<%= gettext("Range") %>
|
<%= gettext("Range") %>
|
||||||
@ -68,7 +68,7 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="p-2">
|
<td class="p-2">
|
||||||
<%= "#{ammo_group |> Ammo.get_percentage_remaining()}%" %>
|
<%= ammo_group.notes %>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="p-2">
|
<td class="p-2">
|
||||||
|
@ -9,16 +9,6 @@
|
|||||||
<%= @ammo_group.count %>
|
<%= @ammo_group.count %>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="rounded-lg title text-lg">
|
|
||||||
<%= gettext("Original count:") %>
|
|
||||||
<%= @ammo_group.count + Ammo.get_used_count(@ammo_group) %>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="rounded-lg title text-lg">
|
|
||||||
<%= gettext("Percentage left:") %>
|
|
||||||
<%= "#{@ammo_group |> Ammo.get_percentage_remaining()}%" %>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<%= if @ammo_group.notes do %>
|
<%= if @ammo_group.notes do %>
|
||||||
<span class="rounded-lg title text-lg">
|
<span class="rounded-lg title text-lg">
|
||||||
<%= gettext("Notes:") %>
|
<%= gettext("Notes:") %>
|
||||||
@ -28,20 +18,11 @@
|
|||||||
|
|
||||||
<%= if @ammo_group.price_paid do %>
|
<%= if @ammo_group.price_paid do %>
|
||||||
<span class="rounded-lg title text-lg">
|
<span class="rounded-lg title text-lg">
|
||||||
<%= gettext("Original cost:") %>
|
<%= gettext("Price paid:") %>
|
||||||
<%= gettext("$%{amount}",
|
<%= gettext("$%{amount}",
|
||||||
amount: @ammo_group.price_paid |> :erlang.float_to_binary(decimals: 2)
|
amount: @ammo_group.price_paid |> :erlang.float_to_binary(decimals: 2)
|
||||||
) %>
|
) %>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="rounded-lg title text-lg">
|
|
||||||
<%= gettext("Current value:") %>
|
|
||||||
<%= gettext("$%{amount}",
|
|
||||||
amount:
|
|
||||||
(@ammo_group.price_paid * Ammo.get_percentage_remaining(@ammo_group) / 100)
|
|
||||||
|> :erlang.float_to_binary(decimals: 2)
|
|
||||||
) %>
|
|
||||||
</span>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -103,47 +84,6 @@
|
|||||||
<%= gettext("This ammo group is not in a container") %>
|
<%= gettext("This ammo group is not in a container") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= unless @ammo_group.shot_groups |> Enum.empty?() do %>
|
|
||||||
<hr class="mb-4 w-full" />
|
|
||||||
|
|
||||||
<h1 class="mb-4 px-4 py-2 text-center rounded-lg title text-xl">
|
|
||||||
<%= gettext("Rounds used") %>
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<div class="w-full overflow-x-auto border border-gray-600 rounded-lg shadow-lg bg-black">
|
|
||||||
<table class="min-w-full table-auto text-center bg-white">
|
|
||||||
<thead class="border-b border-primary-600">
|
|
||||||
<tr>
|
|
||||||
<th class="p-2">
|
|
||||||
<%= gettext("Rounds shot") %>
|
|
||||||
</th>
|
|
||||||
<th class="p-2">
|
|
||||||
<%= gettext("Notes") %>
|
|
||||||
</th>
|
|
||||||
<th class="p-2">
|
|
||||||
<%= gettext("Date") %>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody id="shot_groups">
|
|
||||||
<%= for shot_group <- @ammo_group.shot_groups do %>
|
|
||||||
<tr id={"shot_group-#{shot_group.id}"}>
|
|
||||||
<td class="p-2">
|
|
||||||
<%= shot_group.count %>
|
|
||||||
</td>
|
|
||||||
<td class="p-2">
|
|
||||||
<%= shot_group.notes %>
|
|
||||||
</td>
|
|
||||||
<td class="p-2">
|
|
||||||
<%= shot_group.date |> display_date() %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% end %>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= case @live_action do %>
|
<%= case @live_action do %>
|
||||||
|
@ -61,7 +61,7 @@ defmodule CanneryWeb.AmmoTypeLive.Index do
|
|||||||
{gettext("Grains"), :grains, :string},
|
{gettext("Grains"), :grains, :string},
|
||||||
{gettext("Pressure"), :pressure, :string},
|
{gettext("Pressure"), :pressure, :string},
|
||||||
{gettext("Primer type"), :primer_type, :string},
|
{gettext("Primer type"), :primer_type, :string},
|
||||||
{gettext("Firing type"), :firing_type, :string},
|
{gettext("Rimfire"), :rimfire, :boolean},
|
||||||
{gettext("Tracer"), :tracer, :boolean},
|
{gettext("Tracer"), :tracer, :boolean},
|
||||||
{gettext("Incendiary"), :incendiary, :boolean},
|
{gettext("Incendiary"), :incendiary, :boolean},
|
||||||
{gettext("Blank"), :blank, :boolean},
|
{gettext("Blank"), :blank, :boolean},
|
||||||
@ -69,12 +69,9 @@ defmodule CanneryWeb.AmmoTypeLive.Index do
|
|||||||
{gettext("Manufacturer"), :manufacturer, :string},
|
{gettext("Manufacturer"), :manufacturer, :string},
|
||||||
{gettext("UPC"), :upc, :string}
|
{gettext("UPC"), :upc, :string}
|
||||||
]
|
]
|
||||||
|> Enum.filter(fn {_label, field, type} ->
|
# filter columns to only used ones
|
||||||
# remove columns if all values match defaults
|
|> Enum.filter(fn {_label, field, _type} ->
|
||||||
default_value = if type == :boolean, do: false, else: nil
|
ammo_types |> Enum.any?(fn ammo_type -> not (ammo_type |> Map.get(field) |> is_nil()) end)
|
||||||
|
|
||||||
ammo_types
|
|
||||||
|> Enum.any?(fn ammo_type -> not (ammo_type |> Map.get(field) == default_value) end)
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
socket |> assign(ammo_types: ammo_types, columns_to_display: columns_to_display)
|
socket |> assign(ammo_types: ammo_types, columns_to_display: columns_to_display)
|
||||||
|
@ -28,9 +28,6 @@
|
|||||||
<%= field_name %>
|
<%= field_name %>
|
||||||
</th>
|
</th>
|
||||||
<% end %>
|
<% end %>
|
||||||
<th class="p-2">
|
|
||||||
<%= gettext("Total # of rounds") %>
|
|
||||||
</th>
|
|
||||||
|
|
||||||
<th class="p-2"></th>
|
<th class="p-2"></th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -49,10 +46,6 @@
|
|||||||
</td>
|
</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<td class="p-2">
|
|
||||||
<%= ammo_type |> Ammo.get_round_count_for_ammo_type(@current_user) %>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="p-2">
|
<td class="p-2">
|
||||||
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
|
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
|
||||||
<%= live_redirect to: Routes.ammo_type_show_path(Endpoint, :show, ammo_type),
|
<%= live_redirect to: Routes.ammo_type_show_path(Endpoint, :show, ammo_type),
|
||||||
|
@ -35,75 +35,70 @@
|
|||||||
|
|
||||||
<hr class="hr" />
|
<hr class="hr" />
|
||||||
|
|
||||||
<div class="grid sm:grid-cols-2 gap-4 text-center justify-center items-center">
|
<div class="grid sm:grid-cols-2 text-center justify-center items-center">
|
||||||
<%= for {field_name, field, type} <- [
|
<%= for {field_name, field} <- [
|
||||||
{gettext("Bullet type"), :bullet_type, :string},
|
{gettext("Bullet type"), :bullet_type},
|
||||||
{gettext("Bullet core"), :bullet_core, :string},
|
{gettext("Bullet core"), :bullet_core},
|
||||||
{gettext("Cartridge"), :cartridge, :string},
|
{gettext("Cartridge"), :cartridge},
|
||||||
{gettext("Caliber"), :caliber, :string},
|
{gettext("Caliber"), :caliber},
|
||||||
{gettext("Case material"), :case_material, :string},
|
{gettext("Case material"), :case_material},
|
||||||
{gettext("Jacket type"), :jacket_type, :string},
|
{gettext("Jacket type"), :jacket_type},
|
||||||
{gettext("Muzzle velocity"), :muzzle_velocity, :string},
|
{gettext("Muzzle velocity"), :muzzle_velocity},
|
||||||
{gettext("Powder type"), :powder_type, :string},
|
{gettext("Powder type"), :powder_type},
|
||||||
{gettext("Powder grains per charge"), :powder_grains_per_charge, :string},
|
{gettext("Powder grains per charge"), :powder_grains_per_charge},
|
||||||
{gettext("Grains"), :grains, :string},
|
{gettext("Grains"), :grains},
|
||||||
{gettext("Pressure"), :pressure, :string},
|
{gettext("Pressure"), :pressure},
|
||||||
{gettext("Primer type"), :primer_type, :string},
|
{gettext("Primer type"), :primer_type}
|
||||||
{gettext("Firing type"), :firing_type, :string},
|
|
||||||
{gettext("Tracer"), :tracer, :boolean},
|
|
||||||
{gettext("Incendiary"), :incendiary, :boolean},
|
|
||||||
{gettext("Blank"), :blank, :boolean},
|
|
||||||
{gettext("Corrosive"), :corrosive, :boolean},
|
|
||||||
{gettext("Manufacturer"), :manufacturer, :string},
|
|
||||||
{gettext("UPC"), :upc, :string}
|
|
||||||
] do %>
|
] do %>
|
||||||
<%= if @ammo_type |> Map.get(field) do %>
|
<%= if @ammo_type |> Map.get(field) do %>
|
||||||
<h3 class="title text-lg">
|
<h3 class="mb-2 sm:mr-4 title text-lg">
|
||||||
<%= field_name %>:
|
<%= field_name %>:
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<span class="text-primary-600">
|
<span class="mb-4 sm:mb-2 text-primary-600">
|
||||||
<%= case type do %>
|
|
||||||
<% :boolean -> %>
|
|
||||||
<%= @ammo_type |> Map.get(field) |> humanize() %>
|
|
||||||
<% _ -> %>
|
|
||||||
<%= @ammo_type |> Map.get(field) %>
|
<%= @ammo_type |> Map.get(field) %>
|
||||||
<% end %>
|
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<h3 class="title text-lg">
|
<%= for {field_name, field} <- [
|
||||||
<%= gettext("Current # of rounds:") %>
|
{"Rimfire", :rimfire},
|
||||||
|
{"Tracer", :tracer},
|
||||||
|
{"Incendiary", :incendiary},
|
||||||
|
{"Blank", :blank},
|
||||||
|
{"Corrosive", :corrosive}
|
||||||
|
] do %>
|
||||||
|
<h3 class="mb-2 sm:mr-4 title text-lg">
|
||||||
|
<%= field_name %>:
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<span class="text-primary-600">
|
<span class="mb-4 sm:mb-2 text-primary-600">
|
||||||
<%= @ammo_type |> Ammo.get_round_count_for_ammo_type(@current_user) %>
|
<%= @ammo_type |> Map.get(field) |> humanize() %>
|
||||||
</span>
|
</span>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<h3 class="title text-lg">
|
<%= for {field_name, field} <- [{"Manufacturer", :manufacturer}, {"UPC", :upc}] do %>
|
||||||
<%= gettext("Total rounds shot:") %>
|
<%= if @ammo_type |> Map.get(field) do %>
|
||||||
|
<h3 class="mb-2 sm:mr-4 title text-lg">
|
||||||
|
<%= field_name %>:
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<span class="text-primary-600">
|
<span class="mb-4 sm:mb-2 text-primary-600">
|
||||||
<%= @ammo_type |> Ammo.get_used_count_for_ammo_type(@current_user) %>
|
<%= @ammo_type |> Map.get(field) %>
|
||||||
</span>
|
</span>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<%= if @avg_cost_per_round do %>
|
<%= if @avg_cost_per_round do %>
|
||||||
<h3 class="title text-lg">
|
<h3 class="mb-2 sm:mr-4 title text-lg">
|
||||||
<%= gettext("Average Price paid") %>:
|
<%= gettext("Average Price paid") %>:
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<span class="text-primary-600">
|
<span class="mb-4 sm:mb-2 text-primary-600">
|
||||||
<%= gettext("$%{amount}",
|
<%= gettext("$%{amount}",
|
||||||
amount: @avg_cost_per_round |> :erlang.float_to_binary(decimals: 2)
|
amount: @avg_cost_per_round |> :erlang.float_to_binary(decimals: 2)
|
||||||
) %>
|
) %>
|
||||||
</span>
|
</span>
|
||||||
<% else %>
|
|
||||||
<h3 class="title text-lg col-span-2">
|
|
||||||
<%= gettext("No cost information") %>
|
|
||||||
<%= display_emoji("😔") %>
|
|
||||||
</h3>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -112,13 +107,10 @@
|
|||||||
<div>
|
<div>
|
||||||
<%= if @ammo_groups |> Enum.empty?() do %>
|
<%= if @ammo_groups |> Enum.empty?() do %>
|
||||||
<%= gettext("No ammo for this type") %>
|
<%= gettext("No ammo for this type") %>
|
||||||
<%= display_emoji("😔") %>
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="flex flex-wrap justify-center items-center">
|
|
||||||
<%= for ammo_group <- @ammo_groups do %>
|
<%= for ammo_group <- @ammo_groups do %>
|
||||||
<.ammo_group_card ammo_group={ammo_group} />
|
<.ammo_group_card ammo_group={ammo_group} />
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
51
lib/cannery_web/live/container_live/add_tag_component.ex
Normal file
51
lib/cannery_web/live/container_live/add_tag_component.ex
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
defmodule CanneryWeb.ContainerLive.AddTagComponent do
|
||||||
|
@moduledoc """
|
||||||
|
Livecomponent that can add a tag to a Container
|
||||||
|
"""
|
||||||
|
|
||||||
|
use CanneryWeb, :live_component
|
||||||
|
alias Cannery.{Accounts.User, Containers, Containers.Container, Tags, Tags.Tag}
|
||||||
|
alias Phoenix.LiveView.Socket
|
||||||
|
|
||||||
|
@impl true
|
||||||
|
@spec update(
|
||||||
|
%{:container => Container.t(), :current_user => User.t(), optional(any) => any},
|
||||||
|
Socket.t()
|
||||||
|
) :: {:ok, Socket.t()}
|
||||||
|
def update(%{container: _container, current_user: current_user} = assigns, socket) do
|
||||||
|
{:ok, socket |> assign(assigns) |> assign(:tags, Tags.list_tags(current_user))}
|
||||||
|
end
|
||||||
|
|
||||||
|
@impl true
|
||||||
|
def handle_event(
|
||||||
|
"save",
|
||||||
|
%{"tag" => %{"tag_id" => tag_id}},
|
||||||
|
%{
|
||||||
|
assigns: %{
|
||||||
|
tags: tags,
|
||||||
|
container: container,
|
||||||
|
current_user: current_user,
|
||||||
|
return_to: return_to
|
||||||
|
}
|
||||||
|
} = socket
|
||||||
|
) do
|
||||||
|
socket =
|
||||||
|
case tags |> Enum.find(fn %{id: id} -> tag_id == id end) do
|
||||||
|
nil ->
|
||||||
|
prompt = dgettext("errors", "Tag could not be added")
|
||||||
|
socket |> put_flash(:error, prompt)
|
||||||
|
|
||||||
|
%{name: tag_name} = tag ->
|
||||||
|
_container_tag = Containers.add_tag!(container, tag, current_user)
|
||||||
|
prompt = dgettext("prompts", "%{name} added successfully", name: tag_name)
|
||||||
|
socket |> put_flash(:info, prompt) |> push_redirect(to: return_to)
|
||||||
|
end
|
||||||
|
|
||||||
|
{:noreply, socket}
|
||||||
|
end
|
||||||
|
|
||||||
|
@spec tag_options([Tag.t()]) :: [{String.t(), Tag.id()}]
|
||||||
|
defp tag_options(tags) do
|
||||||
|
tags |> Enum.map(fn %{id: id, name: name} -> {name, id} end)
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,22 @@
|
|||||||
|
<div>
|
||||||
|
<h2 class="mb-8 text-center title text-xl text-primary-600">
|
||||||
|
<%= @title %>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<.form
|
||||||
|
let={f}
|
||||||
|
for={:tag}
|
||||||
|
id="add-tag-to-container-form"
|
||||||
|
class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||||
|
phx-target={@myself}
|
||||||
|
phx-submit="save"
|
||||||
|
>
|
||||||
|
<%= select(f, :tag_id, tag_options(@tags), class: "text-center col-span-2 input input-primary") %>
|
||||||
|
<%= error_tag(f, :tag_id, "col-span-3 text-center") %>
|
||||||
|
|
||||||
|
<%= submit(dgettext("actions", "Add"),
|
||||||
|
class: "mx-auto btn btn-primary",
|
||||||
|
phx_disable_with: dgettext("prompts", "Adding...")
|
||||||
|
) %>
|
||||||
|
</.form>
|
||||||
|
</div>
|
@ -1,73 +0,0 @@
|
|||||||
defmodule CanneryWeb.ContainerLive.EditTagsComponent do
|
|
||||||
@moduledoc """
|
|
||||||
Livecomponent that can add or remove a tag to a Container
|
|
||||||
"""
|
|
||||||
|
|
||||||
use CanneryWeb, :live_component
|
|
||||||
alias Cannery.{Accounts.User, Containers, Containers.Container, Repo, Tags, Tags.Tag}
|
|
||||||
alias Phoenix.LiveView.Socket
|
|
||||||
|
|
||||||
@impl true
|
|
||||||
@spec update(
|
|
||||||
%{:container => Container.t(), :current_user => User.t(), optional(any) => any},
|
|
||||||
Socket.t()
|
|
||||||
) :: {:ok, Socket.t()}
|
|
||||||
def update(%{container: container, current_user: current_user} = assigns, socket) do
|
|
||||||
tags = Tags.list_tags(current_user)
|
|
||||||
container = container |> Repo.preload(:tags)
|
|
||||||
{:ok, socket |> assign(assigns) |> assign(tags: tags, container: container)}
|
|
||||||
end
|
|
||||||
|
|
||||||
@impl true
|
|
||||||
def handle_event(
|
|
||||||
"save",
|
|
||||||
%{"tag" => %{"tag_id" => tag_id}},
|
|
||||||
%{assigns: %{tags: tags, container: container, current_user: current_user}} = socket
|
|
||||||
) do
|
|
||||||
socket =
|
|
||||||
case tags |> Enum.find(fn %{id: id} -> tag_id == id end) do
|
|
||||||
nil ->
|
|
||||||
prompt = dgettext("errors", "Tag could not be added")
|
|
||||||
socket |> put_flash(:error, prompt)
|
|
||||||
|
|
||||||
%{name: tag_name} = tag ->
|
|
||||||
_container_tag = Containers.add_tag!(container, tag, current_user)
|
|
||||||
container = container |> Repo.preload(:tags, force: true)
|
|
||||||
prompt = dgettext("prompts", "%{name} added successfully", name: tag_name)
|
|
||||||
socket |> put_flash(:info, prompt) |> assign(container: container)
|
|
||||||
end
|
|
||||||
|
|
||||||
{:noreply, socket}
|
|
||||||
end
|
|
||||||
|
|
||||||
@impl true
|
|
||||||
def handle_event(
|
|
||||||
"delete",
|
|
||||||
%{"tag-id" => tag_id},
|
|
||||||
%{assigns: %{tags: tags, container: container, current_user: current_user}} = socket
|
|
||||||
) do
|
|
||||||
socket =
|
|
||||||
case tags |> Enum.find(fn %{id: id} -> tag_id == id end) do
|
|
||||||
nil ->
|
|
||||||
prompt = dgettext("errors", "Tag could not be removed")
|
|
||||||
socket |> put_flash(:error, prompt)
|
|
||||||
|
|
||||||
%{name: tag_name} = tag ->
|
|
||||||
_container_tag = Containers.remove_tag!(container, tag, current_user)
|
|
||||||
container = container |> Repo.preload(:tags, force: true)
|
|
||||||
prompt = dgettext("prompts", "%{name} removed successfully", name: tag_name)
|
|
||||||
socket |> put_flash(:info, prompt) |> assign(container: container)
|
|
||||||
end
|
|
||||||
|
|
||||||
{:noreply, socket}
|
|
||||||
end
|
|
||||||
|
|
||||||
@spec tag_options([Tag.t()], Container.t()) :: [{String.t(), Tag.id()}]
|
|
||||||
defp tag_options(tags, %Container{tags: container_tags}) do
|
|
||||||
container_tags_map = container_tags |> Enum.map(fn %{id: id} -> id end) |> MapSet.new()
|
|
||||||
|
|
||||||
tags
|
|
||||||
|> Enum.reject(fn %{id: id} -> container_tags_map |> MapSet.member?(id) end)
|
|
||||||
|> Enum.map(fn %{id: id, name: name} -> {name, id} end)
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,58 +0,0 @@
|
|||||||
<div class="flex flex-col justify-center items-center text-center space-y-8">
|
|
||||||
<h2 class="title text-xl text-primary-600">
|
|
||||||
<%= @title %>
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<div class="flex flex-wrap justify-center items-center">
|
|
||||||
<%= for tag <- @container.tags do %>
|
|
||||||
<%= link to: "#",
|
|
||||||
class: "mx-2 my-1 px-4 py-2 rounded-lg title text-xl",
|
|
||||||
style: "color: #{tag.text_color}; background-color: #{tag.bg_color}",
|
|
||||||
phx_click: "delete",
|
|
||||||
phx_value_tag_id: tag.id,
|
|
||||||
phx_target: @myself,
|
|
||||||
data: [
|
|
||||||
confirm:
|
|
||||||
dgettext(
|
|
||||||
"prompts",
|
|
||||||
"Are you sure you want to remove the %{tag_name} tag from %{container_name}?",
|
|
||||||
tag_name: tag.name,
|
|
||||||
container_name: @container.name
|
|
||||||
)
|
|
||||||
] do %>
|
|
||||||
<%= tag.name %>
|
|
||||||
<i class="fa-fw fa-sm fas fa-trash"></i>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= if @container.tags |> Enum.empty?() do %>
|
|
||||||
<h2 class="title text-xl text-primary-600">
|
|
||||||
<%= gettext("No tags") %>
|
|
||||||
<%= display_emoji("😔") %>
|
|
||||||
</h2>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= unless tag_options(@tags, @container) |> Enum.empty?() do %>
|
|
||||||
<hr class="hr" />
|
|
||||||
|
|
||||||
<.form
|
|
||||||
let={f}
|
|
||||||
for={:tag}
|
|
||||||
id="add-tag-to-container-form"
|
|
||||||
class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
|
||||||
phx-target={@myself}
|
|
||||||
phx-submit="save"
|
|
||||||
>
|
|
||||||
<%= select(f, :tag_id, tag_options(@tags, @container),
|
|
||||||
class: "text-center col-span-2 input input-primary"
|
|
||||||
) %>
|
|
||||||
<%= error_tag(f, :tag_id, "col-span-3 text-center") %>
|
|
||||||
|
|
||||||
<%= submit(dgettext("actions", "Add"),
|
|
||||||
class: "mx-auto btn btn-primary",
|
|
||||||
phx_disable_with: dgettext("prompts", "Adding...")
|
|
||||||
) %>
|
|
||||||
</.form>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
@ -5,13 +5,13 @@ defmodule CanneryWeb.ContainerLive.Index do
|
|||||||
|
|
||||||
use CanneryWeb, :live_view
|
use CanneryWeb, :live_view
|
||||||
import CanneryWeb.Components.ContainerCard
|
import CanneryWeb.Components.ContainerCard
|
||||||
alias Cannery.{Containers, Containers.Container, Repo}
|
alias Cannery.{Containers, Containers.Container}
|
||||||
alias CanneryWeb.Endpoint
|
alias CanneryWeb.Endpoint
|
||||||
alias Ecto.Changeset
|
alias Ecto.Changeset
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def mount(_params, session, socket) do
|
def mount(_params, session, socket) do
|
||||||
{:ok, socket |> assign_defaults(session)}
|
{:ok, socket |> assign_defaults(session) |> display_containers()}
|
||||||
end
|
end
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
@ -20,13 +20,9 @@ defmodule CanneryWeb.ContainerLive.Index do
|
|||||||
end
|
end
|
||||||
|
|
||||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
|
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
|
||||||
%{name: container_name} =
|
|
||||||
container =
|
|
||||||
Containers.get_container!(id, current_user)
|
|
||||||
|> Repo.preload([:tags, :ammo_groups], force: true)
|
|
||||||
|
|
||||||
socket
|
socket
|
||||||
|> assign(page_title: gettext("Edit %{name}", name: container_name), container: container)
|
|> assign(:page_title, gettext("Edit Container"))
|
||||||
|
|> assign(:container, Containers.get_container!(id, current_user))
|
||||||
end
|
end
|
||||||
|
|
||||||
defp apply_action(socket, :new, _params) do
|
defp apply_action(socket, :new, _params) do
|
||||||
@ -34,19 +30,7 @@ defmodule CanneryWeb.ContainerLive.Index do
|
|||||||
end
|
end
|
||||||
|
|
||||||
defp apply_action(socket, :index, _params) do
|
defp apply_action(socket, :index, _params) do
|
||||||
socket
|
socket |> assign(:page_title, gettext("Listing Containers")) |> assign(:container, nil)
|
||||||
|> assign(:page_title, gettext("Listing Containers"))
|
|
||||||
|> assign(:container, nil)
|
|
||||||
|> display_containers()
|
|
||||||
end
|
|
||||||
|
|
||||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit_tags, %{"id" => id}) do
|
|
||||||
%{name: container_name} =
|
|
||||||
container =
|
|
||||||
Containers.get_container!(id, current_user) |> Repo.preload([:tags, :ammo_groups])
|
|
||||||
|
|
||||||
page_title = gettext("Edit %{name} tags", name: container_name)
|
|
||||||
socket |> assign(page_title: page_title, container: container)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
@ -86,9 +70,6 @@ defmodule CanneryWeb.ContainerLive.Index do
|
|||||||
end
|
end
|
||||||
|
|
||||||
defp display_containers(%{assigns: %{current_user: current_user}} = socket) do
|
defp display_containers(%{assigns: %{current_user: current_user}} = socket) do
|
||||||
containers =
|
socket |> assign(containers: Containers.list_containers(current_user))
|
||||||
Containers.list_containers(current_user) |> Repo.preload([:tags, :ammo_groups], force: true)
|
|
||||||
|
|
||||||
socket |> assign(containers: containers)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -23,14 +23,6 @@
|
|||||||
<div class="flex flex-row flex-wrap justify-center items-center">
|
<div class="flex flex-row flex-wrap justify-center items-center">
|
||||||
<%= for container <- @containers do %>
|
<%= for container <- @containers do %>
|
||||||
<.container_card container={container}>
|
<.container_card container={container}>
|
||||||
<:tag_actions>
|
|
||||||
<div class="mx-4 my-2">
|
|
||||||
<%= live_patch to: Routes.container_index_path(Endpoint, :edit_tags, container),
|
|
||||||
class: "text-primary-600 link" do %>
|
|
||||||
<i class="fa-fw fa-lg fas fa-tags"></i>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
</:tag_actions>
|
|
||||||
<%= live_patch to: Routes.container_index_path(Endpoint, :edit, container),
|
<%= live_patch to: Routes.container_index_path(Endpoint, :edit, container),
|
||||||
class: "text-primary-600 link",
|
class: "text-primary-600 link",
|
||||||
data: [qa: "edit-#{container.id}"] do %>
|
data: [qa: "edit-#{container.id}"] do %>
|
||||||
@ -66,16 +58,3 @@
|
|||||||
/>
|
/>
|
||||||
</.modal>
|
</.modal>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= if @live_action == :edit_tags do %>
|
|
||||||
<.modal return_to={Routes.container_index_path(Endpoint, :index)}>
|
|
||||||
<.live_component
|
|
||||||
module={CanneryWeb.ContainerLive.EditTagsComponent}
|
|
||||||
id={@container.id}
|
|
||||||
title={@page_title}
|
|
||||||
action={@live_action}
|
|
||||||
container={@container}
|
|
||||||
current_user={@current_user}
|
|
||||||
/>
|
|
||||||
</.modal>
|
|
||||||
<% end %>
|
|
||||||
|
@ -19,9 +19,10 @@ defmodule CanneryWeb.ContainerLive.Show do
|
|||||||
def handle_params(
|
def handle_params(
|
||||||
%{"id" => id},
|
%{"id" => id},
|
||||||
_,
|
_,
|
||||||
%{assigns: %{current_user: current_user}} = socket
|
%{assigns: %{current_user: current_user, live_action: live_action}} = socket
|
||||||
) do
|
) do
|
||||||
{:noreply, socket |> render_container(id, current_user)}
|
{:noreply,
|
||||||
|
socket |> assign(page_title: page_title(live_action)) |> render_container(id, current_user)}
|
||||||
end
|
end
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
@ -84,20 +85,16 @@ defmodule CanneryWeb.ContainerLive.Show do
|
|||||||
{:noreply, socket}
|
{:noreply, socket}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp page_title(:show), do: gettext("Show Container")
|
||||||
|
defp page_title(:edit), do: gettext("Edit Container")
|
||||||
|
defp page_title(:add_tag), do: gettext("Add Tag to Container")
|
||||||
|
|
||||||
@spec render_container(Socket.t(), Container.id(), User.t()) :: Socket.t()
|
@spec render_container(Socket.t(), Container.id(), User.t()) :: Socket.t()
|
||||||
defp render_container(%{assigns: %{live_action: live_action}} = socket, id, current_user) do
|
defp render_container(socket, id, current_user) do
|
||||||
%{name: container_name} =
|
|
||||||
container =
|
container =
|
||||||
Containers.get_container!(id, current_user)
|
Containers.get_container!(id, current_user)
|
||||||
|> Repo.preload([:ammo_groups, :tags], force: true)
|
|> Repo.preload([:ammo_groups, :tags], force: true)
|
||||||
|
|
||||||
page_title =
|
socket |> assign(container: container)
|
||||||
case live_action do
|
|
||||||
:show -> gettext("Show %{name}", name: container_name)
|
|
||||||
:edit -> gettext("Edit %{name}", name: container_name)
|
|
||||||
:edit_tags -> gettext("Edit %{name} tags", name: container_name)
|
|
||||||
end
|
|
||||||
|
|
||||||
socket |> assign(container: container, page_title: page_title)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -51,23 +51,34 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<%= live_patch(dgettext("actions", "Why not add one?"),
|
<%= live_patch(dgettext("actions", "Why not add one?"),
|
||||||
to: Routes.container_show_path(Endpoint, :edit_tags, @container),
|
to: Routes.container_show_path(Endpoint, :add_tag, @container),
|
||||||
class: "btn btn-primary"
|
class: "btn btn-primary"
|
||||||
) %>
|
) %>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="flex flex-wrap justify-center items-center">
|
<h2 class="mb-4 title text-xl text-primary-600">
|
||||||
<%= for tag <- @container.tags do %>
|
<%= gettext("Tags") %>
|
||||||
<.simple_tag_card tag={tag} />
|
</h2>
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="mx-4 my-2">
|
<%= for tag <- @container.tags do %>
|
||||||
<%= live_patch to: Routes.container_show_path(Endpoint, :edit_tags, @container),
|
<.tag_card tag={tag}>
|
||||||
class: "text-primary-600 link" do %>
|
<%= link to: "#",
|
||||||
<i class="fa-fw fa-lg fas fa-tags"></i>
|
class: "text-primary-600 link",
|
||||||
|
phx_click: "delete_tag",
|
||||||
|
phx_value_tag_id: tag.id,
|
||||||
|
data: [
|
||||||
|
confirm:
|
||||||
|
dgettext(
|
||||||
|
"prompts",
|
||||||
|
"Are you sure you want to remove the %{tag_name} tag from %{container_name}?",
|
||||||
|
tag_name: tag.name,
|
||||||
|
container_name: @container.name
|
||||||
|
)
|
||||||
|
] do %>
|
||||||
|
<i class="fa-fw fa-lg fas fa-trash"></i>
|
||||||
|
<% end %>
|
||||||
|
</.tag_card>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<hr class="mb-4 hr" />
|
<hr class="mb-4 hr" />
|
||||||
@ -76,11 +87,9 @@
|
|||||||
<%= if @container.ammo_groups |> Enum.empty?() do %>
|
<%= if @container.ammo_groups |> Enum.empty?() do %>
|
||||||
<%= gettext("No ammo groups in this container") %>
|
<%= gettext("No ammo groups in this container") %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="flex flex-wrap justify-center items-center">
|
|
||||||
<%= for ammo_group <- @container.ammo_groups do %>
|
<%= for ammo_group <- @container.ammo_groups do %>
|
||||||
<.ammo_group_card ammo_group={ammo_group} />
|
<.ammo_group_card ammo_group={ammo_group} />
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -99,10 +108,10 @@
|
|||||||
</.modal>
|
</.modal>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= if @live_action == :edit_tags do %>
|
<%= if @live_action == :add_tag do %>
|
||||||
<.modal return_to={Routes.container_show_path(Endpoint, :show, @container)}>
|
<.modal return_to={Routes.container_show_path(Endpoint, :show, @container)}>
|
||||||
<.live_component
|
<.live_component
|
||||||
module={CanneryWeb.ContainerLive.EditTagsComponent}
|
module={CanneryWeb.ContainerLive.AddTagComponent}
|
||||||
id={@container.id}
|
id={@container.id}
|
||||||
title={@page_title}
|
title={@page_title}
|
||||||
action={@live_action}
|
action={@live_action}
|
||||||
|
@ -9,13 +9,7 @@ defmodule CanneryWeb.HomeLive do
|
|||||||
@impl true
|
@impl true
|
||||||
def mount(_params, session, socket) do
|
def mount(_params, session, socket) do
|
||||||
admins = Accounts.list_users_by_role(:admin)
|
admins = Accounts.list_users_by_role(:admin)
|
||||||
|
{:ok, socket |> assign_defaults(session) |> assign(query: "", results: %{}, admins: admins)}
|
||||||
socket =
|
|
||||||
socket
|
|
||||||
|> assign_defaults(session)
|
|
||||||
|> assign(page_title: "Home", query: "", results: %{}, admins: admins)
|
|
||||||
|
|
||||||
{:ok, socket}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
@ -130,7 +124,7 @@ defmodule CanneryWeb.HomeLive do
|
|||||||
<li class="flex flex-row justify-center space-x-2">
|
<li class="flex flex-row justify-center space-x-2">
|
||||||
<b>Version:</b>
|
<b>Version:</b>
|
||||||
<p>
|
<p>
|
||||||
0.2.0
|
0.1.0
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -64,11 +64,10 @@ defmodule CanneryWeb.Router do
|
|||||||
live "/containers", ContainerLive.Index, :index
|
live "/containers", ContainerLive.Index, :index
|
||||||
live "/containers/new", ContainerLive.Index, :new
|
live "/containers/new", ContainerLive.Index, :new
|
||||||
live "/containers/:id/edit", ContainerLive.Index, :edit
|
live "/containers/:id/edit", ContainerLive.Index, :edit
|
||||||
live "/containers/:id/edit_tags", ContainerLive.Index, :edit_tags
|
|
||||||
|
|
||||||
live "/containers/:id", ContainerLive.Show, :show
|
live "/containers/:id", ContainerLive.Show, :show
|
||||||
live "/containers/:id/show/edit", ContainerLive.Show, :edit
|
live "/containers/:id/show/edit", ContainerLive.Show, :edit
|
||||||
live "/containers/:id/show/edit_tags", ContainerLive.Show, :edit_tags
|
live "/containers/:id/show/add_tag", ContainerLive.Show, :add_tag
|
||||||
|
|
||||||
live "/ammo_groups", AmmoGroupLive.Index, :index
|
live "/ammo_groups", AmmoGroupLive.Index, :index
|
||||||
live "/ammo_groups/new", AmmoGroupLive.Index, :new
|
live "/ammo_groups/new", AmmoGroupLive.Index, :new
|
||||||
|
@ -5,11 +5,7 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<%= csrf_meta_tag() %>
|
<%= csrf_meta_tag() %>
|
||||||
<%= if(assigns |> Map.has_key?(:page_title),
|
<%= live_title_tag(assigns[:page_title] || "Cannery", suffix: "") %>
|
||||||
do: "#{assigns.page_title} | Cannery",
|
|
||||||
else: "Cannery"
|
|
||||||
)
|
|
||||||
|> live_title_tag(suffix: "") %>
|
|
||||||
<link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/css/app.css")} />
|
<link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/css/app.css")} />
|
||||||
<script
|
<script
|
||||||
defer
|
defer
|
||||||
|
2
mix.exs
2
mix.exs
@ -4,7 +4,7 @@ defmodule Cannery.MixProject do
|
|||||||
def project do
|
def project do
|
||||||
[
|
[
|
||||||
app: :cannery,
|
app: :cannery,
|
||||||
version: "0.2.0",
|
version: "0.1.0",
|
||||||
elixir: "~> 1.12",
|
elixir: "~> 1.12",
|
||||||
elixirc_paths: elixirc_paths(Mix.env()),
|
elixirc_paths: elixirc_paths(Mix.env()),
|
||||||
compilers: [:gettext] ++ Mix.compilers(),
|
compilers: [:gettext] ++ Mix.compilers(),
|
||||||
|
@ -145,7 +145,7 @@ msgid "Why not add one?"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:52
|
#: lib/cannery_web/live/container_live/add_tag_component.html.heex:17
|
||||||
msgid "Add"
|
msgid "Add"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -161,13 +161,13 @@ msgstr ""
|
|||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:85
|
#: lib/cannery_web/live/ammo_group_live/index.html.heex:85
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:86
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:67
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:36
|
#: lib/cannery_web/live/range_live/index.html.heex:36
|
||||||
msgid "Record shots"
|
msgid "Record shots"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:50
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:31
|
||||||
msgid "Ammo Details"
|
msgid "Ammo Details"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ msgid "Add another container!"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:80
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:61
|
||||||
msgid "Move containers"
|
msgid "Move containers"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -11,12 +11,12 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:63
|
#: lib/cannery_web/live/home_live.ex:57
|
||||||
msgid "%{name} lets you easily keep an eye on your ammo levels before and after range day"
|
msgid "%{name} lets you easily keep an eye on your ammo levels before and after range day"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:85
|
#: lib/cannery_web/live/home_live.ex:79
|
||||||
msgid "Access from any internet-capable device"
|
msgid "Access from any internet-capable device"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ msgid "Admins"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:99
|
#: lib/cannery_web/live/home_live.ex:93
|
||||||
msgid "Admins:"
|
msgid "Admins:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -56,7 +56,6 @@ msgstr ""
|
|||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:154
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:154
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:67
|
#: lib/cannery_web/live/ammo_type_live/index.ex:67
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:55
|
|
||||||
msgid "Blank"
|
msgid "Blank"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -116,7 +115,6 @@ msgstr ""
|
|||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:158
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:158
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:68
|
#: lib/cannery_web/live/ammo_type_live/index.ex:68
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
|
|
||||||
msgid "Corrosive"
|
msgid "Corrosive"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -139,7 +137,7 @@ msgid "Description"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/container_card.ex:31
|
#: lib/cannery_web/components/container_card.ex:27
|
||||||
#: lib/cannery_web/live/container_live/show.html.heex:8
|
#: lib/cannery_web/live/container_live/show.html.heex:8
|
||||||
msgid "Description:"
|
msgid "Description:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -150,7 +148,7 @@ msgid "Disable"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:60
|
#: lib/cannery_web/live/home_live.ex:54
|
||||||
msgid "Easy to Use:"
|
msgid "Easy to Use:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -166,6 +164,12 @@ msgstr ""
|
|||||||
msgid "Edit Ammo type"
|
msgid "Edit Ammo type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-autogen, elixir-format
|
||||||
|
#: lib/cannery_web/live/container_live/index.ex:24
|
||||||
|
#: lib/cannery_web/live/container_live/show.ex:89
|
||||||
|
msgid "Edit Container"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/invite_live/index.ex:35
|
#: lib/cannery_web/live/invite_live/index.ex:35
|
||||||
msgid "Edit Invite"
|
msgid "Edit Invite"
|
||||||
@ -201,12 +205,11 @@ msgstr ""
|
|||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:150
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:150
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:66
|
#: lib/cannery_web/live/ammo_type_live/index.ex:66
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
|
|
||||||
msgid "Incendiary"
|
msgid "Incendiary"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:94
|
#: lib/cannery_web/live/home_live.ex:88
|
||||||
msgid "Instance Information"
|
msgid "Instance Information"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -216,7 +219,7 @@ msgid "Invite Disabled"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:125
|
#: lib/cannery_web/live/home_live.ex:119
|
||||||
msgid "Invite Only"
|
msgid "Invite Only"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -237,7 +240,7 @@ msgid "Listing Ammo types"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/index.ex:38
|
#: lib/cannery_web/live/container_live/index.ex:33
|
||||||
msgid "Listing Containers"
|
msgid "Listing Containers"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -258,7 +261,7 @@ msgid "Location"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/container_card.ex:43
|
#: lib/cannery_web/components/container_card.ex:39
|
||||||
#: lib/cannery_web/live/container_live/show.html.heex:20
|
#: lib/cannery_web/live/container_live/show.html.heex:20
|
||||||
msgid "Location:"
|
msgid "Location:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -276,7 +279,6 @@ msgstr ""
|
|||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:162
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:162
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:69
|
#: lib/cannery_web/live/ammo_type_live/index.ex:69
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:57
|
|
||||||
msgid "Manufacturer"
|
msgid "Manufacturer"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -305,7 +307,7 @@ msgid "New Ammo type"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/index.ex:33
|
#: lib/cannery_web/live/container_live/index.ex:29
|
||||||
msgid "New Container"
|
msgid "New Container"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -330,12 +332,12 @@ msgid "No Ammo Types"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:114
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:109
|
||||||
msgid "No ammo for this type"
|
msgid "No ammo for this type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/show.html.heex:77
|
#: lib/cannery_web/live/container_live/show.html.heex:88
|
||||||
msgid "No ammo groups in this container"
|
msgid "No ammo groups in this container"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -350,7 +352,6 @@ msgid "No invites"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:30
|
|
||||||
#: lib/cannery_web/live/tag_live/index.html.heex:10
|
#: lib/cannery_web/live/tag_live/index.html.heex:10
|
||||||
msgid "No tags"
|
msgid "No tags"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -358,7 +359,7 @@ msgstr ""
|
|||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:30
|
#: lib/cannery_web/components/add_shot_group_component.html.heex:30
|
||||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
|
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:122
|
#: lib/cannery_web/live/ammo_group_live/index.html.heex:36
|
||||||
#: lib/cannery_web/live/range_live/form_component.html.heex:29
|
#: lib/cannery_web/live/range_live/form_component.html.heex:29
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:67
|
#: lib/cannery_web/live/range_live/index.html.heex:67
|
||||||
msgid "Notes"
|
msgid "Notes"
|
||||||
@ -366,7 +367,7 @@ msgstr ""
|
|||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/ammo_group_card.ex:35
|
#: lib/cannery_web/components/ammo_group_card.ex:35
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:24
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:14
|
||||||
msgid "Notes:"
|
msgid "Notes:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -390,6 +391,7 @@ msgstr ""
|
|||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/ammo_group_card.ex:42
|
#: lib/cannery_web/components/ammo_group_card.ex:42
|
||||||
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:21
|
||||||
msgid "Price paid:"
|
msgid "Price paid:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -401,17 +403,22 @@ msgid "Primer type"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:124
|
#: lib/cannery_web/live/home_live.ex:118
|
||||||
msgid "Public Signups"
|
msgid "Public Signups"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:72
|
#: lib/cannery_web/live/ammo_type_live/index.ex:64
|
||||||
|
msgid "Rimfire"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-autogen, elixir-format
|
||||||
|
#: lib/cannery_web/live/home_live.ex:66
|
||||||
msgid "Secure:"
|
msgid "Secure:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:75
|
#: lib/cannery_web/live/home_live.ex:69
|
||||||
msgid "Self-host your own instance, or use an instance from someone you trust."
|
msgid "Self-host your own instance, or use an instance from someone you trust."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -436,7 +443,12 @@ msgid "Show Ammo type"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:82
|
#: lib/cannery_web/live/container_live/show.ex:88
|
||||||
|
msgid "Show Container"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-autogen, elixir-format
|
||||||
|
#: lib/cannery_web/live/home_live.ex:76
|
||||||
msgid "Simple:"
|
msgid "Simple:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -446,12 +458,13 @@ msgid "Steel"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:98
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:79
|
||||||
msgid "Stored in"
|
msgid "Stored in"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/topbar.ex:40
|
#: lib/cannery_web/components/topbar.ex:40
|
||||||
|
#: lib/cannery_web/live/container_live/show.html.heex:60
|
||||||
#: lib/cannery_web/live/tag_live/index.html.heex:3
|
#: lib/cannery_web/live/tag_live/index.html.heex:3
|
||||||
msgid "Tags"
|
msgid "Tags"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -467,19 +480,18 @@ msgid "Text color"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:51
|
#: lib/cannery_web/live/home_live.ex:45
|
||||||
msgid "The self-hosted firearm tracker website"
|
msgid "The self-hosted firearm tracker website"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:103
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:84
|
||||||
msgid "This ammo group is not in a container"
|
msgid "This ammo group is not in a container"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:146
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:146
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:65
|
#: lib/cannery_web/live/ammo_type_live/index.ex:65
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:53
|
|
||||||
msgid "Tracer"
|
msgid "Tracer"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -490,7 +502,7 @@ msgid "Type"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/container_card.ex:37
|
#: lib/cannery_web/components/container_card.ex:33
|
||||||
#: lib/cannery_web/live/container_live/show.html.heex:14
|
#: lib/cannery_web/live/container_live/show.html.heex:14
|
||||||
msgid "Type:"
|
msgid "Type:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -511,15 +523,20 @@ msgid "Uses left"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:47
|
#: lib/cannery_web/live/home_live.ex:41
|
||||||
msgid "Welcome to %{name}"
|
msgid "Welcome to %{name}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:76
|
#: lib/cannery_web/live/home_live.ex:70
|
||||||
msgid "Your data stays with you, period"
|
msgid "Your data stays with you, period"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-autogen, elixir-format
|
||||||
|
#: lib/cannery_web/live/container_live/show.ex:90
|
||||||
|
msgid "Add Tag to Container"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/show.html.heex:49
|
#: lib/cannery_web/live/container_live/show.html.heex:49
|
||||||
msgid "No tags for this container"
|
msgid "No tags for this container"
|
||||||
@ -537,7 +554,6 @@ msgid "Range day"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:125
|
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:70
|
#: lib/cannery_web/live/range_live/index.html.heex:70
|
||||||
msgid "Date"
|
msgid "Date"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -553,13 +569,13 @@ msgid "No ammo staged"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:77
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:58
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:33
|
#: lib/cannery_web/live/range_live/index.html.heex:33
|
||||||
msgid "Stage for range"
|
msgid "Stage for range"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:76
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:57
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:32
|
#: lib/cannery_web/live/range_live/index.html.heex:32
|
||||||
msgid "Unstage from range"
|
msgid "Unstage from range"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -613,7 +629,6 @@ msgid "Rounds left"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:119
|
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:64
|
#: lib/cannery_web/live/range_live/index.html.heex:64
|
||||||
msgid "Rounds shot"
|
msgid "Rounds shot"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -647,8 +662,7 @@ msgstr ""
|
|||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/ammo_group_card.ex:43
|
#: lib/cannery_web/components/ammo_group_card.ex:43
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:64
|
#: lib/cannery_web/live/ammo_group_live/index.html.heex:64
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:32
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:22
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:39
|
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:98
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:98
|
||||||
msgid "$%{amount}"
|
msgid "$%{amount}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -689,7 +703,6 @@ msgstr ""
|
|||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:168
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:168
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:70
|
#: lib/cannery_web/live/ammo_type_live/index.ex:70
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
|
|
||||||
msgid "UPC"
|
msgid "UPC"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -721,8 +734,6 @@ msgstr ""
|
|||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:137
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:137
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:64
|
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:52
|
|
||||||
msgid "Firing type"
|
msgid "Firing type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -735,75 +746,3 @@ msgstr ""
|
|||||||
#: lib/cannery_web/templates/layout/live.html.heex:37
|
#: lib/cannery_web/templates/layout/live.html.heex:37
|
||||||
msgid "Loading..."
|
msgid "Loading..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/container_live/index.ex:29
|
|
||||||
#: lib/cannery_web/live/container_live/show.ex:97
|
|
||||||
msgid "Edit %{name}"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/container_live/index.ex:48
|
|
||||||
#: lib/cannery_web/live/container_live/show.ex:98
|
|
||||||
msgid "Edit %{name} tags"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/components/container_card.ex:50
|
|
||||||
msgid "Rounds:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/container_live/show.ex:96
|
|
||||||
msgid "Show %{name}"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
|
|
||||||
msgid "No cost information"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:36
|
|
||||||
msgid "% left"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:38
|
|
||||||
msgid "Current value:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:31
|
|
||||||
msgid "Original cost:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:13
|
|
||||||
msgid "Original count:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:18
|
|
||||||
msgid "Percentage left:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:111
|
|
||||||
msgid "Rounds used"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:77
|
|
||||||
msgid "Current # of rounds:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:32
|
|
||||||
msgid "Total # of rounds"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:85
|
|
||||||
msgid "Total rounds shot:"
|
|
||||||
msgstr ""
|
|
||||||
|
@ -32,14 +32,14 @@ msgid "Add your first type!"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:16
|
#: lib/cannery_web/templates/user_settings/edit.html.heex:17
|
||||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:45
|
#: lib/cannery_web/templates/user_settings/edit.html.heex:46
|
||||||
msgid "Change email"
|
msgid "Change email"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:60
|
#: lib/cannery_web/templates/user_settings/edit.html.heex:61
|
||||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:101
|
#: lib/cannery_web/templates/user_settings/edit.html.heex:102
|
||||||
msgid "Change password"
|
msgid "Change password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -49,14 +49,14 @@ msgid "Create Invite"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:108
|
#: lib/cannery_web/templates/user_settings/edit.html.heex:109
|
||||||
msgid "Delete User"
|
msgid "Delete User"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/templates/user_registration/new.html.heex:43
|
#: lib/cannery_web/templates/user_registration/new.html.heex:44
|
||||||
#: lib/cannery_web/templates/user_reset_password/new.html.heex:3
|
#: lib/cannery_web/templates/user_reset_password/new.html.heex:3
|
||||||
#: lib/cannery_web/templates/user_session/new.html.heex:45
|
#: lib/cannery_web/templates/user_session/new.html.heex:46
|
||||||
msgid "Forgot your password?"
|
msgid "Forgot your password?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -67,12 +67,12 @@ msgstr ""
|
|||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/topbar.ex:108
|
#: lib/cannery_web/components/topbar.ex:108
|
||||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:30
|
#: lib/cannery_web/templates/user_confirmation/new.html.heex:31
|
||||||
#: lib/cannery_web/templates/user_registration/new.html.heex:39
|
#: lib/cannery_web/templates/user_registration/new.html.heex:40
|
||||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:48
|
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:49
|
||||||
#: lib/cannery_web/templates/user_reset_password/new.html.heex:30
|
#: lib/cannery_web/templates/user_reset_password/new.html.heex:31
|
||||||
#: lib/cannery_web/templates/user_session/new.html.heex:3
|
#: lib/cannery_web/templates/user_session/new.html.heex:3
|
||||||
#: lib/cannery_web/templates/user_session/new.html.heex:33
|
#: lib/cannery_web/templates/user_session/new.html.heex:34
|
||||||
msgid "Log in"
|
msgid "Log in"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -103,31 +103,31 @@ msgstr ""
|
|||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/topbar.ex:101
|
#: lib/cannery_web/components/topbar.ex:101
|
||||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:25
|
#: lib/cannery_web/templates/user_confirmation/new.html.heex:26
|
||||||
#: lib/cannery_web/templates/user_registration/new.html.heex:3
|
#: lib/cannery_web/templates/user_registration/new.html.heex:3
|
||||||
#: lib/cannery_web/templates/user_registration/new.html.heex:33
|
#: lib/cannery_web/templates/user_registration/new.html.heex:34
|
||||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:43
|
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:44
|
||||||
#: lib/cannery_web/templates/user_reset_password/new.html.heex:25
|
#: lib/cannery_web/templates/user_reset_password/new.html.heex:26
|
||||||
#: lib/cannery_web/templates/user_session/new.html.heex:40
|
#: lib/cannery_web/templates/user_session/new.html.heex:41
|
||||||
msgid "Register"
|
msgid "Register"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:3
|
#: lib/cannery_web/templates/user_confirmation/new.html.heex:3
|
||||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:16
|
#: lib/cannery_web/templates/user_confirmation/new.html.heex:17
|
||||||
msgid "Resend confirmation instructions"
|
msgid "Resend confirmation instructions"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:3
|
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:3
|
||||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:34
|
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:35
|
||||||
msgid "Reset password"
|
msgid "Reset password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:42
|
#: lib/cannery_web/components/add_shot_group_component.html.heex:42
|
||||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:54
|
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:54
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:172
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:175
|
||||||
#: lib/cannery_web/live/container_live/form_component.html.heex:50
|
#: lib/cannery_web/live/container_live/form_component.html.heex:50
|
||||||
#: lib/cannery_web/live/invite_live/form_component.html.heex:28
|
#: lib/cannery_web/live/invite_live/form_component.html.heex:28
|
||||||
#: lib/cannery_web/live/range_live/form_component.html.heex:40
|
#: lib/cannery_web/live/range_live/form_component.html.heex:40
|
||||||
@ -136,7 +136,7 @@ msgid "Save"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/templates/user_reset_password/new.html.heex:16
|
#: lib/cannery_web/templates/user_reset_password/new.html.heex:17
|
||||||
msgid "Send instructions to reset password"
|
msgid "Send instructions to reset password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ msgid "Why not add one?"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:52
|
#: lib/cannery_web/live/container_live/add_tag_component.html.heex:17
|
||||||
msgid "Add"
|
msgid "Add"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -162,13 +162,13 @@ msgstr ""
|
|||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:85
|
#: lib/cannery_web/live/ammo_group_live/index.html.heex:85
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:86
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:67
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:36
|
#: lib/cannery_web/live/range_live/index.html.heex:36
|
||||||
msgid "Record shots"
|
msgid "Record shots"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:50
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:31
|
||||||
msgid "Ammo Details"
|
msgid "Ammo Details"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -178,7 +178,7 @@ msgid "Add another container!"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:80
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:61
|
||||||
msgid "Move containers"
|
msgid "Move containers"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -12,12 +12,12 @@ msgstr ""
|
|||||||
"Plural-Forms: nplurals=2\n"
|
"Plural-Forms: nplurals=2\n"
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:63
|
#: lib/cannery_web/live/home_live.ex:57
|
||||||
msgid "%{name} lets you easily keep an eye on your ammo levels before and after range day"
|
msgid "%{name} lets you easily keep an eye on your ammo levels before and after range day"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:85
|
#: lib/cannery_web/live/home_live.ex:79
|
||||||
msgid "Access from any internet-capable device"
|
msgid "Access from any internet-capable device"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ msgid "Admins"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:99
|
#: lib/cannery_web/live/home_live.ex:93
|
||||||
msgid "Admins:"
|
msgid "Admins:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -55,14 +55,14 @@ msgid "Background color"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:154
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:157
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:67
|
#: lib/cannery_web/live/ammo_type_live/index.ex:67
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:55
|
|
||||||
msgid "Blank"
|
msgid "Blank"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:74
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:74
|
||||||
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:102
|
||||||
msgid "Brass"
|
msgid "Brass"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -115,9 +115,8 @@ msgid "Containers"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:158
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:161
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:68
|
#: lib/cannery_web/live/ammo_type_live/index.ex:68
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
|
|
||||||
msgid "Corrosive"
|
msgid "Corrosive"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -140,7 +139,7 @@ msgid "Description"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/container_card.ex:31
|
#: lib/cannery_web/components/container_card.ex:27
|
||||||
#: lib/cannery_web/live/container_live/show.html.heex:8
|
#: lib/cannery_web/live/container_live/show.html.heex:8
|
||||||
msgid "Description:"
|
msgid "Description:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -151,7 +150,7 @@ msgid "Disable"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:60
|
#: lib/cannery_web/live/home_live.ex:54
|
||||||
msgid "Easy to Use:"
|
msgid "Easy to Use:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -167,6 +166,12 @@ msgstr ""
|
|||||||
msgid "Edit Ammo type"
|
msgid "Edit Ammo type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-autogen, elixir-format
|
||||||
|
#: lib/cannery_web/live/container_live/index.ex:24
|
||||||
|
#: lib/cannery_web/live/container_live/show.ex:89
|
||||||
|
msgid "Edit Container"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/invite_live/index.ex:35
|
#: lib/cannery_web/live/invite_live/index.ex:35
|
||||||
msgid "Edit Invite"
|
msgid "Edit Invite"
|
||||||
@ -193,21 +198,20 @@ msgid "FMJ"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:113
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:116
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:61
|
#: lib/cannery_web/live/ammo_type_live/index.ex:61
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:49
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:49
|
||||||
msgid "Grains"
|
msgid "Grains"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:150
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:153
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:66
|
#: lib/cannery_web/live/ammo_type_live/index.ex:66
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
|
|
||||||
msgid "Incendiary"
|
msgid "Incendiary"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:94
|
#: lib/cannery_web/live/home_live.ex:88
|
||||||
msgid "Instance Information"
|
msgid "Instance Information"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -217,7 +221,7 @@ msgid "Invite Disabled"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:125
|
#: lib/cannery_web/live/home_live.ex:119
|
||||||
msgid "Invite Only"
|
msgid "Invite Only"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -228,7 +232,7 @@ msgid "Invites"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/templates/user_session/new.html.heex:28
|
#: lib/cannery_web/templates/user_session/new.html.heex:29
|
||||||
msgid "Keep me logged in for 60 days"
|
msgid "Keep me logged in for 60 days"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -238,7 +242,7 @@ msgid "Listing Ammo types"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/index.ex:38
|
#: lib/cannery_web/live/container_live/index.ex:33
|
||||||
msgid "Listing Containers"
|
msgid "Listing Containers"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -259,7 +263,7 @@ msgid "Location"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/container_card.ex:43
|
#: lib/cannery_web/components/container_card.ex:39
|
||||||
#: lib/cannery_web/live/container_live/show.html.heex:20
|
#: lib/cannery_web/live/container_live/show.html.heex:20
|
||||||
msgid "Location:"
|
msgid "Location:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -275,9 +279,8 @@ msgid "Manage"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:162
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:165
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:69
|
#: lib/cannery_web/live/ammo_type_live/index.ex:69
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:57
|
|
||||||
msgid "Manufacturer"
|
msgid "Manufacturer"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -306,7 +309,7 @@ msgid "New Ammo type"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/index.ex:33
|
#: lib/cannery_web/live/container_live/index.ex:29
|
||||||
msgid "New Container"
|
msgid "New Container"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -331,12 +334,12 @@ msgid "No Ammo Types"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:114
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:109
|
||||||
msgid "No ammo for this type"
|
msgid "No ammo for this type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/show.html.heex:77
|
#: lib/cannery_web/live/container_live/show.html.heex:88
|
||||||
msgid "No ammo groups in this container"
|
msgid "No ammo groups in this container"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -351,7 +354,6 @@ msgid "No invites"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:30
|
|
||||||
#: lib/cannery_web/live/tag_live/index.html.heex:10
|
#: lib/cannery_web/live/tag_live/index.html.heex:10
|
||||||
msgid "No tags"
|
msgid "No tags"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -359,7 +361,7 @@ msgstr ""
|
|||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:30
|
#: lib/cannery_web/components/add_shot_group_component.html.heex:30
|
||||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
|
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:122
|
#: lib/cannery_web/live/ammo_group_live/index.html.heex:36
|
||||||
#: lib/cannery_web/live/range_live/form_component.html.heex:29
|
#: lib/cannery_web/live/range_live/form_component.html.heex:29
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:67
|
#: lib/cannery_web/live/range_live/index.html.heex:67
|
||||||
msgid "Notes"
|
msgid "Notes"
|
||||||
@ -367,7 +369,7 @@ msgstr ""
|
|||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/ammo_group_card.ex:35
|
#: lib/cannery_web/components/ammo_group_card.ex:35
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:24
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:14
|
||||||
msgid "Notes:"
|
msgid "Notes:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -377,7 +379,7 @@ msgid "On the bookshelf"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:124
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:50
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:50
|
||||||
msgid "Pressure"
|
msgid "Pressure"
|
||||||
@ -391,28 +393,34 @@ msgstr ""
|
|||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/ammo_group_card.ex:42
|
#: lib/cannery_web/components/ammo_group_card.ex:42
|
||||||
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:21
|
||||||
msgid "Price paid:"
|
msgid "Price paid:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:128
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:131
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:63
|
#: lib/cannery_web/live/ammo_type_live/index.ex:63
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:51
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:51
|
||||||
msgid "Primer type"
|
msgid "Primer type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:124
|
#: lib/cannery_web/live/home_live.ex:118
|
||||||
msgid "Public Signups"
|
msgid "Public Signups"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:72
|
#: lib/cannery_web/live/ammo_type_live/index.ex:64
|
||||||
|
msgid "Rimfire"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-autogen, elixir-format
|
||||||
|
#: lib/cannery_web/live/home_live.ex:66
|
||||||
msgid "Secure:"
|
msgid "Secure:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:75
|
#: lib/cannery_web/live/home_live.ex:69
|
||||||
msgid "Self-host your own instance, or use an instance from someone you trust."
|
msgid "Self-host your own instance, or use an instance from someone you trust."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -437,7 +445,12 @@ msgid "Show Ammo type"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:82
|
#: lib/cannery_web/live/container_live/show.ex:88
|
||||||
|
msgid "Show Container"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-autogen, elixir-format
|
||||||
|
#: lib/cannery_web/live/home_live.ex:76
|
||||||
msgid "Simple:"
|
msgid "Simple:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -447,12 +460,13 @@ msgid "Steel"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:98
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:79
|
||||||
msgid "Stored in"
|
msgid "Stored in"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/topbar.ex:40
|
#: lib/cannery_web/components/topbar.ex:40
|
||||||
|
#: lib/cannery_web/live/container_live/show.html.heex:60
|
||||||
#: lib/cannery_web/live/tag_live/index.html.heex:3
|
#: lib/cannery_web/live/tag_live/index.html.heex:3
|
||||||
msgid "Tags"
|
msgid "Tags"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -468,19 +482,18 @@ msgid "Text color"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:51
|
#: lib/cannery_web/live/home_live.ex:45
|
||||||
msgid "The self-hosted firearm tracker website"
|
msgid "The self-hosted firearm tracker website"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:103
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:84
|
||||||
msgid "This ammo group is not in a container"
|
msgid "This ammo group is not in a container"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:146
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:149
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:65
|
#: lib/cannery_web/live/ammo_type_live/index.ex:65
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:53
|
|
||||||
msgid "Tracer"
|
msgid "Tracer"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -491,7 +504,7 @@ msgid "Type"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/container_card.ex:37
|
#: lib/cannery_web/components/container_card.ex:33
|
||||||
#: lib/cannery_web/live/container_live/show.html.heex:14
|
#: lib/cannery_web/live/container_live/show.html.heex:14
|
||||||
msgid "Type:"
|
msgid "Type:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -512,15 +525,20 @@ msgid "Uses left"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:47
|
#: lib/cannery_web/live/home_live.ex:41
|
||||||
msgid "Welcome to %{name}"
|
msgid "Welcome to %{name}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:76
|
#: lib/cannery_web/live/home_live.ex:70
|
||||||
msgid "Your data stays with you, period"
|
msgid "Your data stays with you, period"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-autogen, elixir-format
|
||||||
|
#: lib/cannery_web/live/container_live/show.ex:90
|
||||||
|
msgid "Add Tag to Container"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/show.html.heex:49
|
#: lib/cannery_web/live/container_live/show.html.heex:49
|
||||||
msgid "No tags for this container"
|
msgid "No tags for this container"
|
||||||
@ -538,7 +556,6 @@ msgid "Range day"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:125
|
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:70
|
#: lib/cannery_web/live/range_live/index.html.heex:70
|
||||||
msgid "Date"
|
msgid "Date"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -554,13 +571,13 @@ msgid "No ammo staged"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:77
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:58
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:33
|
#: lib/cannery_web/live/range_live/index.html.heex:33
|
||||||
msgid "Stage for range"
|
msgid "Stage for range"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:76
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:57
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:32
|
#: lib/cannery_web/live/range_live/index.html.heex:32
|
||||||
msgid "Unstage from range"
|
msgid "Unstage from range"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -614,7 +631,6 @@ msgid "Rounds left"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:119
|
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:64
|
#: lib/cannery_web/live/range_live/index.html.heex:64
|
||||||
msgid "Rounds shot"
|
msgid "Rounds shot"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -648,8 +664,7 @@ msgstr ""
|
|||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/ammo_group_card.ex:43
|
#: lib/cannery_web/components/ammo_group_card.ex:43
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:64
|
#: lib/cannery_web/live/ammo_group_live/index.html.heex:64
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:32
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:22
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:39
|
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:98
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:98
|
||||||
msgid "$%{amount}"
|
msgid "$%{amount}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -674,7 +689,7 @@ msgid "Muzzle velocity"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:103
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:106
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:60
|
#: lib/cannery_web/live/ammo_type_live/index.ex:60
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
|
||||||
msgid "Powder grains per charge"
|
msgid "Powder grains per charge"
|
||||||
@ -688,25 +703,24 @@ msgid "Powder type"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:168
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:70
|
#: lib/cannery_web/live/ammo_type_live/index.ex:70
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
|
|
||||||
msgid "UPC"
|
msgid "UPC"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:80
|
#: lib/cannery_web/templates/user_settings/edit.html.heex:81
|
||||||
msgid "Confirm new password"
|
msgid "Confirm new password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:33
|
#: lib/cannery_web/templates/user_settings/edit.html.heex:34
|
||||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:89
|
#: lib/cannery_web/templates/user_settings/edit.html.heex:90
|
||||||
msgid "Current password"
|
msgid "Current password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:73
|
#: lib/cannery_web/templates/user_settings/edit.html.heex:74
|
||||||
msgid "New password"
|
msgid "New password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -721,9 +735,7 @@ msgid "Unstage"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:137
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:140
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.ex:64
|
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:52
|
|
||||||
msgid "Firing type"
|
msgid "Firing type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -736,75 +748,3 @@ msgstr ""
|
|||||||
#: lib/cannery_web/templates/layout/live.html.heex:37
|
#: lib/cannery_web/templates/layout/live.html.heex:37
|
||||||
msgid "Loading..."
|
msgid "Loading..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/container_live/index.ex:29
|
|
||||||
#: lib/cannery_web/live/container_live/show.ex:97
|
|
||||||
msgid "Edit %{name}"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/container_live/index.ex:48
|
|
||||||
#: lib/cannery_web/live/container_live/show.ex:98
|
|
||||||
msgid "Edit %{name} tags"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format, fuzzy
|
|
||||||
#: lib/cannery_web/components/container_card.ex:50
|
|
||||||
msgid "Rounds:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/container_live/show.ex:96
|
|
||||||
msgid "Show %{name}"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
|
|
||||||
msgid "No cost information"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:36
|
|
||||||
msgid "% left"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:38
|
|
||||||
msgid "Current value:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:31
|
|
||||||
msgid "Original cost:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:13
|
|
||||||
msgid "Original count:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:18
|
|
||||||
msgid "Percentage left:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format, fuzzy
|
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:111
|
|
||||||
msgid "Rounds used"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:77
|
|
||||||
msgid "Current # of rounds:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:32
|
|
||||||
msgid "Total # of rounds"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:85
|
|
||||||
msgid "Total rounds shot:"
|
|
||||||
msgstr ""
|
|
||||||
|
@ -11,18 +11,18 @@ msgstr ""
|
|||||||
"Language: en\n"
|
"Language: en\n"
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery/containers.ex:122
|
#: lib/cannery/containers.ex:105
|
||||||
msgid "Container must be empty before deleting"
|
msgid "Container must be empty before deleting"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/index.ex:71
|
#: lib/cannery_web/live/container_live/index.ex:55
|
||||||
#: lib/cannery_web/live/container_live/show.ex:73
|
#: lib/cannery_web/live/container_live/show.ex:74
|
||||||
msgid "Could not delete %{name}: %{error}"
|
msgid "Could not delete %{name}: %{error}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/index.ex:59
|
#: lib/cannery_web/live/container_live/index.ex:43
|
||||||
msgid "Could not find that container"
|
msgid "Could not find that container"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -57,10 +57,10 @@ msgid "Not found"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/templates/user_registration/new.html.heex:16
|
#: lib/cannery_web/templates/user_registration/new.html.heex:17
|
||||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:16
|
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:17
|
||||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:22
|
#: lib/cannery_web/templates/user_settings/edit.html.heex:23
|
||||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:66
|
#: lib/cannery_web/templates/user_settings/edit.html.heex:67
|
||||||
msgid "Oops, something went wrong! Please check the errors below."
|
msgid "Oops, something went wrong! Please check the errors below."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ msgid "Tag not found"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:30
|
#: lib/cannery_web/live/container_live/add_tag_component.ex:35
|
||||||
msgid "Tag could not be added"
|
msgid "Tag could not be added"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -153,8 +153,3 @@ msgstr ""
|
|||||||
#: lib/cannery_web/controllers/user_auth.ex:161
|
#: lib/cannery_web/controllers/user_auth.ex:161
|
||||||
msgid "You must confirm your account and log in to access this page."
|
msgid "You must confirm your account and log in to access this page."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format, fuzzy
|
|
||||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:52
|
|
||||||
msgid "Tag could not be removed"
|
|
||||||
msgstr ""
|
|
||||||
|
@ -39,8 +39,8 @@ msgid "%{name} enabled succesfully"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/index.ex:64
|
#: lib/cannery_web/live/container_live/index.ex:48
|
||||||
#: lib/cannery_web/live/container_live/show.ex:63
|
#: lib/cannery_web/live/container_live/show.ex:64
|
||||||
msgid "%{name} has been deleted"
|
msgid "%{name} has been deleted"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ msgstr ""
|
|||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
|
||||||
#: lib/cannery_web/live/container_live/index.html.heex:46
|
#: lib/cannery_web/live/container_live/index.html.heex:38
|
||||||
#: lib/cannery_web/live/container_live/show.html.heex:37
|
#: lib/cannery_web/live/container_live/show.html.heex:37
|
||||||
#: lib/cannery_web/live/tag_live/index.html.heex:38
|
#: lib/cannery_web/live/tag_live/index.html.heex:38
|
||||||
msgid "Are you sure you want to delete %{name}?"
|
msgid "Are you sure you want to delete %{name}?"
|
||||||
@ -99,13 +99,13 @@ msgstr ""
|
|||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:120
|
#: lib/cannery_web/live/ammo_group_live/index.html.heex:120
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:66
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:47
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:75
|
#: lib/cannery_web/live/ammo_type_live/index.html.heex:68
|
||||||
msgid "Are you sure you want to delete this ammo?"
|
msgid "Are you sure you want to delete this ammo?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:112
|
#: lib/cannery_web/templates/user_settings/edit.html.heex:113
|
||||||
msgid "Are you sure you want to delete your account?"
|
msgid "Are you sure you want to delete your account?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -155,14 +155,14 @@ msgid "Please check your email to verify your account"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:103
|
#: lib/cannery_web/live/home_live.ex:97
|
||||||
msgid "Register to setup %{name}"
|
msgid "Register to setup %{name}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:44
|
#: lib/cannery_web/components/add_shot_group_component.html.heex:44
|
||||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:55
|
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:55
|
||||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:173
|
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176
|
||||||
#: lib/cannery_web/live/container_live/form_component.html.heex:52
|
#: lib/cannery_web/live/container_live/form_component.html.heex:52
|
||||||
#: lib/cannery_web/live/invite_live/form_component.html.heex:30
|
#: lib/cannery_web/live/invite_live/form_component.html.heex:30
|
||||||
#: lib/cannery_web/live/range_live/form_component.html.heex:42
|
#: lib/cannery_web/live/range_live/form_component.html.heex:42
|
||||||
@ -176,22 +176,22 @@ msgid "Your account has been deleted"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:16
|
#: lib/cannery_web/live/container_live/show.html.heex:71
|
||||||
msgid "Are you sure you want to remove the %{tag_name} tag from %{container_name}?"
|
msgid "Are you sure you want to remove the %{tag_name} tag from %{container_name}?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:36
|
#: lib/cannery_web/live/container_live/add_tag_component.ex:40
|
||||||
msgid "%{name} added successfully"
|
msgid "%{name} added successfully"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/show.ex:39
|
#: lib/cannery_web/live/container_live/show.ex:40
|
||||||
msgid "%{tag_name} has been removed from %{container_name}"
|
msgid "%{tag_name} has been removed from %{container_name}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:54
|
#: lib/cannery_web/live/container_live/add_tag_component.html.heex:19
|
||||||
msgid "Adding..."
|
msgid "Adding..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -239,8 +239,3 @@ msgstr ""
|
|||||||
#: lib/cannery_web/live/invite_live/index.ex:123
|
#: lib/cannery_web/live/invite_live/index.ex:123
|
||||||
msgid "Copied to clipboard"
|
msgid "Copied to clipboard"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format, fuzzy
|
|
||||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:58
|
|
||||||
msgid "%{name} removed successfully"
|
|
||||||
msgstr ""
|
|
||||||
|
@ -11,18 +11,18 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery/containers.ex:122
|
#: lib/cannery/containers.ex:105
|
||||||
msgid "Container must be empty before deleting"
|
msgid "Container must be empty before deleting"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/index.ex:71
|
#: lib/cannery_web/live/container_live/index.ex:55
|
||||||
#: lib/cannery_web/live/container_live/show.ex:73
|
#: lib/cannery_web/live/container_live/show.ex:74
|
||||||
msgid "Could not delete %{name}: %{error}"
|
msgid "Could not delete %{name}: %{error}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/index.ex:59
|
#: lib/cannery_web/live/container_live/index.ex:43
|
||||||
msgid "Could not find that container"
|
msgid "Could not find that container"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ msgid "Tag not found"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:30
|
#: lib/cannery_web/live/container_live/add_tag_component.ex:35
|
||||||
msgid "Tag could not be added"
|
msgid "Tag could not be added"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -152,8 +152,3 @@ msgstr ""
|
|||||||
#: lib/cannery_web/controllers/user_auth.ex:161
|
#: lib/cannery_web/controllers/user_auth.ex:161
|
||||||
msgid "You must confirm your account and log in to access this page."
|
msgid "You must confirm your account and log in to access this page."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:52
|
|
||||||
msgid "Tag could not be removed"
|
|
||||||
msgstr ""
|
|
||||||
|
@ -38,8 +38,8 @@ msgid "%{name} enabled succesfully"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/index.ex:64
|
#: lib/cannery_web/live/container_live/index.ex:48
|
||||||
#: lib/cannery_web/live/container_live/show.ex:63
|
#: lib/cannery_web/live/container_live/show.ex:64
|
||||||
msgid "%{name} has been deleted"
|
msgid "%{name} has been deleted"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ msgstr ""
|
|||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
|
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
|
||||||
#: lib/cannery_web/live/container_live/index.html.heex:46
|
#: lib/cannery_web/live/container_live/index.html.heex:38
|
||||||
#: lib/cannery_web/live/container_live/show.html.heex:37
|
#: lib/cannery_web/live/container_live/show.html.heex:37
|
||||||
#: lib/cannery_web/live/tag_live/index.html.heex:38
|
#: lib/cannery_web/live/tag_live/index.html.heex:38
|
||||||
msgid "Are you sure you want to delete %{name}?"
|
msgid "Are you sure you want to delete %{name}?"
|
||||||
@ -98,8 +98,8 @@ msgstr ""
|
|||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:120
|
#: lib/cannery_web/live/ammo_group_live/index.html.heex:120
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:66
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:47
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:75
|
#: lib/cannery_web/live/ammo_type_live/index.html.heex:68
|
||||||
msgid "Are you sure you want to delete this ammo?"
|
msgid "Are you sure you want to delete this ammo?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ msgid "Please check your email to verify your account"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/home_live.ex:103
|
#: lib/cannery_web/live/home_live.ex:97
|
||||||
msgid "Register to setup %{name}"
|
msgid "Register to setup %{name}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -175,22 +175,22 @@ msgid "Your account has been deleted"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:16
|
#: lib/cannery_web/live/container_live/show.html.heex:71
|
||||||
msgid "Are you sure you want to remove the %{tag_name} tag from %{container_name}?"
|
msgid "Are you sure you want to remove the %{tag_name} tag from %{container_name}?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:36
|
#: lib/cannery_web/live/container_live/add_tag_component.ex:40
|
||||||
msgid "%{name} added successfully"
|
msgid "%{name} added successfully"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/show.ex:39
|
#: lib/cannery_web/live/container_live/show.ex:40
|
||||||
msgid "%{tag_name} has been removed from %{container_name}"
|
msgid "%{tag_name} has been removed from %{container_name}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:54
|
#: lib/cannery_web/live/container_live/add_tag_component.html.heex:19
|
||||||
msgid "Adding..."
|
msgid "Adding..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -238,8 +238,3 @@ msgstr ""
|
|||||||
#: lib/cannery_web/live/invite_live/index.ex:123
|
#: lib/cannery_web/live/invite_live/index.ex:123
|
||||||
msgid "Copied to clipboard"
|
msgid "Copied to clipboard"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-autogen, elixir-format
|
|
||||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:58
|
|
||||||
msgid "%{name} removed successfully"
|
|
||||||
msgstr ""
|
|
||||||
|
@ -120,13 +120,12 @@ defmodule Cannery.AmmoTest do
|
|||||||
|
|
||||||
test "list_ammo_groups/0 returns all ammo_groups",
|
test "list_ammo_groups/0 returns all ammo_groups",
|
||||||
%{ammo_group: ammo_group, current_user: current_user} do
|
%{ammo_group: ammo_group, current_user: current_user} do
|
||||||
assert Ammo.list_ammo_groups(current_user) == [ammo_group] |> Repo.preload(:shot_groups)
|
assert Ammo.list_ammo_groups(current_user) == [ammo_group]
|
||||||
end
|
end
|
||||||
|
|
||||||
test "get_ammo_group!/1 returns the ammo_group with given id",
|
test "get_ammo_group!/1 returns the ammo_group with given id",
|
||||||
%{ammo_group: ammo_group, current_user: current_user} do
|
%{ammo_group: ammo_group, current_user: current_user} do
|
||||||
assert Ammo.get_ammo_group!(ammo_group.id, current_user) ==
|
assert Ammo.get_ammo_group!(ammo_group.id, current_user) == ammo_group
|
||||||
ammo_group |> Repo.preload(:shot_groups)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
test "create_ammo_group/1 with valid data creates a ammo_group",
|
test "create_ammo_group/1 with valid data creates a ammo_group",
|
||||||
@ -168,8 +167,7 @@ defmodule Cannery.AmmoTest do
|
|||||||
assert {:error, %Changeset{}} =
|
assert {:error, %Changeset{}} =
|
||||||
Ammo.update_ammo_group(ammo_group, @invalid_attrs, current_user)
|
Ammo.update_ammo_group(ammo_group, @invalid_attrs, current_user)
|
||||||
|
|
||||||
assert ammo_group |> Repo.preload(:shot_groups) ==
|
assert ammo_group == Ammo.get_ammo_group!(ammo_group.id, current_user)
|
||||||
Ammo.get_ammo_group!(ammo_group.id, current_user)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
test "delete_ammo_group/1 deletes the ammo_group",
|
test "delete_ammo_group/1 deletes the ammo_group",
|
||||||
|
@ -33,14 +33,12 @@ defmodule Cannery.ContainersTest do
|
|||||||
|
|
||||||
test "list_containers/1 returns all containers",
|
test "list_containers/1 returns all containers",
|
||||||
%{current_user: current_user, container: container} do
|
%{current_user: current_user, container: container} do
|
||||||
assert Containers.list_containers(current_user) ==
|
assert Containers.list_containers(current_user) == [container]
|
||||||
[container |> Repo.preload([:ammo_groups, :tags])]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
test "get_container!/1 returns the container with given id",
|
test "get_container!/1 returns the container with given id",
|
||||||
%{current_user: current_user, container: container} do
|
%{current_user: current_user, container: container} do
|
||||||
assert Containers.get_container!(container.id, current_user) ==
|
assert Containers.get_container!(container.id, current_user) == container
|
||||||
container |> Repo.preload([:ammo_groups, :tags])
|
|
||||||
end
|
end
|
||||||
|
|
||||||
test "create_container/1 with valid data creates a container", %{current_user: current_user} do
|
test "create_container/1 with valid data creates a container", %{current_user: current_user} do
|
||||||
@ -75,8 +73,7 @@ defmodule Cannery.ContainersTest do
|
|||||||
assert {:error, %Changeset{}} =
|
assert {:error, %Changeset{}} =
|
||||||
Containers.update_container(container, current_user, @invalid_attrs)
|
Containers.update_container(container, current_user, @invalid_attrs)
|
||||||
|
|
||||||
assert container |> Repo.preload([:ammo_groups, :tags]) ==
|
assert container == Containers.get_container!(container.id, current_user)
|
||||||
Containers.get_container!(container.id, current_user)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
test "delete_container/1 deletes the container",
|
test "delete_container/1 deletes the container",
|
||||||
|
@ -50,7 +50,7 @@ defmodule CanneryWeb.AmmoGroupLiveTest do
|
|||||||
|> follow_redirect(conn, Routes.ammo_group_index_path(conn, :index))
|
|> follow_redirect(conn, Routes.ammo_group_index_path(conn, :index))
|
||||||
|
|
||||||
assert html =~ dgettext("prompts", "Ammo group created successfully")
|
assert html =~ dgettext("prompts", "Ammo group created successfully")
|
||||||
assert html =~ "42"
|
assert html =~ "some notes"
|
||||||
end
|
end
|
||||||
|
|
||||||
test "saves new shot_group", %{conn: conn, ammo_group: ammo_group} do
|
test "saves new shot_group", %{conn: conn, ammo_group: ammo_group} do
|
||||||
@ -95,7 +95,7 @@ defmodule CanneryWeb.AmmoGroupLiveTest do
|
|||||||
|> follow_redirect(conn, Routes.ammo_group_index_path(conn, :index))
|
|> follow_redirect(conn, Routes.ammo_group_index_path(conn, :index))
|
||||||
|
|
||||||
assert html =~ dgettext("prompts", "Ammo group updated successfully")
|
assert html =~ dgettext("prompts", "Ammo group updated successfully")
|
||||||
assert html =~ "43"
|
assert html =~ "some updated notes"
|
||||||
end
|
end
|
||||||
|
|
||||||
test "deletes ammo_group in listing", %{conn: conn, ammo_group: ammo_group} do
|
test "deletes ammo_group in listing", %{conn: conn, ammo_group: ammo_group} do
|
||||||
|
@ -70,7 +70,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|
|||||||
{:ok, index_live, _html} = live(conn, Routes.container_index_path(conn, :index))
|
{:ok, index_live, _html} = live(conn, Routes.container_index_path(conn, :index))
|
||||||
|
|
||||||
assert index_live |> element("[data-qa=\"edit-#{container.id}\"]") |> render_click() =~
|
assert index_live |> element("[data-qa=\"edit-#{container.id}\"]") |> render_click() =~
|
||||||
gettext("Edit %{name}", name: container.name)
|
gettext("Edit Container")
|
||||||
|
|
||||||
assert_patch(index_live, Routes.container_index_path(conn, :edit, container))
|
assert_patch(index_live, Routes.container_index_path(conn, :edit, container))
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|
|||||||
test "displays container", %{conn: conn, container: container} do
|
test "displays container", %{conn: conn, container: container} do
|
||||||
{:ok, _show_live, html} = live(conn, Routes.container_show_path(conn, :show, container))
|
{:ok, _show_live, html} = live(conn, Routes.container_show_path(conn, :show, container))
|
||||||
|
|
||||||
assert html =~ gettext("Show %{name}", name: container.name)
|
assert html =~ gettext("Show Container")
|
||||||
assert html =~ container.location
|
assert html =~ container.location
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|
|||||||
{:ok, show_live, _html} = live(conn, Routes.container_show_path(conn, :show, container))
|
{:ok, show_live, _html} = live(conn, Routes.container_show_path(conn, :show, container))
|
||||||
|
|
||||||
assert show_live |> element("[data-qa=\"edit\"]") |> render_click() =~
|
assert show_live |> element("[data-qa=\"edit\"]") |> render_click() =~
|
||||||
gettext("Edit %{name}", name: container.name)
|
gettext("Edit Container")
|
||||||
|
|
||||||
assert_patch(show_live, Routes.container_show_path(conn, :edit, container))
|
assert_patch(show_live, Routes.container_show_path(conn, :edit, container))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user