add attrs to ammo group card
continuous-integration/drone/push Build is passing Details

This commit is contained in:
shibao 2022-11-09 21:19:55 -05:00
parent d86f5a6d98
commit db4b3fab24
7 changed files with 47 additions and 43 deletions

View File

@ -4,9 +4,13 @@ defmodule CanneryWeb.Components.AmmoGroupCard do
""" """
use CanneryWeb, :component use CanneryWeb, :component
alias Cannery.{Ammo, Repo} alias Cannery.{Ammo, Ammo.AmmoGroup, Repo}
alias CanneryWeb.Endpoint alias CanneryWeb.Endpoint
attr :ammo_group, AmmoGroup, required: true
attr :show_container, :boolean, default: false
slot(:inner_block)
def ammo_group_card(%{ammo_group: ammo_group} = assigns) do def ammo_group_card(%{ammo_group: ammo_group} = assigns) do
assigns = assigns =
%{show_container: show_container} = assigns |> assign_new(:show_container, fn -> false end) %{show_container: show_container} = assigns |> assign_new(:show_container, fn -> false end)

View File

@ -143,7 +143,7 @@ msgstr "Korrosiv"
msgid "Count" msgid "Count"
msgstr "Anzahl" msgstr "Anzahl"
#: lib/cannery_web/components/ammo_group_card.ex:33 #: lib/cannery_web/components/ammo_group_card.ex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:8 #: lib/cannery_web/live/ammo_group_live/show.html.heex:8
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Count:" msgid "Count:"
@ -341,7 +341,7 @@ msgstr "Keine Tags"
msgid "Notes" msgid "Notes"
msgstr "Bemerkungen" msgstr "Bemerkungen"
#: lib/cannery_web/components/ammo_group_card.ex:39 #: lib/cannery_web/components/ammo_group_card.ex:43
#: lib/cannery_web/live/ammo_group_live/show.html.heex:24 #: lib/cannery_web/live/ammo_group_live/show.html.heex:24
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Notes:" msgid "Notes:"
@ -365,7 +365,7 @@ msgstr "Druck"
msgid "Price paid" msgid "Price paid"
msgstr "Kaufpreis" msgstr "Kaufpreis"
#: lib/cannery_web/components/ammo_group_card.ex:58 #: lib/cannery_web/components/ammo_group_card.ex:62
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Price paid:" msgid "Price paid:"
msgstr "Kaufpreis:" msgstr "Kaufpreis:"
@ -587,7 +587,7 @@ msgstr "Kein weiterer Behälter"
msgid "Shot log" msgid "Shot log"
msgstr "Schießkladde" msgstr "Schießkladde"
#: lib/cannery_web/components/ammo_group_card.ex:59 #: lib/cannery_web/components/ammo_group_card.ex:63
#: lib/cannery_web/live/ammo_group_live/index.ex:145 #: lib/cannery_web/live/ammo_group_live/index.ex:145
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37 #: lib/cannery_web/live/ammo_group_live/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44 #: lib/cannery_web/live/ammo_group_live/show.html.heex:44
@ -800,7 +800,7 @@ msgstr "Munitionsart"
msgid "Added on" msgid "Added on"
msgstr "Hinzugefügt am" msgstr "Hinzugefügt am"
#: lib/cannery_web/components/ammo_group_card.ex:45 #: lib/cannery_web/components/ammo_group_card.ex:49
#: lib/cannery_web/live/ammo_group_live/show.html.heex:30 #: lib/cannery_web/live/ammo_group_live/show.html.heex:30
#: lib/cannery_web/live/ammo_type_live/show.html.heex:97 #: lib/cannery_web/live/ammo_type_live/show.html.heex:97
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -913,7 +913,7 @@ msgstr ""
msgid "Total # of ammo" msgid "Total # of ammo"
msgstr "Summe aller Patronen" msgstr "Summe aller Patronen"
#: lib/cannery_web/components/ammo_group_card.ex:67 #: lib/cannery_web/components/ammo_group_card.ex:71
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Container:" msgid "Container:"
msgstr "Behälter" msgstr "Behälter"
@ -929,7 +929,7 @@ msgstr ""
msgid "Used up on" msgid "Used up on"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:51 #: lib/cannery_web/components/ammo_group_card.ex:55
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used up on:" msgid "Used up on:"
msgstr "" msgstr ""

