2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-11 07:24:15 +00:00

More refactoring for notifications

- Adds default behaviour for successful stock item creation
This commit is contained in:
Oliver
2021-11-04 23:09:49 +11:00
parent 97326d9fb2
commit 3be4acf3ef
7 changed files with 66 additions and 21 deletions

View File

@ -904,19 +904,19 @@ function handleFormSuccess(response, options) {
// Display any messages
if (response && response.success) {
showAlertOrCache(response.success, 'success', cache);
showAlertOrCache(response.success, cache, {style: 'success'});
}
if (response && response.info) {
showAlertOrCache(response.info, 'info', cache);
showAlertOrCache(response.info, cache, {style: 'info'});
}
if (response && response.warning) {
showAlertOrCache(response.warning, 'warning', cache);
showAlertOrCache(response.warning, cache, {style: 'warning'});
}
if (response && response.danger) {
showAlertOrCache(response.danger, 'dagner', cache);
showAlertOrCache(response.danger, cache, {style: 'danger'});
}
if (options.onSuccess) {