This commit is contained in:
2021-09-24 00:13:36 +00:00
parent b85e7e99b8
commit a384b92927
3 changed files with 395 additions and 10 deletions

View File

@@ -421,6 +421,23 @@
TODO NEXT:
bugbug? If I set new york time zone in ayanova, then in schedule the appointments made previously in vancovuer time zone don't seem to move.
if I make a new appointment in the schedule by dragging like 6pm then open a reminder to fill it, it shows as 9pm
so the calendar is still in browser local time, not overridden
This works properly when I can make an appointment in sched set to newyork time at 3pm and then flip to vancovuer time and it's 12:00noon and vice versa
it should show in the sched at correct local time and create at correct local time.
Notes: date/time pickers don't have time zone settings, so whatever I did there I need to do here
For *DISPLAY* need to convert UTC to local iso8601 using locale.utcDateStringToLocal8601DateOnlyString
For return back to actual server value it emits using this code:
let ret = window.$gz.locale.localTimeDateStringToUTC8601String(
theDate + "T" + theTime,
vm.timeZoneName
);
So the issue is that the controls will *always* use / expect the time to be local to the browser ignoring the forced conversion
so we need to present the UTC time to the control as a local time that works for HERE but in fact is then converted by the difference of the forced time zone when saving
If I'm in New York and I book for 4pm it should show 1pm to a user in Vancouver zone
TESTING:
Test here locally and check for layout issues while doing it on all devices
@@ -920,6 +937,10 @@ export default {
nativeEvent.stopPropagation();
},
async fetchEvents({ start, end }) {
window.$gz.store.commit(
"logItem",
`fetchEvents:${JSON.stringify({ start: start.date, end: end.date })}`
);
// console.log("FetchEvents:", { start: start.date, end: end.date });
try {
window.$gz.form.deleteAllErrorBoxErrors(this);
@@ -944,6 +965,10 @@ export default {
this.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(this);
} else {
// window.$gz.store.commit(
// "logItem",
// `fetchEvents::MAPPING, res.data is: ${JSON.stringify(res.data)}`
// );
this.events = res.data.map(x => {
return {
...x,