From 0b8dd635102c730a5e23e97e97fc8a4c347eb2c5 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Sat, 23 Apr 2022 15:27:21 +0200 Subject: [PATCH] small fixes --- vue/src/apps/ShoppingListView/ShoppingListView.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vue/src/apps/ShoppingListView/ShoppingListView.vue b/vue/src/apps/ShoppingListView/ShoppingListView.vue index bdb6951d1..eeb709a20 100644 --- a/vue/src/apps/ShoppingListView/ShoppingListView.vue +++ b/vue/src/apps/ShoppingListView/ShoppingListView.vue @@ -1112,7 +1112,7 @@ export default { if (this.new_item.ingredient !== "" && this.new_item.ingredient !== undefined) { this.genericPostAPI("api_ingredient_from_string", {text: this.new_item.ingredient}).then((result) => { let unit = null - if (result.data.unit !== "") { + if (result.data.unit !== null) { unit = {name: result.data.unit} } @@ -1158,7 +1158,7 @@ export default { }) }, deleteCategory: function (c) { - // could be category relation or a catory + // could be category relation or a category let c_id = c?.category?.id ?? c.id let api = new ApiApiFactory() api.destroySupermarketCategory(c_id) @@ -1198,9 +1198,10 @@ export default { promises.push(this.saveThis({id: entry, delay_until: delay_date}, false)) }) Promise.all(promises).then(() => { - StandardToasts.makeStandardToast(this, StandardToasts.SUCCESS_UPDATE) this.items = this.items.filter((x) => !entries.includes(x.id)) this.delay = this.defaultDelay + }).catch(err => { + StandardToasts.makeStandardToast(this, StandardToasts.FAIL_UPDATE, err) }) }, deleteRecipe: function (e, recipe) {