mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-04 21:58:54 -05:00
WIP shopping list
This commit is contained in:
@@ -116,6 +116,7 @@
|
|||||||
this.shopping_list = {
|
this.shopping_list = {
|
||||||
"recipes": [],
|
"recipes": [],
|
||||||
"entries": [],
|
"entries": [],
|
||||||
|
"entries_display": [],
|
||||||
"shared": [],
|
"shared": [],
|
||||||
"created_by": 1
|
"created_by": 1
|
||||||
}
|
}
|
||||||
@@ -182,6 +183,19 @@
|
|||||||
e.amount = (e.amount * slr.multiplier)
|
e.amount = (e.amount * slr.multiplier)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
updateDisplay: function () {
|
||||||
|
//TODO merge multiple ingredients of same unit
|
||||||
|
this.shopping_list.entries_display = []
|
||||||
|
|
||||||
|
for (let e of this.shopping_list.entries) {
|
||||||
|
let de = e
|
||||||
|
de.amount = (e.amount * slr.multiplier)
|
||||||
|
|
||||||
|
this.shopping_list.entries_display.push({
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
searchKeywords: function (query) {
|
searchKeywords: function (query) {
|
||||||
this.keywords_loading = true
|
this.keywords_loading = true
|
||||||
this.$http.get("{% url 'api:keyword-list' %}" + '?query=' + query + '&limit=10').then((response) => {
|
this.$http.get("{% url 'api:keyword-list' %}" + '?query=' + query + '&limit=10').then((response) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user