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
alias Cannery.{Ammo, Repo}
alias Cannery.{Ammo, Ammo.AmmoGroup, Repo}
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
assigns =
%{show_container: show_container} = assigns |> assign_new(:show_container, fn -> false end)

View File

@ -143,7 +143,7 @@ msgstr "Korrosiv"
msgid "Count"
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
#, elixir-autogen, elixir-format
msgid "Count:"
@ -341,7 +341,7 @@ msgstr "Keine Tags"
msgid "Notes"
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
#, elixir-autogen, elixir-format
msgid "Notes:"
@ -365,7 +365,7 @@ msgstr "Druck"
msgid "Price paid"
msgstr "Kaufpreis"
#: lib/cannery_web/components/ammo_group_card.ex:58
#: lib/cannery_web/components/ammo_group_card.ex:62
#, elixir-autogen, elixir-format
msgid "Price paid:"
msgstr "Kaufpreis:"
@ -587,7 +587,7 @@ msgstr "Kein weiterer Behälter"
msgid "Shot log"
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/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
@ -800,7 +800,7 @@ msgstr "Munitionsart"
msgid "Added on"
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_type_live/show.html.heex:97
#, elixir-autogen, elixir-format
@ -913,7 +913,7 @@ msgstr ""
msgid "Total # of ammo"
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
msgid "Container:"
msgstr "Behälter"
@ -929,7 +929,7 @@ msgstr ""
msgid "Used up on"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:51
#: lib/cannery_web/components/ammo_group_card.ex:55
#, elixir-autogen, elixir-format
msgid "Used up on:"
msgstr ""

View File

@ -128,7 +128,7 @@ msgstr ""
msgid "Count"
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
#, elixir-autogen, elixir-format
msgid "Count:"
@ -326,7 +326,7 @@ msgstr ""
msgid "Notes"
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
#, elixir-autogen, elixir-format
msgid "Notes:"
@ -350,7 +350,7 @@ msgstr ""
msgid "Price paid"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:58
#: lib/cannery_web/components/ammo_group_card.ex:62
#, elixir-autogen, elixir-format
msgid "Price paid:"
msgstr ""
@ -570,7 +570,7 @@ msgstr ""
msgid "Shot log"
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/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
@ -783,7 +783,7 @@ msgstr ""
msgid "Added on"
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_type_live/show.html.heex:97
#, elixir-autogen, elixir-format
@ -896,7 +896,7 @@ msgstr ""
msgid "Total # of ammo"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:67
#: lib/cannery_web/components/ammo_group_card.ex:71
#, elixir-autogen, elixir-format
msgid "Container:"
msgstr ""
@ -912,7 +912,7 @@ msgstr ""
msgid "Used up on"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:51
#: lib/cannery_web/components/ammo_group_card.ex:55
#, elixir-autogen, elixir-format
msgid "Used up on:"
msgstr ""

View File

@ -129,7 +129,7 @@ msgstr ""
msgid "Count"
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
#, elixir-autogen, elixir-format
msgid "Count:"
@ -327,7 +327,7 @@ msgstr ""
msgid "Notes"
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
#, elixir-autogen, elixir-format
msgid "Notes:"
@ -351,7 +351,7 @@ msgstr ""
msgid "Price paid"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:58
#: lib/cannery_web/components/ammo_group_card.ex:62
#, elixir-autogen, elixir-format
msgid "Price paid:"
msgstr ""
@ -571,7 +571,7 @@ msgstr ""
msgid "Shot log"
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/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
@ -784,7 +784,7 @@ msgstr ""
msgid "Added on"
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_type_live/show.html.heex:97
#, elixir-autogen, elixir-format
@ -897,7 +897,7 @@ msgstr ""
msgid "Total # of ammo"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:67
#: lib/cannery_web/components/ammo_group_card.ex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "Container:"
msgstr ""
@ -913,7 +913,7 @@ msgstr ""
msgid "Used up on"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:51
#: lib/cannery_web/components/ammo_group_card.ex:55
#, elixir-autogen, elixir-format
msgid "Used up on:"
msgstr ""

