diff --git a/cookbook/tests/other/test_makenow_filter.py b/cookbook/tests/other/test_makenow_filter.py index e19ed0fa4..9293975fa 100644 --- a/cookbook/tests/other/test_makenow_filter.py +++ b/cookbook/tests/other/test_makenow_filter.py @@ -59,7 +59,7 @@ def test_makenow_ignoreshopping(recipes, makenow_recipe, user1, space_1): with scope(space=space_1): food = Food.objects.filter(ingredient__step__recipe=makenow_recipe.id).first() food.onhand_users.clear() - assert search.get_queryset(Recipe.objects.all()) == 0 + assert search.get_queryset(Recipe.objects.all()).count() == 0 food.ignore_shopping = True food.save() assert Food.objects.filter(ingredient__step__recipe=makenow_recipe.id, onhand_users__isnull=False).count() == 9 diff --git a/vue/src/apps/RecipeSearchView/RecipeSearchView.vue b/vue/src/apps/RecipeSearchView/RecipeSearchView.vue index 244942e48..d60d46905 100644 --- a/vue/src/apps/RecipeSearchView/RecipeSearchView.vue +++ b/vue/src/apps/RecipeSearchView/RecipeSearchView.vue @@ -517,7 +517,7 @@ import RecipeSwitcher from "@/components/Buttons/RecipeSwitcher" Vue.use(VueCookies) Vue.use(BootstrapVue) -let SEARCH_COOKIE_NAME = "search_settings2" +let SEARCH_COOKIE_NAME = "search_settings3" let UI_COOKIE_NAME = "ui_search_settings" export default { @@ -528,7 +528,7 @@ export default { return { // this.Models and this.Actions inherited from ApiMixin recipes: [], - facets: {}, + facets: { Books: [], Foods: [], Keywords: [] }, meal_plans: [], last_viewed_recipes: [], sortMenu: false, @@ -590,7 +590,7 @@ export default { show_books: true, show_rating: true, show_units: false, - show_filters: false, + show_filters: true, show_sortby: false, show_timescooked: false, show_makenow: false, @@ -722,13 +722,11 @@ export default { this.search.search_keywords[0].items.push(Number.parseInt(x)) this.facets.Keywords.push({ id: x, name: "loading..." }) } - } else { - this.facets.Keywords = [] } // TODO: figure out how to find nested items and load keyword/food children for that branch // probably a backend change in facets to pre-load children of nested items - this.facets.Foods = [] + for (let x of this.search.search_foods.map((x) => x.items).flat()) { this.facets.Foods.push({ id: x, name: "loading..." }) } @@ -737,7 +735,6 @@ export default { this.facets.Keywords.push({ id: x, name: "loading..." }) } - this.facets.Books = [] for (let x of this.search.search_books.map((x) => x.items).flat()) { this.facets.Books.push({ id: x, name: "loading..." }) } diff --git a/vue/src/components/GenericMultiselect.vue b/vue/src/components/GenericMultiselect.vue index be26f5454..8698ee912 100644 --- a/vue/src/components/GenericMultiselect.vue +++ b/vue/src/components/GenericMultiselect.vue @@ -1,5 +1,6 @@