This commit is contained in:
@@ -85,9 +85,9 @@ function getControlLabel(ctrl) {
|
|||||||
//
|
//
|
||||||
function getErrorsForField(vm, ref) {
|
function getErrorsForField(vm, ref) {
|
||||||
let ret = [];
|
let ret = [];
|
||||||
if (ref == "errorbox") {
|
if (ref == "generalerror") {
|
||||||
ret = vm.formState.serverError.details.filter(
|
ret = vm.formState.serverError.details.filter(
|
||||||
z => z.target == false || z.target == "errorbox"
|
z => z.target == false || z.target == "generalerror"
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
ret = vm.formState.serverError.details.filter(function(o) {
|
ret = vm.formState.serverError.details.filter(function(o) {
|
||||||
@@ -650,8 +650,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//GENERAL ERROR
|
//GENERAL ERROR
|
||||||
if (ref == "errorbox") {
|
if (ref == "generalerror") {
|
||||||
//Add any general errors to ret (specific detail errors for the errorbox will be processed later below)
|
//Add any general errors to ret (specific detail errors for the "generalerror" will be processed later below)
|
||||||
let err = vm.$ay.t("ErrorAPI" + apiErrorCode.toString());
|
let err = vm.$ay.t("ErrorAPI" + apiErrorCode.toString());
|
||||||
|
|
||||||
if (vm.formState.serverError.message) {
|
if (vm.formState.serverError.message) {
|
||||||
@@ -774,7 +774,7 @@ export default {
|
|||||||
// Gather server errors and set the appropriate keys
|
// Gather server errors and set the appropriate keys
|
||||||
//
|
//
|
||||||
setErrorBoxErrors(vm) {
|
setErrorBoxErrors(vm) {
|
||||||
let errs = this.serverErrors(vm, "errorbox");
|
let errs = this.serverErrors(vm, "generalerror");
|
||||||
let ret = getErrorBoxErrors(vm, errs);
|
let ret = getErrorBoxErrors(vm, errs);
|
||||||
vm.formState.errorBoxMessage = ret;
|
vm.formState.errorBoxMessage = ret;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-col v-if="errorBoxMessage" cols="12" mt-1 mb-2>
|
<v-col v-if="errorBoxMessage" cols="12" mt-1 mb-2>
|
||||||
<v-alert
|
<v-alert
|
||||||
ref="errorbox"
|
ref="generalerror"
|
||||||
data-cy="errorbox"
|
data-cy="generalerror"
|
||||||
v-show="errorBoxMessage"
|
v-show="errorBoxMessage"
|
||||||
color="error"
|
color="error"
|
||||||
icon="$ayiExclamationCircle"
|
icon="$ayiExclamationCircle"
|
||||||
|
|||||||
Reference in New Issue
Block a user