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) {