This commit is contained in:
@@ -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??
|
||||
|
||||
@@ -4,7 +4,6 @@ import router from "../router";
|
||||
import auth from "./auth";
|
||||
import errorHandler from "./errorhandler";
|
||||
|
||||
|
||||
function stringifyPrimitive(v) {
|
||||
switch (typeof v) {
|
||||
case "string":
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/* eslint-disable */
|
||||
/* xeslint-disable */
|
||||
|
||||
export default {
|
||||
beforeCreate() {
|
||||
@@ -210,7 +210,6 @@ export default {
|
||||
|
||||
//clear any errors that might be around from previous submit
|
||||
this.$gzv.DeleteAllErrorBoxErrors(this);
|
||||
//this.$gzutil.RemoveAllPropertiesFromObject(this.serverError);
|
||||
|
||||
this.$gzapi
|
||||
.upsert(url, this.obj)
|
||||
@@ -287,4 +286,4 @@ IN JS FORMAT
|
||||
]
|
||||
}
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user