Optimized server error display handling when consuming a recipe (closes #2310)

This commit is contained in:
Bernd Bestel 2023-08-15 18:51:40 +02:00
parent a123535b0a
commit a965d01fb9
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
3 changed files with 2 additions and 7 deletions

View File

@ -1139,9 +1139,6 @@ msgstr ""
msgid "Today"
msgstr ""
msgid "Not all ingredients of recipe \"%s\" are in stock, nothing removed"
msgstr ""
msgid "Undo task"
msgstr ""

View File

@ -906,9 +906,8 @@ $(document).on('click', '.recipe-consume-button', function(e)
},
function(xhr)
{
toastr.warning(__t('Not all ingredients of recipe "%s" are in stock, nothing removed', objectName));
Grocy.FrontendHelpers.EndUiBusy();
console.error(xhr);
Grocy.FrontendHelpers.ShowGenericError("A server error occured while processing your request", xhr.response);
}
);
}

View File

@ -265,8 +265,7 @@ $(".recipe-consume").on('click', function(e)
function(xhr)
{
Grocy.FrontendHelpers.EndUiBusy();
toastr.warning(__t('Not all ingredients of recipe "%s" are in stock, nothing removed', objectName));
console.error(xhr);
Grocy.FrontendHelpers.ShowGenericError("A server error occured while processing your request", xhr.response);
}
);
}