From 759c664e48e5c06d21202540cd0a3576ca18be54 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 30 Nov 2020 17:23:35 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 1 + ayanova/src/api/errorhandler.js | 17 +- ayanova/src/components/date-time-control.vue | 155 +++++++++---------- 3 files changed, 83 insertions(+), 90 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index dfd5865c..62e40e19 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -29,6 +29,7 @@ todo: DATE / TIME / DATE_TIME controls switch back to vuetify ones Better solution: one clear button that clears all and emits properly and disable the built in if possible +todo: datetime testing make sure locale, am/pm etc are all honoured todo: gz-data-table make sure unbounded notes column is bounded by some length restriction mobile format is ok, it cuts off at one line, but for desktop we should have a sane limit as right now it's completely unbounded diff --git a/ayanova/src/api/errorhandler.js b/ayanova/src/api/errorhandler.js index 4307b077..807615d6 100644 --- a/ayanova/src/api/errorhandler.js +++ b/ayanova/src/api/errorhandler.js @@ -73,17 +73,22 @@ function decodeError(e, vm) { // console.log(typeof e === "object"); //empty? + // console.log("e instanceof Error ", e instanceof Error); + // console.log(e); + + //console.log("Object.keys(e)", Object.keys(e)); + + //an Error object? + if (e instanceof Error) { + return `Error - Name:${e.name}, Message:${e.message}`; + } + if ( e == null || e == "" || (typeof e === "object" && Object.keys(e).length === 0) ) { - return "errorHandler::decodeError - Error is unknown / empty"; - } - - //an Error object? - if (e instanceof Error) { - return `Error - Name:${e.name}, Message:${e.message}`; + return `errorHandler::decodeError - Error is unknown / empty (e:${e})`; } //API error object? diff --git a/ayanova/src/components/date-time-control.vue b/ayanova/src/components/date-time-control.vue index ea409208..337d20da 100644 --- a/ayanova/src/components/date-time-control.vue +++ b/ayanova/src/components/date-time-control.vue @@ -13,7 +13,7 @@ v-on="on" prepend-icon="$ayiCalendarAlt" @click:prepend="dlgdate = true" - v-model="formatDate" + :value="dateValue" v-bind:label="label" v-bind:rules="rules" readonly @@ -22,8 +22,9 @@ > @@ -44,7 +45,7 @@