Skip to content

Recipe editor update to allow prompting of ingredients#849

Open
amgarr wants to merge 1 commit into
davidhealey:masterfrom
amgarr:master
Open

Recipe editor update to allow prompting of ingredients#849
amgarr wants to merge 1 commit into
davidhealey:masterfrom
amgarr:master

Conversation

@amgarr

@amgarr amgarr commented Aug 15, 2024

Copy link
Copy Markdown
Contributor

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.

@davidhealey

Copy link
Copy Markdown
Owner

Is this the same code used for the diary?

@amgarr

amgarr commented Aug 15, 2024

Copy link
Copy Markdown
Contributor Author

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.

@davidhealey

Copy link
Copy Markdown
Owner

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.

@EmilJunker

Copy link
Copy Markdown
Contributor

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.

@amgarr

amgarr commented Aug 15, 2024

Copy link
Copy Markdown
Contributor Author

Happy to take a crack at it but I may be out of my depth. Would it matter where the generic function would be?

@davidhealey

Copy link
Copy Markdown
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants