This commit is contained in:
@@ -25,10 +25,7 @@ Issues:
|
|||||||
ISSUE: need to display multiple types of messages, best way to do that??
|
ISSUE: need to display multiple types of messages, best way to do that??
|
||||||
- DONE: Local validation errors - this works and is done
|
- DONE: Local validation errors - this works and is done
|
||||||
- DONE: Server errors - This works and is done
|
- DONE: Server errors - This works and is done
|
||||||
- Application errors
|
- 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?
|
|
||||||
- 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
|
- 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
|
- 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??
|
- 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 auth from "./auth";
|
||||||
import errorHandler from "./errorhandler";
|
import errorHandler from "./errorhandler";
|
||||||
|
|
||||||
|
|
||||||
function stringifyPrimitive(v) {
|
function stringifyPrimitive(v) {
|
||||||
switch (typeof v) {
|
switch (typeof v) {
|
||||||
case "string":
|
case "string":
|
||||||
|
|||||||
@@ -271,6 +271,7 @@ export default {
|
|||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
// SERVER ERRORS
|
// SERVER ERRORS
|
||||||
// Process and return server errors if any for form and field specified
|
// Process and return server errors if any for form and field specified
|
||||||
|
//
|
||||||
ServerErrors(v, ref) {
|
ServerErrors(v, ref) {
|
||||||
//CHECK PREREQUISITES IN DEV MODE TO ENSURE FORM ISN"T MISSING NEEDED DATA ATTRIBUTES ETC
|
//CHECK PREREQUISITES IN DEV MODE TO ENSURE FORM ISN"T MISSING NEEDED DATA ATTRIBUTES ETC
|
||||||
if (v.$gzdevmode()) {
|
if (v.$gzdevmode()) {
|
||||||
@@ -350,6 +351,7 @@ export default {
|
|||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
// ClearServerErrors
|
// ClearServerErrors
|
||||||
// Clear all server errors and app errors and ensure error box doesn't show
|
// Clear all server errors and app errors and ensure error box doesn't show
|
||||||
|
//
|
||||||
DeleteAllErrorBoxErrors(v) {
|
DeleteAllErrorBoxErrors(v) {
|
||||||
//clear all keys from server error
|
//clear all keys from server error
|
||||||
v.$gzutil.RemoveAllPropertiesFromObject(v.serverError);
|
v.$gzutil.RemoveAllPropertiesFromObject(v.serverError);
|
||||||
@@ -361,6 +363,7 @@ export default {
|
|||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
// SetErrorBoxErrors
|
// SetErrorBoxErrors
|
||||||
// Gather server errors and set the appropriate keys
|
// Gather server errors and set the appropriate keys
|
||||||
|
//
|
||||||
SetErrorBoxErrors(v) {
|
SetErrorBoxErrors(v) {
|
||||||
var errs = this.ServerErrors(v, "errorbox");
|
var errs = this.ServerErrors(v, "errorbox");
|
||||||
var ret = GetErrorBoxErrors(v, errs);
|
var ret = GetErrorBoxErrors(v, errs);
|
||||||
@@ -369,6 +372,7 @@ export default {
|
|||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
// On Change handler
|
// On Change handler
|
||||||
// This is required so that server errors can be cleared when input is changed
|
// This is required so that server errors can be cleared when input is changed
|
||||||
|
//
|
||||||
Change(v, ref) {
|
Change(v, ref) {
|
||||||
if (triggeringChange) {
|
if (triggeringChange) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -126,7 +126,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
/* eslint-disable */
|
/* xeslint-disable */
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
@@ -210,7 +210,6 @@ export default {
|
|||||||
|
|
||||||
//clear any errors that might be around from previous submit
|
//clear any errors that might be around from previous submit
|
||||||
this.$gzv.DeleteAllErrorBoxErrors(this);
|
this.$gzv.DeleteAllErrorBoxErrors(this);
|
||||||
//this.$gzutil.RemoveAllPropertiesFromObject(this.serverError);
|
|
||||||
|
|
||||||
this.$gzapi
|
this.$gzapi
|
||||||
.upsert(url, this.obj)
|
.upsert(url, this.obj)
|
||||||
@@ -287,4 +286,4 @@ IN JS FORMAT
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user