Fixed shoppinglistitemtostock flow purchase dialog close handling (fixes #2739)

This commit is contained in:
Bernd Bestel
2025-05-25 21:44:12 +02:00
parent 8de5700310
commit d6f3595684
2 changed files with 6 additions and 1 deletions

View File

@@ -15,6 +15,7 @@
### Shopping list
- An amount of `0` is now allowed for shopping list items (just a convenience optimization, it was already possible to leave the amount field empty which implicitly resulted in an amount of `0`)
- Fixed that the "Add all list items to stock" workflow closed the dialog after every item instead only after the last one was added
### Recipes

View File

@@ -178,7 +178,11 @@ $('#save-purchase-button').on('click', function(e)
window.parent.postMessage(WindowMessageBag("AfterItemAdded", GetUriParam("listitemid")), Grocy.BaseUrl);
window.parent.postMessage(WindowMessageBag("ShowSuccessMessage", successMessage), Grocy.BaseUrl);
window.parent.postMessage(WindowMessageBag("Ready"), Grocy.BaseUrl);
window.parent.postMessage(WindowMessageBag("CloseLastModal"), Grocy.BaseUrl);
if (GetUriParam("flow") != "shoppinglistitemtostock")
{
window.parent.postMessage(WindowMessageBag("CloseLastModal"), Grocy.BaseUrl);
}
});
}
else