View File

@ -128,7 +128,7 @@ msgstr ""
msgid "Count" msgid "Count"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:33 #: lib/cannery_web/components/ammo_group_card.ex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:8 #: lib/cannery_web/live/ammo_group_live/show.html.heex:8
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Count:" msgid "Count:"
@ -326,7 +326,7 @@ msgstr ""
msgid "Notes" msgid "Notes"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:39 #: lib/cannery_web/components/ammo_group_card.ex:43
#: lib/cannery_web/live/ammo_group_live/show.html.heex:24 #: lib/cannery_web/live/ammo_group_live/show.html.heex:24
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Notes:" msgid "Notes:"
@ -350,7 +350,7 @@ msgstr ""
msgid "Price paid" msgid "Price paid"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:58 #: lib/cannery_web/components/ammo_group_card.ex:62
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Price paid:" msgid "Price paid:"
msgstr "" msgstr ""
@ -570,7 +570,7 @@ msgstr ""
msgid "Shot log" msgid "Shot log"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:59 #: lib/cannery_web/components/ammo_group_card.ex:63
#: lib/cannery_web/live/ammo_group_live/index.ex:145 #: lib/cannery_web/live/ammo_group_live/index.ex:145
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37 #: lib/cannery_web/live/ammo_group_live/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44 #: lib/cannery_web/live/ammo_group_live/show.html.heex:44
@ -783,7 +783,7 @@ msgstr ""
msgid "Added on" msgid "Added on"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:45 #: lib/cannery_web/components/ammo_group_card.ex:49
#: lib/cannery_web/live/ammo_group_live/show.html.heex:30 #: lib/cannery_web/live/ammo_group_live/show.html.heex:30
#: lib/cannery_web/live/ammo_type_live/show.html.heex:97 #: lib/cannery_web/live/ammo_type_live/show.html.heex:97
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -896,7 +896,7 @@ msgstr ""
msgid "Total # of ammo" msgid "Total # of ammo"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:67 #: lib/cannery_web/components/ammo_group_card.ex:71
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Container:" msgid "Container:"
msgstr "" msgstr ""
@ -912,7 +912,7 @@ msgstr ""
msgid "Used up on" msgid "Used up on"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:51 #: lib/cannery_web/components/ammo_group_card.ex:55
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used up on:" msgid "Used up on:"
msgstr "" msgstr ""

View File

@ -129,7 +129,7 @@ msgstr ""
msgid "Count" msgid "Count"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:33 #: lib/cannery_web/components/ammo_group_card.ex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:8 #: lib/cannery_web/live/ammo_group_live/show.html.heex:8
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Count:" msgid "Count:"
@ -327,7 +327,7 @@ msgstr ""
msgid "Notes" msgid "Notes"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:39 #: lib/cannery_web/components/ammo_group_card.ex:43
#: lib/cannery_web/live/ammo_group_live/show.html.heex:24 #: lib/cannery_web/live/ammo_group_live/show.html.heex:24
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Notes:" msgid "Notes:"
@ -351,7 +351,7 @@ msgstr ""
msgid "Price paid" msgid "Price paid"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:58 #: lib/cannery_web/components/ammo_group_card.ex:62
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Price paid:" msgid "Price paid:"
msgstr "" msgstr ""
@ -571,7 +571,7 @@ msgstr ""
msgid "Shot log" msgid "Shot log"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:59 #: lib/cannery_web/components/ammo_group_card.ex:63
#: lib/cannery_web/live/ammo_group_live/index.ex:145 #: lib/cannery_web/live/ammo_group_live/index.ex:145
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37 #: lib/cannery_web/live/ammo_group_live/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44 #: lib/cannery_web/live/ammo_group_live/show.html.heex:44
@ -784,7 +784,7 @@ msgstr ""
msgid "Added on" msgid "Added on"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:45 #: lib/cannery_web/components/ammo_group_card.ex:49
#: lib/cannery_web/live/ammo_group_live/show.html.heex:30 #: lib/cannery_web/live/ammo_group_live/show.html.heex:30
#: lib/cannery_web/live/ammo_type_live/show.html.heex:97 #: lib/cannery_web/live/ammo_type_live/show.html.heex:97
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -897,7 +897,7 @@ msgstr ""
msgid "Total # of ammo" msgid "Total # of ammo"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:67 #: lib/cannery_web/components/ammo_group_card.ex:71
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Container:" msgid "Container:"
msgstr "" msgstr ""
@ -913,7 +913,7 @@ msgstr ""
msgid "Used up on" msgid "Used up on"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:51 #: lib/cannery_web/components/ammo_group_card.ex:55
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used up on:" msgid "Used up on:"
msgstr "" msgstr ""

