diff --git a/ayanova/src/api/gzform.js b/ayanova/src/api/gzform.js
index 4a27a784..44dcb1fe 100644
--- a/ayanova/src/api/gzform.js
+++ b/ayanova/src/api/gzform.js
@@ -84,6 +84,8 @@ function getControlLabel(ctrl) {
// from server error collection
//
function getErrorsForField(vm, ref) {
+ //Note: to debug this on forms just put {{ formState.serverError }}
+ //on the form to see what is actually stored there and should be showing
let ret = [];
if (ref == "generalerror") {
ret = vm.formState.serverError.details.filter(
diff --git a/ayanova/src/components/pick-list.vue b/ayanova/src/components/pick-list.vue
index 4ea6828a..afdbe77d 100644
--- a/ayanova/src/components/pick-list.vue
+++ b/ayanova/src/components/pick-list.vue
@@ -11,7 +11,7 @@
item-text="name"
item-value="id"
item-disabled="!active"
- :error-messages="errors"
+ :error-messages="errorMessages"
:loading="fetching"
:placeholder="$ay.t('Search')"
:search-input.sync="searchEntry"
@@ -25,7 +25,7 @@
>
- {{ errors[0] }}
+ {{ entryError }}
@@ -47,7 +47,7 @@ export default {
data() {
return {
searchResults: [],
- errors: [],
+ entryError: null,
searchEntry: null,
lastSelection: null,
fetching: false,
@@ -61,7 +61,7 @@ export default {
type: Number,
default: null
},
-
+ errorMessages: { type: Array, default: null },
readonly: { type: Boolean, default: false },
disabled: { type: Boolean, default: false },
ayaType: {
@@ -102,7 +102,7 @@ export default {
},
searchEntry(val, oldVal) {
let vm = this;
- //clear any local errors
+ //clear any local entryError
vm.clearErrors();
//if the search entry is in the results list then it's a drop down selection not a typed search so bail
for (let i = 0; i < vm.searchResults.length; i++) {
@@ -121,7 +121,7 @@ export default {
this.doSearch(val);
},
- errors(val) {
+ entryError(val) {
if (this.hasError()) {
this.errorIcon = "$ayiQuestionCircle";
} else {
@@ -134,10 +134,10 @@ export default {
return this.lastSelection;
},
hasError: function() {
- return this.errors.length > 0;
+ return this.entryError != null;
},
clearErrors: function() {
- this.errors = [];
+ this.entryError = null;
},
handleErrorClick: function() {
//open help nav for picklist
@@ -319,7 +319,7 @@ export default {
if (searchFor.includes(" ")) {
queryTerms = searchFor.split(" ");
if (queryTerms.length > 2) {
- vm.errors.push(vm.$ay.t("ErrorPickListQueryInvalid"));
+ vm.entryError = vm.$ay.t("ErrorPickListQueryInvalid");
return;
}
isATwoTermQuery = true;
@@ -355,7 +355,7 @@ export default {
queryTerms[0].startsWith("..") &&
queryTerms[1].startsWith("..")
) {
- vm.errors.push(vm.$ay.t("ErrorPickListQueryInvalid"));
+ vm.entryError = vm.$ay.t("ErrorPickListQueryInvalid");
return;
}
@@ -364,7 +364,7 @@ export default {
!queryTerms[0].startsWith("..") &&
!queryTerms[1].startsWith("..")
) {
- vm.errors.push(vm.$ay.t("ErrorPickListQueryInvalid"));
+ vm.entryError = vm.$ay.t("ErrorPickListQueryInvalid");
return;
}
}
diff --git a/ayanova/src/views/svc-csr.vue b/ayanova/src/views/svc-csr.vue
index b7d88353..bcf8844c 100644
--- a/ayanova/src/views/svc-csr.vue
+++ b/ayanova/src/views/svc-csr.vue
@@ -1,5 +1,6 @@