This commit is contained in:
@@ -86,26 +86,10 @@ function getControlLabel(ctrl) {
|
||||
function getErrorsForField(vm, ref) {
|
||||
let ret = [];
|
||||
if (ref == "errorbox") {
|
||||
//de-lodash
|
||||
// ret = window.$gz. _.filter(vm.formState.serverError.details, function(o) {
|
||||
// return !o.target;
|
||||
// });
|
||||
|
||||
ret = vm.formState.serverError.details.filter(z => z.target == false);
|
||||
ret = vm.formState.serverError.details.filter(
|
||||
z => z.target == false || z.target == "errorbox"
|
||||
);
|
||||
} else {
|
||||
//de-lodash
|
||||
// ret = window.$gz. _.filter(vm.formState.serverError.details, function(o) {
|
||||
// if (!o.target) {
|
||||
// return false;
|
||||
// }
|
||||
// //server error fields are capitalized
|
||||
// //client field names are generally lower case except for custom fields
|
||||
// //so we need to normalize them all to lower case to match
|
||||
// //they will always differ by more than case so this is fine
|
||||
|
||||
// return o.target.toLowerCase() == ref.toLowerCase();
|
||||
// });
|
||||
|
||||
ret = vm.formState.serverError.details.filter(function(o) {
|
||||
if (!o.target) {
|
||||
return false;
|
||||
@@ -652,11 +636,13 @@ export default {
|
||||
API_CLOSED = 2000,
|
||||
API_OPS_ONLY = 2001,
|
||||
API_SERVER_ERROR = 2002,
|
||||
VALIDATION_REFERENTIAL_INTEGRITY = 2208
|
||||
*/
|
||||
switch (apiErrorCode) {
|
||||
case 2000:
|
||||
case 2001:
|
||||
case 2002:
|
||||
case 2208:
|
||||
formValid = true; //we came here because the user saved because the form was valid so it's safe to set that the same again
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user