View File

@ -143,7 +143,7 @@ msgstr ""
msgid "Count"
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
#, elixir-autogen, elixir-format
msgid "Count:"
@ -341,7 +341,7 @@ msgstr ""
msgid "Notes"
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
#, elixir-autogen, elixir-format
msgid "Notes:"
@ -365,7 +365,7 @@ msgstr ""
msgid "Price paid"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:58
#: lib/cannery_web/components/ammo_group_card.ex:62
#, elixir-autogen, elixir-format
msgid "Price paid:"
msgstr ""
@ -585,7 +585,7 @@ msgstr ""
msgid "Shot log"
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/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
@ -798,7 +798,7 @@ msgstr ""
msgid "Added on"
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_type_live/show.html.heex:97
#, elixir-autogen, elixir-format
@ -911,7 +911,7 @@ msgstr ""
msgid "Total # of ammo"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:67
#: lib/cannery_web/components/ammo_group_card.ex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "Container:"
msgstr ""
@ -927,7 +927,7 @@ msgstr ""
msgid "Used up on"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:51
#: lib/cannery_web/components/ammo_group_card.ex:55
#, elixir-autogen, elixir-format
msgid "Used up on:"
msgstr ""

View File

@ -143,7 +143,7 @@ msgstr "Corrosive"
msgid "Count"
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
#, elixir-autogen, elixir-format
msgid "Count:"
@ -341,7 +341,7 @@ msgstr "Aucun tag"
msgid "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
#, elixir-autogen, elixir-format
msgid "Notes:"
@ -365,7 +365,7 @@ msgstr "Pression"
msgid "Price paid"
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
msgid "Price paid:"
msgstr "Prix payé:"
@ -589,7 +589,7 @@ msgstr "Aucun autre conteneur"
msgid "Shot log"
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/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
@ -802,7 +802,7 @@ msgstr "Types de munition"
msgid "Added on"
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_type_live/show.html.heex:97
#, elixir-autogen, elixir-format
@ -916,7 +916,7 @@ msgstr ""
msgid "Total # of ammo"
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
msgid "Container:"
msgstr "Conteneur"
@ -932,7 +932,7 @@ msgstr ""
msgid "Used up on"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:51
#: lib/cannery_web/components/ammo_group_card.ex:55
#, elixir-autogen, elixir-format
msgid "Used up on:"
msgstr ""

View File

@ -139,7 +139,7 @@ msgstr ""
msgid "Count"
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
#, elixir-autogen, elixir-format
msgid "Count:"
@ -337,7 +337,7 @@ msgstr ""
msgid "Notes"
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
#, elixir-autogen, elixir-format
msgid "Notes:"
@ -361,7 +361,7 @@ msgstr ""
msgid "Price paid"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:58
#: lib/cannery_web/components/ammo_group_card.ex:62
#, elixir-autogen, elixir-format
msgid "Price paid:"
msgstr ""
@ -581,7 +581,7 @@ msgstr ""
msgid "Shot log"
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/show.html.heex:37
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
@ -794,7 +794,7 @@ msgstr ""
msgid "Added on"
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_type_live/show.html.heex:97
#, elixir-autogen, elixir-format
@ -907,7 +907,7 @@ msgstr ""
msgid "Total # of ammo"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:67
#: lib/cannery_web/components/ammo_group_card.ex:71
#, elixir-autogen, elixir-format
msgid "Container:"
msgstr ""
@ -923,7 +923,7 @@ msgstr ""
msgid "Used up on"
msgstr ""
#: lib/cannery_web/components/ammo_group_card.ex:51
#: lib/cannery_web/components/ammo_group_card.ex:55
#, elixir-autogen, elixir-format
msgid "Used up on:"
msgstr ""