View File

@ -143,7 +143,7 @@ msgstr ""
msgid "Count" msgid "Count"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:33 #: lib/cannery_web/components/ammo_group_card.ex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:8 #: lib/cannery_web/live/ammo_group_live/show.html.heex:8
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Count:" msgid "Count:"
@ -341,7 +341,7 @@ msgstr ""
msgid "Notes" msgid "Notes"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:39 #: lib/cannery_web/components/ammo_group_card.ex:43
#: lib/cannery_web/live/ammo_group_live/show.html.heex:24 #: lib/cannery_web/live/ammo_group_live/show.html.heex:24
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Notes:" msgid "Notes:"
@ -365,7 +365,7 @@ msgstr ""
msgid "Price paid" msgid "Price paid"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:58 #: lib/cannery_web/components/ammo_group_card.ex:62
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Price paid:" msgid "Price paid:"
msgstr "" msgstr ""
@ -585,7 +585,7 @@ msgstr ""
msgid "Shot log" msgid "Shot log"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:59 #: lib/cannery_web/components/ammo_group_card.ex:63
#: lib/cannery_web/live/ammo_group_live/index.ex:145 #: lib/cannery_web/live/ammo_group_live/index.ex:145
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37 #: lib/cannery_web/live/ammo_group_live/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44 #: lib/cannery_web/live/ammo_group_live/show.html.heex:44
@ -798,7 +798,7 @@ msgstr ""
msgid "Added on" msgid "Added on"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:45 #: lib/cannery_web/components/ammo_group_card.ex:49
#: lib/cannery_web/live/ammo_group_live/show.html.heex:30 #: lib/cannery_web/live/ammo_group_live/show.html.heex:30
#: lib/cannery_web/live/ammo_type_live/show.html.heex:97 #: lib/cannery_web/live/ammo_type_live/show.html.heex:97
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -911,7 +911,7 @@ msgstr ""
msgid "Total # of ammo" msgid "Total # of ammo"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:67 #: lib/cannery_web/components/ammo_group_card.ex:71
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Container:" msgid "Container:"
msgstr "" msgstr ""
@ -927,7 +927,7 @@ msgstr ""
msgid "Used up on" msgid "Used up on"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:51 #: lib/cannery_web/components/ammo_group_card.ex:55
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used up on:" msgid "Used up on:"
msgstr "" msgstr ""

View File

