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
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 4 additions and 0 deletions

View File

@ -1265,3 +1265,6 @@ msgstr ""
msgid "Marked task %s as completed on %s"
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)
{
console.error(xhr);
toastr.error(__t(JSON.parse(xhr.response).error_message));
}
);
});