change rimfire to firing type
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
shibao 2022-02-16 00:10:18 -05:00
parent d6e4090650
commit fb288e4389
3 changed files with 10 additions and 7 deletions

View File

@ -30,7 +30,7 @@ defmodule Cannery.Ammo.AmmoType do
field :grains, :integer
field :pressure, :string
field :primer_type, :string
field :rimfire, :boolean, null: false, default: false
field :firing_type, :string
field :tracer, :boolean, null: false, default: false
field :incendiary, :boolean, null: false, default: false
field :blank, :boolean, null: false, default: false
@ -62,7 +62,7 @@ defmodule Cannery.Ammo.AmmoType do
grains: integer() | nil,
pressure: String.t() | nil,
primer_type: String.t() | nil,
rimfire: boolean(),
firing_type: String.t() | nil,
tracer: boolean(),
incendiary: boolean(),
blank: boolean(),
@ -95,7 +95,7 @@ defmodule Cannery.Ammo.AmmoType do
:grains,
:pressure,
:primer_type,
:rimfire,
:firing_type,
:tracer,
:incendiary,
:blank,

View File

@ -125,9 +125,12 @@
) %>
<%= error_tag(f, :primer_type, "col-span-3 text-center") %>
<%= label(f, :rimfire, gettext("Rimfire"), class: "mr-4 title text-lg text-primary-500") %>
<%= checkbox(f, :rimfire, class: "text-center col-span-2 checkbox") %>
<%= error_tag(f, :rimfire, "col-span-3 text-center") %>
<%= label(f, :firing_type, gettext("Firing type"), class: "mr-4 title text-lg text-primary-500") %>
<%= text_input(f, :firing_type,
class: "text-center col-span-2 input input-primary",
placeholder: "Centerfire"
) %>
<%= error_tag(f, :firing_type, "col-span-3 text-center") %>
<%= label(f, :tracer, gettext("Tracer"), class: "mr-4 title text-lg text-primary-500") %>
<%= checkbox(f, :tracer, class: "text-center col-span-2 checkbox") %>

View File

@ -20,7 +20,7 @@ defmodule Cannery.Repo.Migrations.CreateAmmoTypes do
add :grains, :integer
add :pressure, :string
add :primer_type, :string
add :rimfire, :boolean, null: false, default: false
add :firing_type, :string
add :tracer, :boolean, null: false, default: false
add :incendiary, :boolean, null: false, default: false
add :blank, :boolean, null: false, default: false