add move to container button for ammo groups
This commit is contained in:
parent
95a08d6088
commit
3996e8413c
57
lib/cannery_web/components/move_ammo_group_component.ex
Normal file
57
lib/cannery_web/components/move_ammo_group_component.ex
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
defmodule CanneryWeb.Components.MoveAmmoGroupComponent do
|
||||||
|
@moduledoc """
|
||||||
|
Livecomponent that can move an ammo group to another container
|
||||||
|
"""
|
||||||
|
|
||||||
|
use CanneryWeb, :live_component
|
||||||
|
alias Cannery.{Accounts.User, Ammo, Ammo.AmmoGroup, Containers}
|
||||||
|
alias Phoenix.LiveView.Socket
|
||||||
|
|
||||||
|
@impl true
|
||||||
|
@spec update(
|
||||||
|
%{
|
||||||
|
required(:current_user) => User.t(),
|
||||||
|
required(:ammo_group) => AmmoGroup.t(),
|
||||||
|
optional(any()) => any()
|
||||||
|
},
|
||||||
|
Socket.t()
|
||||||
|
) :: {:ok, Socket.t()}
|
||||||
|
def update(
|
||||||
|
%{ammo_group: %{container_id: container_id} = ammo_group, current_user: current_user} =
|
||||||
|
assigns,
|
||||||
|
socket
|
||||||
|
) do
|
||||||
|
changeset = Ammo.change_ammo_group(ammo_group)
|
||||||
|
|
||||||
|
containers =
|
||||||
|
Containers.list_containers(current_user)
|
||||||
|
|> Enum.reject(fn %{id: id} -> id == container_id end)
|
||||||
|
|
||||||
|
{:ok, socket |> assign(assigns) |> assign(changeset: changeset, containers: containers)}
|
||||||
|
end
|
||||||
|
|
||||||
|
@impl true
|
||||||
|
def handle_event(
|
||||||
|
"move",
|
||||||
|
%{"container_id" => container_id},
|
||||||
|
%{assigns: %{ammo_group: ammo_group, current_user: current_user, return_to: return_to}} =
|
||||||
|
socket
|
||||||
|
) do
|
||||||
|
%{name: container_name} = Containers.get_container!(container_id, current_user)
|
||||||
|
|
||||||
|
socket =
|
||||||
|
ammo_group
|
||||||
|
|> Ammo.update_ammo_group(%{"container_id" => container_id}, current_user)
|
||||||
|
|> case do
|
||||||
|
{:ok, _ammo_group} ->
|
||||||
|
prompt = dgettext("prompts", "Ammo moved to %{name} successfully", name: container_name)
|
||||||
|
|
||||||
|
socket |> put_flash(:info, prompt) |> push_redirect(to: return_to)
|
||||||
|
|
||||||
|
{:error, %Ecto.Changeset{} = changeset} ->
|
||||||
|
socket |> assign(changeset: changeset)
|
||||||
|
end
|
||||||
|
|
||||||
|
{:noreply, socket}
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,69 @@
|
|||||||
|
<div class="w-full flex flex-col space-y-8 justify-center items-center">
|
||||||
|
<h2 class="text-center title text-xl text-primary-500">
|
||||||
|
<%= gettext("Move ammo") %>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<%= if @containers |> Enum.empty?() do %>
|
||||||
|
<h2 class="title text-xl text-primary-500">
|
||||||
|
<%= gettext("No other containers") %> 😔
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<%= live_patch(dgettext("actions", "Add another container!"),
|
||||||
|
to: Routes.container_index_path(@socket, :new),
|
||||||
|
class: "btn btn-primary"
|
||||||
|
) %>
|
||||||
|
<% else %>
|
||||||
|
<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("Container") %>
|
||||||
|
</th>
|
||||||
|
|
||||||
|
<th class="p-2">
|
||||||
|
<%= gettext("Type") %>
|
||||||
|
</th>
|
||||||
|
|
||||||
|
<th class="p-2">
|
||||||
|
<%= gettext("Location") %>
|
||||||
|
</th>
|
||||||
|
|
||||||
|
<th class="p-2"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="containers">
|
||||||
|
<%= for container <- @containers do %>
|
||||||
|
<tr id={"container-#{container.id}"}>
|
||||||
|
<td class="p-2">
|
||||||
|
<%= container.name %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="p-2">
|
||||||
|
<%= container.type %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="p-2">
|
||||||
|
<%= container.location %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="p-2">
|
||||||
|
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn btn-primary"
|
||||||
|
phx-click="move"
|
||||||
|
phx-target={@myself}
|
||||||
|
phx-value-container_id={container.id}
|
||||||
|
>
|
||||||
|
<%= dgettext("actions", "Select") %>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
@ -17,6 +17,12 @@ defmodule CanneryWeb.AmmoGroupLive.Index do
|
|||||||
{:noreply, apply_action(socket, live_action, params)}
|
{:noreply, apply_action(socket, live_action, params)}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :move, %{"id" => id}) do
|
||||||
|
socket
|
||||||
|
|> assign(:page_title, gettext("Move Ammo group"))
|
||||||
|
|> assign(:ammo_group, Ammo.get_ammo_group!(id, current_user))
|
||||||
|
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
|
||||||
socket
|
socket
|
||||||
|> assign(:page_title, gettext("Edit Ammo group"))
|
|> assign(:page_title, gettext("Edit Ammo group"))
|
||||||
|
@ -80,7 +80,12 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="p-2">
|
<td class="p-2">
|
||||||
<%= if ammo_group.container, do: ammo_group.container.name %>
|
<%= if ammo_group.container do %>
|
||||||
|
<%= live_patch(ammo_group.container.name,
|
||||||
|
to: Routes.ammo_group_index_path(@socket, :move, ammo_group),
|
||||||
|
class: "btn btn-primary"
|
||||||
|
) %>
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="p-2 w-full h-full space-x-2 flex justify-center items-center">
|
<td class="p-2 w-full h-full space-x-2 flex justify-center items-center">
|
||||||
@ -112,30 +117,45 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= if @live_action in [:new, :edit] do %>
|
<%= cond do %>
|
||||||
<.modal return_to={Routes.ammo_group_index_path(Endpoint, :index)}>
|
<% @live_action in [:new, :edit] -> %>
|
||||||
<.live_component
|
<.modal return_to={Routes.ammo_group_index_path(Endpoint, :index)}>
|
||||||
module={CanneryWeb.AmmoGroupLive.FormComponent}
|
<.live_component
|
||||||
id={@ammo_group.id || :new}
|
module={CanneryWeb.AmmoGroupLive.FormComponent}
|
||||||
title={@page_title}
|
id={@ammo_group.id || :new}
|
||||||
action={@live_action}
|
title={@page_title}
|
||||||
ammo_group={@ammo_group}
|
action={@live_action}
|
||||||
return_to={Routes.ammo_group_index_path(Endpoint, :index)}
|
ammo_group={@ammo_group}
|
||||||
current_user={@current_user}
|
return_to={Routes.ammo_group_index_path(Endpoint, :index)}
|
||||||
/>
|
current_user={@current_user}
|
||||||
</.modal>
|
/>
|
||||||
<% end %>
|
</.modal>
|
||||||
|
|
||||||
<%= if @live_action in [:add_shot_group] do %>
|
<% @live_action == :add_shot_group -> %>
|
||||||
<.modal return_to={Routes.ammo_group_index_path(Endpoint, :index)}>
|
<.modal return_to={Routes.ammo_group_index_path(Endpoint, :index)}>
|
||||||
<.live_component
|
<.live_component
|
||||||
module={CanneryWeb.Components.AddShotGroupComponent}
|
module={CanneryWeb.Components.AddShotGroupComponent}
|
||||||
id={:new}
|
id={:new}
|
||||||
title={@page_title}
|
title={@page_title}
|
||||||
action={@live_action}
|
action={@live_action}
|
||||||
ammo_group={@ammo_group}
|
ammo_group={@ammo_group}
|
||||||
return_to={Routes.ammo_group_index_path(Endpoint, :index)}
|
return_to={Routes.ammo_group_index_path(Endpoint, :index)}
|
||||||
current_user={@current_user}
|
current_user={@current_user}
|
||||||
/>
|
/>
|
||||||
</.modal>
|
</.modal>
|
||||||
|
|
||||||
|
<% @live_action == :move -> %>
|
||||||
|
<.modal return_to={Routes.ammo_group_index_path(Endpoint, :index)}>
|
||||||
|
<.live_component
|
||||||
|
module={CanneryWeb.Components.MoveAmmoGroupComponent}
|
||||||
|
id={@ammo_group.id}
|
||||||
|
title={@page_title}
|
||||||
|
action={@live_action}
|
||||||
|
ammo_group={@ammo_group}
|
||||||
|
return_to={Routes.ammo_group_index_path(Endpoint, :index)}
|
||||||
|
current_user={@current_user}
|
||||||
|
/>
|
||||||
|
</.modal>
|
||||||
|
|
||||||
|
<% true -> %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -14,26 +14,11 @@ defmodule CanneryWeb.AmmoGroupLive.Show do
|
|||||||
end
|
end
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def handle_params(params, _url, %{assigns: %{live_action: live_action}} = socket) do
|
def handle_params(
|
||||||
socket |> assign(page_title: page_title(live_action)) |> apply_action(live_action, params)
|
%{"id" => id},
|
||||||
end
|
_url,
|
||||||
|
%{assigns: %{live_action: live_action, current_user: current_user}} = socket
|
||||||
defp apply_action(
|
) do
|
||||||
%{assigns: %{current_user: current_user}} = socket,
|
|
||||||
:add_shot_group,
|
|
||||||
%{"id" => id}
|
|
||||||
) do
|
|
||||||
socket
|
|
||||||
|> assign(:page_title, gettext("Add Shot group"))
|
|
||||||
|> assign(:ammo_group, Ammo.get_ammo_group!(id, current_user))
|
|
||||||
end
|
|
||||||
|
|
||||||
defp apply_action(
|
|
||||||
%{assigns: %{live_action: live_action, current_user: current_user}} = socket,
|
|
||||||
action,
|
|
||||||
%{"id" => id}
|
|
||||||
)
|
|
||||||
when action == :edit or action == :show do
|
|
||||||
ammo_group = Ammo.get_ammo_group!(id, current_user) |> Repo.preload([:container, :ammo_type])
|
ammo_group = Ammo.get_ammo_group!(id, current_user) |> Repo.preload([:container, :ammo_type])
|
||||||
{:noreply, socket |> assign(page_title: page_title(live_action), ammo_group: ammo_group)}
|
{:noreply, socket |> assign(page_title: page_title(live_action), ammo_group: ammo_group)}
|
||||||
end
|
end
|
||||||
@ -64,6 +49,8 @@ defmodule CanneryWeb.AmmoGroupLive.Show do
|
|||||||
{:noreply, socket |> assign(ammo_group: ammo_group)}
|
{:noreply, socket |> assign(ammo_group: ammo_group)}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp page_title(:add_shot_group), do: gettext("Add Shot group")
|
||||||
|
defp page_title(:move), do: gettext("Move Ammo group")
|
||||||
defp page_title(:show), do: gettext("Show Ammo group")
|
defp page_title(:show), do: gettext("Show Ammo group")
|
||||||
defp page_title(:edit), do: gettext("Edit Ammo group")
|
defp page_title(:edit), do: gettext("Edit Ammo group")
|
||||||
end
|
end
|
||||||
|
@ -25,11 +25,11 @@
|
|||||||
|
|
||||||
<div class="flex space-x-4 justify-center items-center text-primary-500">
|
<div class="flex space-x-4 justify-center items-center text-primary-500">
|
||||||
<%= live_patch(dgettext("actions", "Ammo Details"),
|
<%= live_patch(dgettext("actions", "Ammo Details"),
|
||||||
to: Routes.ammo_type_show_path(@socket, :show, @ammo_group.ammo_type),
|
to: Routes.ammo_type_show_path(Endpoint, :show, @ammo_group.ammo_type),
|
||||||
class: "btn btn-primary"
|
class: "btn btn-primary"
|
||||||
) %>
|
) %>
|
||||||
|
|
||||||
<%= live_patch to: Routes.ammo_group_show_path(@socket, :edit, @ammo_group),
|
<%= live_patch to: Routes.ammo_group_show_path(Endpoint, :edit, @ammo_group),
|
||||||
class: "text-primary-500 link" do %>
|
class: "text-primary-500 link" do %>
|
||||||
<i class="fa-fw fa-lg fas fa-edit"></i>
|
<i class="fa-fw fa-lg fas fa-edit"></i>
|
||||||
<% end %>
|
<% end %>
|
||||||
@ -44,6 +44,11 @@
|
|||||||
<button type="button" class="btn btn-primary" phx-click="toggle_staged">
|
<button type="button" class="btn btn-primary" phx-click="toggle_staged">
|
||||||
<%= if @ammo_group.staged, do: gettext("Unstage from range"), else: gettext("Stage for range") %>
|
<%= if @ammo_group.staged, do: gettext("Unstage from range"), else: gettext("Stage for range") %>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<%= live_patch(dgettext("actions", "Move to different container"),
|
||||||
|
to: Routes.ammo_group_show_path(Endpoint, :move, @ammo_group),
|
||||||
|
class: "btn btn-primary"
|
||||||
|
) %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr class="mb-4 w-full">
|
<hr class="mb-4 w-full">
|
||||||
@ -61,30 +66,45 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= if @live_action in [:edit] do %>
|
<%= case @live_action do %>
|
||||||
<.modal return_to={Routes.ammo_group_show_path(Endpoint, :show, @ammo_group)}>
|
<% :edit -> %>
|
||||||
<.live_component
|
<.modal return_to={Routes.ammo_group_show_path(Endpoint, :show, @ammo_group)}>
|
||||||
module={CanneryWeb.AmmoGroupLive.FormComponent}
|
<.live_component
|
||||||
id={@ammo_group.id}
|
module={CanneryWeb.AmmoGroupLive.FormComponent}
|
||||||
title={@page_title}
|
id={@ammo_group.id}
|
||||||
action={@live_action}
|
title={@page_title}
|
||||||
ammo_group={@ammo_group}
|
action={@live_action}
|
||||||
return_to={Routes.ammo_group_show_path(Endpoint, :show, @ammo_group)}
|
ammo_group={@ammo_group}
|
||||||
current_user={@current_user}
|
return_to={Routes.ammo_group_show_path(Endpoint, :show, @ammo_group)}
|
||||||
/>
|
current_user={@current_user}
|
||||||
</.modal>
|
/>
|
||||||
<% end %>
|
</.modal>
|
||||||
|
|
||||||
<%= if @live_action in [:add_shot_group] do %>
|
<% :add_shot_group -> %>
|
||||||
<.modal return_to={Routes.ammo_group_show_path(Endpoint, :show, @ammo_group)}>
|
<.modal return_to={Routes.ammo_group_show_path(Endpoint, :show, @ammo_group)}>
|
||||||
<.live_component
|
<.live_component
|
||||||
module={CanneryWeb.Components.AddShotGroupComponent}
|
module={CanneryWeb.Components.AddShotGroupComponent}
|
||||||
id={:new}
|
id={:new}
|
||||||
title={@page_title}
|
title={@page_title}
|
||||||
action={@live_action}
|
action={@live_action}
|
||||||
ammo_group={@ammo_group}
|
ammo_group={@ammo_group}
|
||||||
return_to={Routes.ammo_group_show_path(Endpoint, :show, @ammo_group)}
|
return_to={Routes.ammo_group_show_path(Endpoint, :show, @ammo_group)}
|
||||||
current_user={@current_user}
|
current_user={@current_user}
|
||||||
/>
|
/>
|
||||||
</.modal>
|
</.modal>
|
||||||
|
|
||||||
|
<% :move -> %>
|
||||||
|
<.modal return_to={Routes.ammo_group_show_path(Endpoint, :show, @ammo_group)}>
|
||||||
|
<.live_component
|
||||||
|
module={CanneryWeb.Components.MoveAmmoGroupComponent}
|
||||||
|
id={@ammo_group.id}
|
||||||
|
title={@page_title}
|
||||||
|
action={@live_action}
|
||||||
|
ammo_group={@ammo_group}
|
||||||
|
return_to={Routes.ammo_group_show_path(Endpoint, :show, @ammo_group)}
|
||||||
|
current_user={@current_user}
|
||||||
|
/>
|
||||||
|
</.modal>
|
||||||
|
|
||||||
|
<% _show -> %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -63,7 +63,7 @@ defmodule CanneryWeb.LiveHelpers do
|
|||||||
<i class="fa-fw fa-lg fas fa-times"></i>
|
<i class="fa-fw fa-lg fas fa-times"></i>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="p-8 flex flex-col space-y-4 justify-start items-center">
|
<div class="w-full p-8 flex flex-col space-y-4 justify-start items-center">
|
||||||
<%= render_slot(@inner_block) %>
|
<%= render_slot(@inner_block) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -45,6 +45,10 @@
|
|||||||
<%= gettext("No shots recorded") %> 😔
|
<%= gettext("No shots recorded") %> 😔
|
||||||
</h1>
|
</h1>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
<h1 class="title text-2xl text-primary-500">
|
||||||
|
<%= gettext("Shot log") %>
|
||||||
|
</h1>
|
||||||
|
|
||||||
<div class="w-full overflow-x-auto border border-gray-600 rounded-lg shadow-lg bg-black">
|
<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">
|
<table class="min-w-full table-auto text-center bg-white">
|
||||||
<thead class="border-b border-primary-600">
|
<thead class="border-b border-primary-600">
|
||||||
|
@ -73,10 +73,12 @@ defmodule CanneryWeb.Router do
|
|||||||
live "/ammo_groups/new", AmmoGroupLive.Index, :new
|
live "/ammo_groups/new", AmmoGroupLive.Index, :new
|
||||||
live "/ammo_groups/:id/edit", AmmoGroupLive.Index, :edit
|
live "/ammo_groups/:id/edit", AmmoGroupLive.Index, :edit
|
||||||
live "/ammo_groups/:id/add_shot_group", AmmoGroupLive.Index, :add_shot_group
|
live "/ammo_groups/:id/add_shot_group", AmmoGroupLive.Index, :add_shot_group
|
||||||
|
live "/ammo_groups/:id/move", AmmoGroupLive.Index, :move
|
||||||
|
|
||||||
live "/ammo_groups/:id", AmmoGroupLive.Show, :show
|
live "/ammo_groups/:id", AmmoGroupLive.Show, :show
|
||||||
live "/ammo_groups/:id/show/edit", AmmoGroupLive.Show, :edit
|
live "/ammo_groups/:id/show/edit", AmmoGroupLive.Show, :edit
|
||||||
live "/ammo_groups/:id/show/add_shot_group", AmmoGroupLive.Show, :add_shot_group
|
live "/ammo_groups/:id/show/add_shot_group", AmmoGroupLive.Show, :add_shot_group
|
||||||
|
live "/ammo_groups/:id/show/move", AmmoGroupLive.Show, :move
|
||||||
|
|
||||||
live "/range", RangeLive.Index, :index
|
live "/range", RangeLive.Index, :index
|
||||||
live "/range/:id/edit", RangeLive.Index, :edit
|
live "/range/:id/edit", RangeLive.Index, :edit
|
||||||
|
@ -11,7 +11,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.ex:28
|
#: lib/cannery_web/live/ammo_group_live/index.ex:34
|
||||||
msgid "Add Ammo"
|
msgid "Add Ammo"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -168,3 +168,18 @@ msgstr ""
|
|||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:27
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:27
|
||||||
msgid "Ammo Details"
|
msgid "Ammo Details"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/components/move_ammo_group_component.html.heex:11
|
||||||
|
msgid "Add another container!"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:48
|
||||||
|
msgid "Move to different container"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/components/move_ammo_group_component.html.heex:59
|
||||||
|
msgid "Select"
|
||||||
|
msgstr ""
|
||||||
|
@ -33,7 +33,7 @@ msgstr ""
|
|||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/components/topbar.ex:47
|
#: lib/cannery_web/components/topbar.ex:47
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
|
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:53
|
#: lib/cannery_web/live/range_live/index.html.heex:57
|
||||||
msgid "Ammo"
|
msgid "Ammo"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -100,6 +100,7 @@ msgid "Case material"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/components/move_ammo_group_component.html.heex:21
|
||||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:48
|
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:48
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:41
|
#: lib/cannery_web/live/ammo_group_live/index.html.heex:41
|
||||||
msgid "Container"
|
msgid "Container"
|
||||||
@ -152,8 +153,8 @@ msgid "Easy to Use:"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.ex:22
|
#: lib/cannery_web/live/ammo_group_live/index.ex:28
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.ex:68
|
#: lib/cannery_web/live/ammo_group_live/show.ex:55
|
||||||
msgid "Edit Ammo group"
|
msgid "Edit Ammo group"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -254,6 +255,7 @@ msgid "Listing Tags"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/components/move_ammo_group_component.html.heex:29
|
||||||
#: lib/cannery_web/live/container_live/form_component.html.heex:42
|
#: lib/cannery_web/live/container_live/form_component.html.heex:42
|
||||||
msgid "Location"
|
msgid "Location"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -359,7 +361,7 @@ msgstr ""
|
|||||||
#: 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/index.html.heex:35
|
#: lib/cannery_web/live/ammo_group_live/index.html.heex:35
|
||||||
#: 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:59
|
#: lib/cannery_web/live/range_live/index.html.heex:63
|
||||||
msgid "Notes"
|
msgid "Notes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -437,7 +439,7 @@ msgid "Settings"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.ex:67
|
#: lib/cannery_web/live/ammo_group_live/show.ex:54
|
||||||
msgid "Show Ammo group"
|
msgid "Show Ammo group"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -467,7 +469,7 @@ msgid "Steel"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:54
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:59
|
||||||
msgid "Stored in"
|
msgid "Stored in"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -494,7 +496,7 @@ msgid "The self-hosted firearm tracker website"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:59
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:64
|
||||||
msgid "This ammo group is not in a container"
|
msgid "This ammo group is not in a container"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -505,6 +507,7 @@ msgid "Tracer"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/components/move_ammo_group_component.html.heex:25
|
||||||
#: lib/cannery_web/live/container_live/form_component.html.heex:35
|
#: lib/cannery_web/live/container_live/form_component.html.heex:35
|
||||||
msgid "Type"
|
msgid "Type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -561,7 +564,7 @@ msgid "Range day"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:62
|
#: lib/cannery_web/live/range_live/index.html.heex:66
|
||||||
msgid "Date"
|
msgid "Date"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -595,7 +598,7 @@ msgid "Staging"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.ex:27
|
#: lib/cannery_web/live/ammo_group_live/show.ex:52
|
||||||
msgid "Add Shot group"
|
msgid "Add Shot group"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -611,7 +614,7 @@ msgid "Ammo Types"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.ex:33
|
#: lib/cannery_web/live/ammo_group_live/index.ex:39
|
||||||
msgid "Ammo groups"
|
msgid "Ammo groups"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -642,7 +645,7 @@ msgid "Rounds left"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:56
|
#: lib/cannery_web/live/range_live/index.html.heex:60
|
||||||
msgid "Rounds shot"
|
msgid "Rounds shot"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -650,3 +653,24 @@ msgstr ""
|
|||||||
#: lib/cannery_web/live/range_live/index.ex:46
|
#: lib/cannery_web/live/range_live/index.ex:46
|
||||||
msgid "Shot Records"
|
msgid "Shot Records"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/live/ammo_group_live/index.ex:22
|
||||||
|
#: lib/cannery_web/live/ammo_group_live/show.ex:53
|
||||||
|
msgid "Move Ammo group"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/components/move_ammo_group_component.html.heex:3
|
||||||
|
msgid "Move ammo"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/components/move_ammo_group_component.html.heex:8
|
||||||
|
msgid "No other containers"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/live/range_live/index.html.heex:49
|
||||||
|
msgid "Shot log"
|
||||||
|
msgstr ""
|
||||||
|
@ -67,8 +67,8 @@ msgid "Ammo group created successfully"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.ex:40
|
#: lib/cannery_web/live/ammo_group_live/index.ex:46
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.ex:49
|
#: lib/cannery_web/live/ammo_group_live/show.ex:34
|
||||||
msgid "Ammo group deleted succesfully"
|
msgid "Ammo group deleted succesfully"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ msgid "Are you sure you want to delete the invite for %{name}?"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:102
|
#: lib/cannery_web/live/ammo_group_live/index.html.heex:107
|
||||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:40
|
#: lib/cannery_web/live/ammo_group_live/show.html.heex:40
|
||||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:104
|
#: lib/cannery_web/live/ammo_type_live/index.html.heex:104
|
||||||
msgid "Are you sure you want to delete this ammo?"
|
msgid "Are you sure you want to delete this ammo?"
|
||||||
@ -210,7 +210,7 @@ msgid "Ammo group unstaged succesfully"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, elixir-format, ex-autogen
|
#, elixir-format, ex-autogen
|
||||||
#: lib/cannery_web/live/range_live/index.html.heex:97
|
#: lib/cannery_web/live/range_live/index.html.heex:101
|
||||||
msgid "Are you sure you want to delete this shot record?"
|
msgid "Are you sure you want to delete this shot record?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -228,3 +228,8 @@ msgstr ""
|
|||||||
#: lib/cannery_web/controllers/user_confirmation_controller.ex:37
|
#: lib/cannery_web/controllers/user_confirmation_controller.ex:37
|
||||||
msgid "%{email} confirmed successfully."
|
msgid "%{email} confirmed successfully."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, elixir-format, ex-autogen
|
||||||
|
#: lib/cannery_web/components/move_ammo_group_component.ex:47
|
||||||
|
msgid "Ammo moved to %{name} successfully"
|
||||||
|
msgstr ""
|
||||||
|
Loading…
Reference in New Issue
Block a user