@ -143,7 +143,7 @@ msgstr "Corrosive"
msgid "Count" msgid "Count"
msgstr "Quantité" msgstr "Quantité"
#: lib/cannery_web/components/ammo_group_card.ex:33 #: lib/cannery_web/components/ammo_group_card.ex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:8 #: lib/cannery_web/live/ammo_group_live/show.html.heex:8
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Count:" msgid "Count:"
@ -341,7 +341,7 @@ msgstr "Aucun tag"
msgid "Notes" msgid "Notes"
msgstr "Notes" msgstr "Notes"
#: lib/cannery_web/components/ammo_group_card.ex:39 #: lib/cannery_web/components/ammo_group_card.ex:43
#: lib/cannery_web/live/ammo_group_live/show.html.heex:24 #: lib/cannery_web/live/ammo_group_live/show.html.heex:24
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Notes:" msgid "Notes:"
@ -365,7 +365,7 @@ msgstr "Pression"
msgid "Price paid" msgid "Price paid"
msgstr "Prix payé" msgstr "Prix payé"
#: lib/cannery_web/components/ammo_group_card.ex:58 #: lib/cannery_web/components/ammo_group_card.ex:62
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Price paid:" msgid "Price paid:"
msgstr "Prix payé:" msgstr "Prix payé:"
@ -589,7 +589,7 @@ msgstr "Aucun autre conteneur"
msgid "Shot log" msgid "Shot log"
msgstr "Évènements de tir" msgstr "Évènements de tir"
#: lib/cannery_web/components/ammo_group_card.ex:59 #: lib/cannery_web/components/ammo_group_card.ex:63
#: lib/cannery_web/live/ammo_group_live/index.ex:145 #: lib/cannery_web/live/ammo_group_live/index.ex:145
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37 #: lib/cannery_web/live/ammo_group_live/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44 #: lib/cannery_web/live/ammo_group_live/show.html.heex:44
@ -802,7 +802,7 @@ msgstr "Types de munition"
msgid "Added on" msgid "Added on"
msgstr "Ajouté le" msgstr "Ajouté le"
#: lib/cannery_web/components/ammo_group_card.ex:45 #: lib/cannery_web/components/ammo_group_card.ex:49
#: lib/cannery_web/live/ammo_group_live/show.html.heex:30 #: lib/cannery_web/live/ammo_group_live/show.html.heex:30
#: lib/cannery_web/live/ammo_type_live/show.html.heex:97 #: lib/cannery_web/live/ammo_type_live/show.html.heex:97
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -916,7 +916,7 @@ msgstr ""
msgid "Total # of ammo" msgid "Total # of ammo"
msgstr "Quantité de cartouches" msgstr "Quantité de cartouches"
#: lib/cannery_web/components/ammo_group_card.ex:67 #: lib/cannery_web/components/ammo_group_card.ex:71
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Container:" msgid "Container:"
msgstr "Conteneur" msgstr "Conteneur"
@ -932,7 +932,7 @@ msgstr ""
msgid "Used up on" msgid "Used up on"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:51 #: lib/cannery_web/components/ammo_group_card.ex:55
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used up on:" msgid "Used up on:"
msgstr "" msgstr ""

View File

@ -139,7 +139,7 @@ msgstr ""
msgid "Count" msgid "Count"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:33 #: lib/cannery_web/components/ammo_group_card.ex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:8 #: lib/cannery_web/live/ammo_group_live/show.html.heex:8
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Count:" msgid "Count:"
@ -337,7 +337,7 @@ msgstr ""
msgid "Notes" msgid "Notes"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:39 #: lib/cannery_web/components/ammo_group_card.ex:43
#: lib/cannery_web/live/ammo_group_live/show.html.heex:24 #: lib/cannery_web/live/ammo_group_live/show.html.heex:24
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Notes:" msgid "Notes:"
@ -361,7 +361,7 @@ msgstr ""
msgid "Price paid" msgid "Price paid"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:58 #: lib/cannery_web/components/ammo_group_card.ex:62
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Price paid:" msgid "Price paid:"
msgstr "" msgstr ""
@ -581,7 +581,7 @@ msgstr ""
msgid "Shot log" msgid "Shot log"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:59 #: lib/cannery_web/components/ammo_group_card.ex:63
#: lib/cannery_web/live/ammo_group_live/index.ex:145 #: lib/cannery_web/live/ammo_group_live/index.ex:145
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37 #: lib/cannery_web/live/ammo_group_live/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44 #: lib/cannery_web/live/ammo_group_live/show.html.heex:44
@ -794,7 +794,7 @@ msgstr ""
msgid "Added on" msgid "Added on"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:45 #: lib/cannery_web/components/ammo_group_card.ex:49
#: lib/cannery_web/live/ammo_group_live/show.html.heex:30 #: lib/cannery_web/live/ammo_group_live/show.html.heex:30
#: lib/cannery_web/live/ammo_type_live/show.html.heex:97 #: lib/cannery_web/live/ammo_type_live/show.html.heex:97
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -907,7 +907,7 @@ msgstr ""
msgid "Total # of ammo" msgid "Total # of ammo"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:67 #: lib/cannery_web/components/ammo_group_card.ex:71
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Container:" msgid "Container:"
msgstr "" msgstr ""
@ -923,7 +923,7 @@ msgstr ""
msgid "Used up on" msgid "Used up on"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:51 #: lib/cannery_web/components/ammo_group_card.ex:55
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used up on:" msgid "Used up on:"
msgstr "" msgstr ""