From 9b3dc8169cd7873463d83d852a5157c4f1621dba Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 28 May 2019 23:52:12 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 3 +- .../src/components/gzdateandtimepicker.vue | 28 ++++++----- ayanova/src/views/About.vue | 48 ++++++++++++------- ayanova/src/views/inventory-widget-edit.vue | 2 +- 4 files changed, 50 insertions(+), 31 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index fb1d1298..e9156d8c 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -17,7 +17,7 @@ NEXT TODOS: - In the log it was ok at the top and backing out and back in Log showed properly in the menu from the about page so it seemed to refresh when went into the log - TODO: Check if ??Log is fetched on About page or prefetched or where it's fetched and is it doing it properly with a Promise Chain - - On pixel probably all though: + - DONE Date time input fucked: - Selected 420 in the widget edit form but it shows as 11:20 on the main list, localization time issue - Retest on desktop, probably a general date time conversion bug @@ -25,6 +25,7 @@ NEXT TODOS: - Can the save button be enabled more quickly after losing focus on the edited field or should I revamp that? - I can see users making a quick change clicking on save once and it won't save but they think it has. - Right now you need to click twice on save + - On object not found when deleting an item and trying to reload the edit page, shoudl redirect to home or back instead or just not there - Locale settings move to store diff --git a/ayanova/src/components/gzdateandtimepicker.vue b/ayanova/src/components/gzdateandtimepicker.vue index 8f9a3c9f..8581746f 100644 --- a/ayanova/src/components/gzdateandtimepicker.vue +++ b/ayanova/src/components/gzdateandtimepicker.vue @@ -99,50 +99,52 @@ export default { computed: { formatDateTime() { return this.value - ? this.$dayjs.utc(this.value) + ? this.$dayjs + .utc(this.value) .add(this.$gzlocale.timeZoneOffset, "hour") .format(this.$gzlocale.formats.shortDateAndTime) : ""; }, formatDate() { return this.value - ? this.$dayjs.utc(this.value) + ? this.$dayjs + .utc(this.value) .add(this.$gzlocale.timeZoneOffset, "hour") .format(this.$gzlocale.formats.shortDate) : ""; }, formatTime() { return this.value - ? this.$dayjs.utc(this.value) + ? this.$dayjs + .utc(this.value) .add(this.$gzlocale.timeZoneOffset, "hour") .format(this.$gzlocale.formats.shortTime) : ""; }, dateOnly: { get() { - return this.$dayjs.utc(this.value) + return this.$dayjs + .utc(this.value) .add(this.$gzlocale.timeZoneOffset, "hour") .format("YYYY-MM-DD"); }, set(value) { - this.date = this.$dayjs.utc(value + " " + this.timeOnly) + this.date = this.$dayjs + .utc(value + " " + this.timeOnly) .subtract(this.$gzlocale.timeZoneOffset, "hour") .toISOString(); } }, timeOnly: { get() { - return this.$dayjs.utc(this.value) + return this.$dayjs + .utc(this.value) .add(this.$gzlocale.timeZoneOffset, "hour") - .format("HH:mm:ss");//BUGBUG: Format here is converting it to local time unexpectedly - //this is because of the z in the utc source date and time which triggers format to convert to local time. - //for example this will show correctly (note no z at the end) timezoneoffset is -7: - //this.$dayjs("2019-05-28T19:01:00").add(this.$gzlocale.timeZoneOffset, "hour").format("HH:mm:ss") == "12:01:00" - //whereas this will not - //this.$dayjs("2019-05-28T19:01:00").add(this.$gzlocale.timeZoneOffset, "hour").format("HH:mm:ss") == "05:01:00" <-wrong! + .format("HH:mm:ss"); }, set(value) { - this.date = this.$dayjs.utc(this.dateOnly + " " + value) + this.date = this.$dayjs + .utc(this.dateOnly + " " + value) .subtract(this.$gzlocale.timeZoneOffset, "hour") .toISOString(); } diff --git a/ayanova/src/views/About.vue b/ayanova/src/views/About.vue index ee77eb36..9b848c42 100644 --- a/ayanova/src/views/About.vue +++ b/ayanova/src/views/About.vue @@ -26,37 +26,53 @@
- {{ this.$gzlocale.get("UserTimeZoneOffset") }}: + {{ this.$gzlocale.get("UserTimeZoneOffset") }}: {{ this.$gzlocale.timeZoneOffset }}
-
- {{ this.$gzlocale.get("DecimalSeparator") }}: - {{ this.$gzlocale.formats.DecimalSeparator }} +
+ {{ this.$gzlocale.get("DecimalSeparator") }}: + {{ + this.$gzlocale.formats.DecimalSeparator + }}
-
- {{ this.$gzlocale.get("CurrencySymbol") }}: - {{ this.$gzlocale.formats.currencySymbol }} +
+ {{ this.$gzlocale.get("CurrencySymbol") }}: + {{ + this.$gzlocale.formats.currencySymbol + }}
-
- {{ this.$gzlocale.get("ShortDateFormat") }}: +
+ {{ this.$gzlocale.get("ShortDateFormat") }}: {{ this.$gzlocale.formats.shortDate }}
-
- {{ this.$gzlocale.get("ShortTimeFormat") }}: +
+ {{ this.$gzlocale.get("ShortTimeFormat") }}: {{ this.$gzlocale.formats.shortTime }}
-
- {{ this.$gzlocale.get("ShortDateAndTimeFormat") }}: - {{ this.$gzlocale.formats.shortDateAndTime }} +
+ {{ this.$gzlocale.get("ShortDateAndTimeFormat") }}: + {{ + this.$gzlocale.formats.shortDateAndTime + }}
- - {{ this.$gzlocale.get("Browser") }}
diff --git a/ayanova/src/views/inventory-widget-edit.vue b/ayanova/src/views/inventory-widget-edit.vue index a2f8c965..278c9a3f 100644 --- a/ayanova/src/views/inventory-widget-edit.vue +++ b/ayanova/src/views/inventory-widget-edit.vue @@ -140,7 +140,7 @@ - endate: {{ obj.endDate }} + endate: {{ obj.endDate }}