Ingredients have units, it is important for the shopping list that these units be well defined with conversion methods between them to know the amounts that we need to purchase.
e.g. A user has 500g worth of raisins in storage and a recipe calls for 1kg, we need to be able to know that they need 500g more, and be able to update the amounts in the storage when possible.
Technical details and requirements
User should be able to select from a dropdown of ingredient units when selecting unit
These should be mapped to an IngredientUnit class which extends some type of Unit superclass that requires conversions with other classes that implement this.
One limitation might be that if it is a volume it is not comparable to a Unit that is a volume like L it will not be convertible to a weight like kg
Right before merging
Clear out the database of ingredients that do not match this convention and let the team know when this is done
Description
Ingredient
s have units, it is important for the shopping list that these units be well defined with conversion methods between them to know the amounts that we need to purchase.e.g. A user has 500g worth of raisins in storage and a recipe calls for 1kg, we need to be able to know that they need 500g more, and be able to update the amounts in the storage when possible.
Technical details and requirements
IngredientUnit
class which extends some type ofUnit
superclass that requires conversions with other classes that implement this.Unit
that is a volume like L it will not be convertible to a weight like kgRight before merging