From cbf971db7731b14f60955c3a501840a9670a2ff1 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 28 Feb 2022 19:38:11 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 2 ++ ayanova/src/components/dash-labor-hours-personal-bar.vue | 6 ++++++ ayanova/src/components/dash-labor-hours-personal-line.vue | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index aa5c47b9..07d25c8a 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -47,6 +47,8 @@ seeder wo need new fields and generate data to show off and test kpi widgets and https://www.ayanova.com/AyaNova7webHelp/index.html?dashboard.htm +time zone conversion at client + - Widgets to make for beta in order of priority **MUST HAVE*** * LIST Unassigned work orders list for service manager diff --git a/ayanova/src/components/dash-labor-hours-personal-bar.vue b/ayanova/src/components/dash-labor-hours-personal-bar.vue index 7f32e526..9814a216 100644 --- a/ayanova/src/components/dash-labor-hours-personal-bar.vue +++ b/ayanova/src/components/dash-labor-hours-personal-bar.vue @@ -193,6 +193,12 @@ export default { this.errorMessage = res.error; } else { this.chartOptions.scales.xAxes[0].time.unit = this.settings.interval; + res.data.forEach(z => { + z.x = new Date(z.x) //convert to locale timezone and output in the closest thing to iso-8601 format + .toLocaleString("sv-SE", { + timeZone: this.timeZoneName + }); + }); this.obj = res.data; } } catch (error) { diff --git a/ayanova/src/components/dash-labor-hours-personal-line.vue b/ayanova/src/components/dash-labor-hours-personal-line.vue index 413b37aa..85ac0824 100644 --- a/ayanova/src/components/dash-labor-hours-personal-line.vue +++ b/ayanova/src/components/dash-labor-hours-personal-line.vue @@ -203,6 +203,12 @@ export default { this.errorMessage = res.error; } else { this.chartOptions.scales.xAxes[0].time.unit = this.settings.interval; + res.data.forEach(z => { + z.x = new Date(z.x) //convert to locale timezone and output in the closest thing to iso-8601 format + .toLocaleString("sv-SE", { + timeZone: this.timeZoneName + }); + }); this.obj = res.data; } } catch (error) {