mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
fixed shopping category headers showing when only containing delayed entries
This commit is contained in:
@@ -75,7 +75,7 @@
|
||||
<!-- --------------------------------------- shopping list table -->
|
||||
<b-row v-for="c in shopping_list_store.get_entries_by_group" v-bind:key="c.id">
|
||||
<b-col cols="12"
|
||||
v-if="c.count_unchecked > 0 || user_preference_store.device_settings.shopping_show_checked_entries && (c.count_unchecked + c.count_checked) > 0">
|
||||
v-if="(c.count_unchecked > 0 || user_preference_store.device_settings.shopping_show_checked_entries) && (c.count_unchecked + c.count_checked) > 0 && (c.count_delayed_unchecked < c.count_unchecked ||user_preference_store.device_settings.shopping_show_delayed_entries )">
|
||||
<b-button-group class="w-100 mt-1"
|
||||
:class="{'flex-row-reverse': useUserPreferenceStore().user_settings.left_handed}">
|
||||
<b-button variant="info" block class="btn btn-block text-left">
|
||||
|
||||
@@ -65,6 +65,7 @@ export const useShoppingListStore = defineStore(_STORE_ID, {
|
||||
let count_checked = 0
|
||||
let count_unchecked_food = 0
|
||||
let count_checked_food = 0
|
||||
let count_delayed_unchecked = 0
|
||||
|
||||
for (let fi in structure[i]['foods']) {
|
||||
let food_checked = true
|
||||
@@ -74,6 +75,9 @@ export const useShoppingListStore = defineStore(_STORE_ID, {
|
||||
} else {
|
||||
food_checked = false
|
||||
count_unchecked++
|
||||
if (structure[i]['foods'][fi]['entries'][ei].delay_until != null){
|
||||
count_delayed_unchecked++
|
||||
}
|
||||
}
|
||||
}
|
||||
if (food_checked) {
|
||||
@@ -87,6 +91,7 @@ export const useShoppingListStore = defineStore(_STORE_ID, {
|
||||
Vue.set(structure[i], 'count_checked', count_checked)
|
||||
Vue.set(structure[i], 'count_unchecked_food', count_unchecked_food)
|
||||
Vue.set(structure[i], 'count_checked_food', count_checked_food)
|
||||
Vue.set(structure[i], 'count_delayed_unchecked', count_delayed_unchecked)
|
||||
|
||||
total_unchecked += count_unchecked
|
||||
total_checked += count_checked
|
||||
|
||||
Reference in New Issue
Block a user