diff --git a/vue/src/apps/ShoppingListView/ShoppingListView.vue b/vue/src/apps/ShoppingListView/ShoppingListView.vue index 43e74a25..5afe9f31 100644 --- a/vue/src/apps/ShoppingListView/ShoppingListView.vue +++ b/vue/src/apps/ShoppingListView/ShoppingListView.vue @@ -44,7 +44,7 @@ ref="amount_input_simple"> - + @@ -59,7 +59,7 @@ {{ $t('Undefined') }} {{ c.name }} - + @@ -379,7 +379,7 @@ class="mb-1"> - @@ -387,6 +387,19 @@ content-cols="1" class="mb-1" > + {{ $t('Information')}} + + + + + + + + + diff --git a/vue/src/components/ShoppingLineItem.vue b/vue/src/components/ShoppingLineItem.vue index 4583d7c2..3c21da14 100644 --- a/vue/src/components/ShoppingLineItem.vue +++ b/vue/src/components/ShoppingLineItem.vue @@ -2,7 +2,11 @@ - + + + + + {{ a.amount }} {{ a.unit }} @@ -12,13 +16,10 @@ - {{ info_row }} - - - + @@ -32,7 +33,7 @@ {{ $t('Quick actions') }} - {{ $t('Category')}} + {{ $t('Category') }} - + - {{ $t('Shop_later') }} + {{ $t('Postpone') }} {{ $t('Entries') }} @@ -162,14 +163,8 @@ export default { return this.food.name }, info_row: function () { - // TODO add setting let info_row = [] - - let display_authors = false - let display_recipes = true - let display_mealplans = true - let authors = [] let recipes = [] let meal_pans = [] @@ -205,18 +200,16 @@ export default { } } - - if (display_authors && authors.length > 0) { + if (useUserPreferenceStore().device_settings.shopping_item_info_created_by && authors.length > 0) { info_row.push(authors.join(', ')) } - if (display_recipes && recipes.length > 0) { + if (useUserPreferenceStore().device_settings.shopping_item_info_recipe && recipes.length > 0) { info_row.push(recipes.join(', ')) } - if (display_mealplans && meal_pans.length > 0) { + if (useUserPreferenceStore().device_settings.shopping_item_info_mealplan && meal_pans.length > 0) { info_row.push(meal_pans.join(', ')) } - return info_row.join(' - ') } }, diff --git a/vue/src/locales/en.json b/vue/src/locales/en.json index 2cc0af10..39cb6b64 100644 --- a/vue/src/locales/en.json +++ b/vue/src/locales/en.json @@ -67,7 +67,6 @@ "Step_Type": "Step Type", "Make_Header": "Make Header", "Make_Ingredient": "Make Ingredient", - "Shop_later": "Shop later", "Amount": "Amount", "Enable_Amount": "Enable Amount", "Disable_Amount": "Disable Amount", @@ -291,8 +290,10 @@ "Warning": "Warning", "NoCategory": "No category selected.", "InheritWarning": "{food} is set to inherit, changes may not persist.", - "ShowDelayed": "Show delayed items", - "ShowCompleted": "Show completed items", + "ShowDelayed": "Show postponed items", + "PostponedUntil": "Postponed until", + "Postpone": "Postponed until", + "ShowRecentlyCompleted": "Show recently completed items", "Completed": "Completed", "OfflineAlert": "You are offline, shopping list may not syncronize.", "shopping_share": "Share Shopping List", diff --git a/vue/src/stores/UserPreferenceStore.js b/vue/src/stores/UserPreferenceStore.js index 5972a33d..b378eeb3 100644 --- a/vue/src/stores/UserPreferenceStore.js +++ b/vue/src/stores/UserPreferenceStore.js @@ -24,6 +24,9 @@ export const useUserPreferenceStore = defineStore(_STORE_ID, { shopping_show_selected_supermarket_only: false, shopping_selected_grouping: 'food.supermarket_category.name', shopping_selected_supermarket: null, + shopping_item_info_created_by: false, + shopping_item_info_mealplan: true, + shopping_item_info_recipe: true, }, }), getters: {