From ad7ab825c893dc384becdad12531b5dd51d350db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Fri, 12 Nov 2021 12:01:31 +0100 Subject: [PATCH] [fix] delete picture of drink --- src/components/CalculationTable.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/CalculationTable.vue b/src/components/CalculationTable.vue index ab94f79..91eac1a 100644 --- a/src/components/CalculationTable.vue +++ b/src/components/CalculationTable.vue @@ -5,6 +5,7 @@ :columns="columns" :rows="drinks" dense + row-key="id" :filter="search" :filter-method="filter" grid @@ -460,6 +461,9 @@ export default defineComponent({ for (const volume of toDeleteObjects.volumes) { await store.deleteVolume(volume, drink); } + if (deletePic) { + await deletePicture(); + } if (drink.id > 0) { await store.updateDrink(drink); } else { @@ -468,9 +472,6 @@ export default defineComponent({ editDrink.value.id = _drink.id; } } - if (deletePic) { - await deletePicture(); - } if (drinkPic instanceof File) { await savePicture(drinkPic); }