meal plan in search

This commit is contained in:
vabene1111
2021-04-18 17:19:11 +02:00
parent 4ad5d6ef2f
commit 058d705170
6 changed files with 67 additions and 16 deletions

View File

@@ -509,7 +509,7 @@
this.getRecipes();
},
getRecipes: function () {
let url = "{% url 'api:recipe-list' %}?limit=5"
let url = "{% url 'api:recipe-list' %}?page_size=5"
if (this.recipe_query !== '') {
url += '&query=' + this.recipe_query;
} else {
@@ -524,7 +524,7 @@
})
},
getMdNote: function () {
let url = "{% url 'api:recipe-list' %}?limit=5"
let url = "{% url 'api:recipe-list' %}?page_size=5"
if (this.recipe_query !== '') {
url += '&query=' + this.recipe_query;
}
@@ -627,13 +627,14 @@
cloneRecipe: function (recipe) {
let r = {
id: Math.round(Math.random() * 1000) + 10000,
recipe: recipe.id,
recipe: recipe,
recipe_name: recipe.name,
servings: (this.new_note_servings > 1) ? this.new_note_servings : recipe.servings,
title: this.new_note_title,
note: this.new_note_text,
is_new: true
}
console.log(recipe)
this.new_note_title = ''
this.new_note_text = ''