Properly show the API error when it failed to undo a stock booking (fixes #267)

This commit is contained in:
Bernd Bestel
2019-06-08 16:53:31 +02:00
parent b1adaa24cf
commit 43710b5062
2 changed files with 4 additions and 0 deletions

View File

@@ -1265,3 +1265,6 @@ msgstr ""
msgid "Marked task %s as completed on %s" msgid "Marked task %s as completed on %s"
msgstr "" msgstr ""
msgid "Booking has subsequent dependent bookings, undo not possible"
msgstr ""

View File

@@ -69,6 +69,7 @@ $(document).on('click', '.undo-stock-booking-button', function(e)
function(xhr) function(xhr)
{ {
console.error(xhr); console.error(xhr);
toastr.error(__t(JSON.parse(xhr.response).error_message));
} }
); );
}); });