-
+
+
+
+
+
+
+
+
+
+ {{ $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)