From 61dbf171acd8e8612cf3ae672377c17c6c74940d Mon Sep 17 00:00:00 2001 From: Katharina Bogad Date: Sat, 26 Jun 2021 00:26:58 +0200 Subject: [PATCH] More undo window messages --- js/grocy.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/grocy.js b/js/grocy.js index d6f0d414..a285ea14 100644 --- a/js/grocy.js +++ b/js/grocy.js @@ -436,6 +436,18 @@ class GrocyClass function() { toastr.success(self.translate("Booking successfully undone")); + + self.Api.Get('stock/transactions/' + transactionId.toString(), + function(result) + { + if (result[0].product_id !== undefined) + window.postMessage(WindowMessageBag("ProductChanged", result[0].product_id), self.BaseUrl); + }, + function(xhr) + { + console.error(xhr); + } + ); }, function(xhr) {