Closed zacck-zz closed 7 years ago
Since fields for ingredients in the batch form need to be dynamic. I.e Press add button to select the ingredient this in turn should give you a dropdown of the ingredient's measurement to enable to use the ingredient in the batch.
proposal use redux-form's field arrays to add ingredients to batch
The unit of measurement can be assigned by the user e.g. a block of butter is entered at point of purchase and is purchased by 10kg units. Therefor it is programmed in the system to be used in kilograms . Does that make sense?
@dominicberinato yes that makes sense the task here is to make sure the user is presented with the correct units for the correct item
Looking at this batch
A batch = A processed version of an ingredient. e.g 10 x eggs + 10grams of flour + 10grams of butter = 100grams of short bread
When I am adding eggs I should enter a number
when I am adding flour I should enter grams
when I am adding butter I should enter grams
say this had milk I should enter mls
What I am attempting here is to aid the system in doing the above automatically.
i.e I choose a drop down that says flour
I am then presesnts with box for quantity but that quantity is already known to be grams
@dominicberinato considering the above and that batches are supposed to have units
. Since the specification seems to suggest that a batch itself should have a measurement unit. How it this done currently?
@dominicberinato @vswart Ok this is the solution that seems would work best for the system.
Since when an ingredient is being added to the system it should have a pack size this, in essence, will be the units the ingredient is being bought in.
Say we are adding the ingredient Butter
Instead of entering the pack size i.e ( 100kg )
One is should rather have to break this information into two bits
Purchase Units
i.e kilogram
Purchase Amount
i.e 100
This in turn awards us flexibility when we are entering batches. Now when a chef is building a sandwich they can add butter to a sandwich by adding the following bits
-> Butter -> 0.1 (note this is just a number or a fraction)
What happens here is the that the system will then go back and say
This batch contains Butter and further it contains 0.1 of it meaning it contains (0.1 x Kilogram
) of butter
Does this make sense?
Hi zacck,
Yes, the unit is already known because it is based on what was entered as a purchased amount at ingredient level.
On 3 Aug 2017 05:16, "Zacck Osiemo" notifications@github.com wrote:
@dominicberinato https://github.com/dominicberinato yes that makes sense the task here is to make sure the user is presented with the correct units for the correct item
Looking at this batch A batch = A processed version of an ingredient. e.g 10 x eggs + 10grams of flour + 10grams of butter = 100grams of short bread When I am adding eggs I should enter a number when I am adding flour I should enter grams when I am adding butter I should enter grams say this had milk I should enter mls What I am attempting here is to aid the system in doing the above automatically.
i.e I choose a drop down that says flour I am then presesnts with box for quantity but that quantity is already known to be grams
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zacck/cibo_system/issues/77#issuecomment-319863346, or mute the thread https://github.com/notifications/unsubscribe-auth/Ab_exIGbXGMpOexvMHaNLJEVJLrl7Wijks5sUUmWgaJpZM4Ooyz1 .
@dominicberinato @vswart addes some enhancement to the batch form entry. Should now look as follows -> When adding a batch -> When adding an ingredient to a batch
I assume this will be satisfactory for now. Will be working through the rest of the batch item to get it to sumit data correctly then move to refining the changes for the Recipe
Expected behavior and actual behavior.
When loading a new batch a chef should be able to attach ingredients to the batch as well as the ingredients native amount
Steps to reproduce the problem.
Specifications like the version of the project, operating system, or hardware.