WIP shopping list

This commit is contained in:
vabene1111
2020-09-01 11:31:29 +02:00
parent bc39b53aad
commit 14c94bf7ab

View File

@@ -116,6 +116,7 @@
this.shopping_list = {
"recipes": [],
"entries": [],
"entries_display": [],
"shared": [],
"created_by": 1
}
@@ -182,6 +183,19 @@
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) {
this.keywords_loading = true
this.$http.get("{% url 'api:keyword-list' %}" + '?query=' + query + '&limit=10').then((response) => {