New plants
This commit is contained in:
@@ -11,6 +11,14 @@ defmodule Osuuspuutarha.Harvest.Parser do
|
|||||||
"Cabbage"
|
"Cabbage"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def parse_plant(:white_cabbage) do
|
||||||
|
"White Cabbage"
|
||||||
|
end
|
||||||
|
|
||||||
|
def parse_plant(:red_cabbage) do
|
||||||
|
"Red Cabbage"
|
||||||
|
end
|
||||||
|
|
||||||
def parse_plant(:pumpkin) do
|
def parse_plant(:pumpkin) do
|
||||||
"Pumpkin"
|
"Pumpkin"
|
||||||
end
|
end
|
||||||
@@ -46,4 +54,28 @@ defmodule Osuuspuutarha.Harvest.Parser do
|
|||||||
def parse_plant(:beetroot) do
|
def parse_plant(:beetroot) do
|
||||||
"Beetroot"
|
"Beetroot"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def parse_plant(:rhubarb) do
|
||||||
|
"Rhubarb"
|
||||||
|
end
|
||||||
|
|
||||||
|
def parse_plant(:kale) do
|
||||||
|
"Kale"
|
||||||
|
end
|
||||||
|
|
||||||
|
def parse_plant(:cauliflower) do
|
||||||
|
"Cauliflower"
|
||||||
|
end
|
||||||
|
|
||||||
|
def parse_plant(:broccoli) do
|
||||||
|
"Broccoli"
|
||||||
|
end
|
||||||
|
|
||||||
|
def parse_plant(:portulak) do
|
||||||
|
"Portulak"
|
||||||
|
end
|
||||||
|
|
||||||
|
def parse_plant(:green_onions) do
|
||||||
|
"Green Onions"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ defmodule Osuuspuutarha.Harvest.Yield do
|
|||||||
:lettuce,
|
:lettuce,
|
||||||
:tomato,
|
:tomato,
|
||||||
:cabbage,
|
:cabbage,
|
||||||
|
:white_cabbage,
|
||||||
|
:red_cabbage,
|
||||||
:pumpkin,
|
:pumpkin,
|
||||||
:zucchini,
|
:zucchini,
|
||||||
:cucumber,
|
:cucumber,
|
||||||
@@ -19,7 +21,13 @@ defmodule Osuuspuutarha.Harvest.Yield do
|
|||||||
:bean,
|
:bean,
|
||||||
:parsnip,
|
:parsnip,
|
||||||
:carrot,
|
:carrot,
|
||||||
:beetroot
|
:beetroot,
|
||||||
|
:rhubarb,
|
||||||
|
:kale,
|
||||||
|
:cauliflower,
|
||||||
|
:broccoli,
|
||||||
|
:portulak,
|
||||||
|
:green_onions
|
||||||
]
|
]
|
||||||
|
|
||||||
field :unit, Ecto.Enum, values: [:kg, :kpl]
|
field :unit, Ecto.Enum, values: [:kg, :kpl]
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
"Lettuce": :lettuce,
|
"Lettuce": :lettuce,
|
||||||
"Tomato": :tomato,
|
"Tomato": :tomato,
|
||||||
"Cabbage": :cabbage,
|
"Cabbage": :cabbage,
|
||||||
|
"White Cabbage": :white_cabbage,
|
||||||
|
"Red Cabbage": :red_cabbage,
|
||||||
"Pumpkin": :pumpkin,
|
"Pumpkin": :pumpkin,
|
||||||
"Zucchini": :zucchini,
|
"Zucchini": :zucchini,
|
||||||
"Cucumber": :cucumber,
|
"Cucumber": :cucumber,
|
||||||
@@ -31,7 +33,14 @@
|
|||||||
"Bean": :bean,
|
"Bean": :bean,
|
||||||
"Parsnip": :parsnip,
|
"Parsnip": :parsnip,
|
||||||
"Carrot": :carrot,
|
"Carrot": :carrot,
|
||||||
"Beetroot": :beetroot
|
"Beetroot": :beetroot,
|
||||||
|
"Rhubarb": :rhubarb,
|
||||||
|
"Kale": :kale,
|
||||||
|
"Cauliflower": :cauliflower,
|
||||||
|
"Broccoli": :broccoli,
|
||||||
|
"Portulak": :portulak,
|
||||||
|
"Green Onions": :green_onions
|
||||||
|
|
||||||
],
|
],
|
||||||
prompt: "Choose a value" %>
|
prompt: "Choose a value" %>
|
||||||
<%= error_tag f, :plant %>
|
<%= error_tag f, :plant %>
|
||||||
|
|||||||
Reference in New Issue
Block a user