This commit is contained in:
2021-09-24 17:56:03 +00:00
parent fa1feb8732
commit d379deb6e6

View File

@@ -421,40 +421,6 @@
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
FIX FOR BUGS:
America/New_York
todo: cleaner solution to date morphing would be in locale to break out the bits that do separate things, such as convert to / from time zone, output as iso8601, parse iso8601 etc
right now every block is doing it's own thing some are using luxon, some are using native js, it's a bit of a mess
todo: schedule is sending appointments when created in schedule and ayanova set to new york time with vancouver time so schedule's 1pm is showing in reminder form as 4pm when it gets there prefilled
todo: fix apple parsing issue and look for more places where it's happening potentially with sv-SE see locale.utcDateToScheduleCompatibleFormatLocalized for notes and example fix
TESTING:
Test here locally and check for layout issues while doing it on all devices
drag/extend in all views working?
mobile device testing
phones
ipad
shitty tablet
NOTE: no need for drag drop extend on non mouse device, but do want it to be able to create at least near the touch point
Move common functionality out of home-schedule to be re-used in svc-schedule and also potentially other scheds like customer view of workorders or visual calendar view of work for a single customer for techs etc
the more I can move out of it the easier to do more scheds in other places