From 863e666bdd694f93a1920adea9bded2dc7ce0a51 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 6 May 2021 22:10:06 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 3 +- ayanova/src/views/svc-workorder.vue | 46 ++++++++++++++++++++--------- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 2f2c25e0..ca1f5295 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -306,7 +306,8 @@ CURRENTLY DOING: woitem outstanding: custom fields, attachments, wiki todo: Test hiding woitem custom wiki attach test errors in them?? test updating and displaying with also header ones - + +todo: test the shit out of failures to save and ensure errors occur and as much as can be saved is saved OVERALL diff --git a/ayanova/src/views/svc-workorder.vue b/ayanova/src/views/svc-workorder.vue index d0f8fee3..b46a6b54 100644 --- a/ayanova/src/views/svc-workorder.vue +++ b/ayanova/src/views/svc-workorder.vue @@ -4,6 +4,7 @@
+ SERVERERROR:{{ formState.serverError }} { - z.error.details.forEach(x => { - let target = errorTargetFromSaveResult(vm, z, x.target); - if (target != null) { - ret.details.push({ - message: x.message, - error: x.error, - target: target - }); - } - }); + //console.log("z", z); + //{error:{code:xx,message:xx,target:xx},fatal:true} + if (z.error.details != null) { + z.error.details.forEach(x => { + let target = errorTargetFromSaveResult(vm, z, x.target); + if (target != null) { + ret.details.push({ + message: x.message, + error: x.error, + target: target + }); + } + }); + } else { + //only one error so just return it + console.log("single error path:", z.error); + ret = z.error; + //ret.details.push(z.error); + } }); + console.log("Returning ret=:", ret); return ret; }