mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Optimized server error display handling when consuming a recipe (closes #2310)
This commit is contained in:
parent
a123535b0a
commit
a965d01fb9
@ -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 ""
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user