diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index d50e364a..3f3e7412 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -25,10 +25,7 @@ Issues: ISSUE: need to display multiple types of messages, best way to do that?? - DONE: Local validation errors - this works and is done - DONE: Server errors - This works and is done - - Application errors - - Make them show with the server error box, rejig it as a generic error box - - App errors don't need to survive page reload or api call, if they are that serious then they would be notifications instead - - clearing server errors does not necessarily clear message box errors? + - DONE: Application errors - Notifications, stuff that you want to know is there and can go and look at but isn't urgent enough to put in the users face - Used for notification system, non-urgent system messages, direct messages from users etc, anything that isn't immediately important - This seems like an application wide thing so maybe a bell icon that takes to another area of the program, or opens a div at the top or bottom of the page?? diff --git a/ayanova/src/api/gzapi.js b/ayanova/src/api/gzapi.js index ed90a43d..51e5d2c8 100644 --- a/ayanova/src/api/gzapi.js +++ b/ayanova/src/api/gzapi.js @@ -4,7 +4,6 @@ import router from "../router"; import auth from "./auth"; import errorHandler from "./errorhandler"; - function stringifyPrimitive(v) { switch (typeof v) { case "string": diff --git a/ayanova/src/api/gzvalidate.js b/ayanova/src/api/gzvalidate.js index 2777718e..d3d0e1b3 100644 --- a/ayanova/src/api/gzvalidate.js +++ b/ayanova/src/api/gzvalidate.js @@ -271,6 +271,7 @@ export default { /////////////////////////////// // SERVER ERRORS // Process and return server errors if any for form and field specified + // ServerErrors(v, ref) { //CHECK PREREQUISITES IN DEV MODE TO ENSURE FORM ISN"T MISSING NEEDED DATA ATTRIBUTES ETC if (v.$gzdevmode()) { @@ -350,6 +351,7 @@ export default { /////////////////////////////// // ClearServerErrors // Clear all server errors and app errors and ensure error box doesn't show + // DeleteAllErrorBoxErrors(v) { //clear all keys from server error v.$gzutil.RemoveAllPropertiesFromObject(v.serverError); @@ -361,6 +363,7 @@ export default { /////////////////////////////// // SetErrorBoxErrors // Gather server errors and set the appropriate keys + // SetErrorBoxErrors(v) { var errs = this.ServerErrors(v, "errorbox"); var ret = GetErrorBoxErrors(v, errs); @@ -369,6 +372,7 @@ export default { /////////////////////////////// // On Change handler // This is required so that server errors can be cleared when input is changed + // Change(v, ref) { if (triggeringChange) { return; diff --git a/ayanova/src/views/inventory-widget-edit.vue b/ayanova/src/views/inventory-widget-edit.vue index c5bb2cf3..5dc184c5 100644 --- a/ayanova/src/views/inventory-widget-edit.vue +++ b/ayanova/src/views/inventory-widget-edit.vue @@ -126,7 +126,7 @@