From 91586adef388727e2ba7e1117975a5dd0a498e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Veikko=20Lintuj=C3=A4rvi?= Date: Tue, 18 Jul 2023 16:02:38 +0300 Subject: [PATCH] Added new plant: Kohlrabi --- lib/osuuspuutarha/harvest/parser.ex | 4 ++++ lib/osuuspuutarha/harvest/yield.ex | 3 ++- .../live/yield_live/form_component.html.heex | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/osuuspuutarha/harvest/parser.ex b/lib/osuuspuutarha/harvest/parser.ex index 4fe629f..dfb0f08 100644 --- a/lib/osuuspuutarha/harvest/parser.ex +++ b/lib/osuuspuutarha/harvest/parser.ex @@ -90,4 +90,8 @@ defmodule Osuuspuutarha.Harvest.Parser do def parse_plant(:chili) do "Chili" end + + def parse_plant(:kohlrabi) do + "Kohlrabi" + end end diff --git a/lib/osuuspuutarha/harvest/yield.ex b/lib/osuuspuutarha/harvest/yield.ex index c4e573c..385d67b 100644 --- a/lib/osuuspuutarha/harvest/yield.ex +++ b/lib/osuuspuutarha/harvest/yield.ex @@ -30,7 +30,8 @@ defmodule Osuuspuutarha.Harvest.Yield do :green_onions, :mangold, :paprika, - :chili + :chili, + :kohlrabi ] field :unit, Ecto.Enum, values: [:kg, :kpl] diff --git a/lib/osuuspuutarha_web/live/yield_live/form_component.html.heex b/lib/osuuspuutarha_web/live/yield_live/form_component.html.heex index bf877eb..788d505 100644 --- a/lib/osuuspuutarha_web/live/yield_live/form_component.html.heex +++ b/lib/osuuspuutarha_web/live/yield_live/form_component.html.heex @@ -30,6 +30,7 @@ "Cucumber": :cucumber, "Green Onions": :green_onions, "Kale": :kale, + "Kohlrabi": :kohlrabi, "Lettuce": :lettuce, "Mangold": :mangold, "Melon": :melon,