mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-04 05:39:00 -05:00
fixed checking food always works
This commit is contained in:
@@ -115,14 +115,14 @@ export const useShoppingListStore = defineStore(_STORE_ID, {
|
||||
}
|
||||
Vue.set(this.category_food_entries[category]['foods'][entry.food.id]['entries'], entry.id, entry)
|
||||
},
|
||||
toggleFoodCheckedState(food) {
|
||||
setFoodCheckedState(food, checked) {
|
||||
/**
|
||||
* function to handle user checking or unchecking a food
|
||||
*/
|
||||
|
||||
let entries = this.category_food_entries[this.getFoodCategory(food)]['foods'][food.id]['entries']
|
||||
for (let i in entries) {
|
||||
entries[i].checked = !entries[i].checked
|
||||
entries[i].checked = checked
|
||||
this.updateObject(entries[i])
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user