before finishing the menu and dailyMenu, I need to adjust the key of the recipe table. Currently the key for the table is the title, I would like to switch that to be the combination of title and source.
[x] enforce unique title-source combination
This also brings a problem with the updating of the recipe. If the source or title is changed, the database assumes a new recipe. I want to add a new/edit mode (invisible to the user) that determines if the old recipe should be deleted, or if a new recipe is being altered. The edit mode would be entered when a recipe is clicked, or the recipe is saved. edit mode would exit if the clear button, delete button, or new recipe buttons are pressed. Hmmm, basically whenever the title field is cleared.... if the editor is in edit mode, whenever the recipe is saved, the previous recipe should be deleted, if the editor is in new mode, recipe checks will take place
before finishing the menu and dailyMenu, I need to adjust the key of the recipe table. Currently the key for the table is the title, I would like to switch that to be the combination of title and source.
This also brings a problem with the updating of the recipe. If the source or title is changed, the database assumes a new recipe. I want to add a new/edit mode (invisible to the user) that determines if the old recipe should be deleted, or if a new recipe is being altered. The edit mode would be entered when a recipe is clicked, or the recipe is saved. edit mode would exit if the clear button, delete button, or new recipe buttons are pressed. Hmmm, basically whenever the title field is cleared.... if the editor is in edit mode, whenever the recipe is saved, the previous recipe should be deleted, if the editor is in new mode, recipe checks will take place
[x] implement edit/new mode
[x] implement edit/new delete recipe logic