somewhat working list

This commit is contained in:
vabene1111
2023-12-22 14:35:17 +01:00
parent ddf9ef11a0
commit a70ebd5130
3 changed files with 87 additions and 398 deletions

View File

@@ -106,6 +106,16 @@ export const useShoppingListStore = defineStore(_STORE_ID, {
}
return -1
},
toggleFoodCheckedState(food) {
/**
* function to handle user checking or unchecking a food
*/
this.category_food_entries[this.getFoodCategory(food)]['foods'][food.id]['entries'].forEach(e => {
e.checked = !e.checked
this.updateObject(e)
})
},
delayFood(food) {
/**
* function to handle user "delaying" shopping entry