Recipe editor update to allow prompting of ingredients#849
Conversation
|
Is this the same code used for the diary? |
|
Its very similar to the code in the diary. Just made a changes to keep it in line with Recipe-Editor, i.e. took out things related to category and entry. Also took out the code writing to dbhandler since that is handled by the save function. |
|
I'm wondering if it would be possible to add a generic function that can be used by both the diary and the recipes, to avoid code duplication. |
Yes, I also think that would be preferable. And ideally, it should be usable for meals too in addition to recipes. And the setting should then probably be moved from the Diary section into the Foods/Meals/Recipes section because it applies to all of them. |
|
Happy to take a crack at it but I may be out of my depth. Would it matter where the generic function would be? |
|
It would probably make most sense to put it in this file - https://github.com/davidhealey/waistline/blob/master/www/activities/foods-meals-recipes/js/foods-meals-recipes.js Unless @EmilJunker has a better suggestion. |
Change in recipe-editor to prompt ingredients for quantity when creating recipe.
Checks if Prompt for quantity when adding items is enabled in Diary settings. If so then also prompts for quantity when creating recipes.