diff --git a/vue/src/components/ShoppingLineItem.vue b/vue/src/components/ShoppingLineItem.vue
index 67a5ff44..a39f77c6 100644
--- a/vue/src/components/ShoppingLineItem.vue
+++ b/vue/src/components/ShoppingLineItem.vue
@@ -12,13 +12,15 @@
-
-
{{ info_row }} INFO
-
+
+ {{ info_row }}
+
-
+
+
+
@@ -35,7 +37,7 @@
{{ $t("Edit_Food") }}
- {{$t('Delay')}}
+ {{ $t('Delay') }}
{{ $t('Delete_All') }}
@@ -99,9 +101,9 @@ export default {
}
},
computed: {
- is_checked: function (){
+ is_checked: function () {
for (let i in this.entries) {
- if(!this.entries[i].checked){
+ if (!this.entries[i].checked) {
return false
}
}
@@ -172,7 +174,7 @@ export default {
return recipes.join(', ')
}
- if (this.entries.length === 123) {
+ if (Object.keys(this.entries ).length === 1) {
return "Abendessen 31.12" // TODO implement mealplan or manual
}
diff --git a/vue/src/stores/ShoppingListStore.js b/vue/src/stores/ShoppingListStore.js
index 9e97cc95..4813fe30 100644
--- a/vue/src/stores/ShoppingListStore.js
+++ b/vue/src/stores/ShoppingListStore.js
@@ -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])
}
},