From a6a136c892e9dda096314253b9bed10415d1cfc3 Mon Sep 17 00:00:00 2001 From: smilerz Date: Tue, 18 Jan 2022 15:40:01 -0600 Subject: [PATCH] fix multiselect --- .../RecipeSearchView/RecipeSearchView.vue | 87 +++++++++++++------ 1 file changed, 61 insertions(+), 26 deletions(-) diff --git a/vue/src/apps/RecipeSearchView/RecipeSearchView.vue b/vue/src/apps/RecipeSearchView/RecipeSearchView.vue index e11459217..8dda3ad35 100644 --- a/vue/src/apps/RecipeSearchView/RecipeSearchView.vue +++ b/vue/src/apps/RecipeSearchView/RecipeSearchView.vue @@ -63,25 +63,25 @@ - + - + - + - + - + - +
@@ -90,41 +90,41 @@
- - + + - + - + - + - + - + - + - + - + - + - + @@ -138,7 +138,7 @@
-
+
-
+
-
+
-
+
+ +
+
+ + + + + + {{ $t("or") }} + {{ $t("and") }} + + + + +
+
@@ -340,10 +364,12 @@ export default { search_keywords: [], search_foods: [], search_books: [], + search_units: [], search_ratings: undefined, search_keywords_or: true, search_foods_or: true, search_books_or: true, + search_units_or: true, pagination_page: 1, expert_mode: false, }, @@ -490,15 +516,23 @@ export default { this.random_search = random let params = { query: this.search.search_input, - keywords: this.search.search_keywords, - foods: this.search.search_foods, + keywords: this.search.search_keywords.map(function (A) { + return A?.["id"] ?? A + }), + foods: this.search.search_foods.map(function (A) { + return A?.["id"] ?? A + }), rating: this.search.search_ratings, + units: this.search.search_units.map(function (A) { + return A["id"] + }), books: this.search.search_books.map(function (A) { return A["id"] }), keywordsOr: this.search.search_keywords_or, foodsOr: this.search.search_foods_or, booksOr: this.search.search_books_or, + unitsOr: this.search.search_units_or, internal: this.search.search_internal, random: this.random_search, _new: this.ui.sort_by_new, @@ -561,6 +595,7 @@ export default { this.search.search_keywords = [] this.search.search_foods = [] this.search.search_books = [] + this.search.search_units = [] this.search.search_ratings = undefined this.search.pagination_page = 1 this.refreshData(false)