schedule working, clean up

This commit is contained in:
2021-09-24 18:43:51 +00:00
parent d379deb6e6
commit 01f85e4690
2 changed files with 9 additions and 407 deletions

View File

@@ -23,319 +23,6 @@
iPad error:
Name:
Test testerson
Company:
GZ TestCo Inc.
Database Id:
Mr8K4dgpDir722i9HLKhCYZ6r4WAweM9N7CQG4L9594=
Message:
AyaNova App
Version: 8.0.0-alpha.131
User: Theresa Christiansen - Tech
12h: true
Override browser time zone: America/Vancouver
Override browser language code: en-CA
Currency code (ISO 4217): USD
Browser
platform: MacIntel
userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Safari/605.1.15
languages: [ "en-CA" ]
tz: America/Vancouver
oscpu:
maxTouchPoints: 5
webdriver: false
vendor: Apple Computer, Inc.
availWidth: 768
availHeight: 1024
width: 768
height: 1024
devicePixelRatio: 2
pixelDepth: 32
Server
Server address: http://192.168.1.56:7575/api/v8.0/
Version: AyaNova server 8.0.0-alpha.131
Schema version: 1
Server time: 2021-09-23 2:31 PM
Override browser time zone: Pacific Standard Time
License
Licensed to: GZ TestCo Inc.
Database ID: Mr8K4dgpDir722i9HLKhCYZ6r4WAweM9N7CQG4L9594=
License serial number: 1632408933
License expiration date: 2021-10-23T14:55:33.7129704Z
Support and updates expiration date: 2021-10-23T14:55:33.7129704Z
Licensed options
Accounting
ServiceMode
ServiceTechs: 1000
TrialMode
CLIENT LOG
1592933475310|##### New version detected ##### cleared form settings cache ( -> 8.0.0-alpha.6)
1592933475463|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1595354141568|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1599088629760|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1599088633630|##### New version detected ##### cleared form settings cache (8.0.0-alpha.6 -> 8.0.0-alpha.10)
1599088633766|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1599088644529|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1599088644604|auth::processLogin -> User 1 logged in
1599088644604|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1599088713858|auth::processLogout -> User logged out
1624057130392|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1624057135269|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1624057135318|auth::processLogin -> User 1 logged in
1624057135319|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1624057271576|auth::processLogout -> User logged out
1624060747161|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1624060752120|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1624060754068|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1624060754122|auth::processLogin -> User 1 logged in
1624060754123|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1632426279289|auth::processLogout -> User logged out
1632426290692|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1632426290741|auth::processLogin -> User 10 logged in
1632426290741|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1632426302055|Vue error:
Error - Name:Error, Message:NaN is not a valid timestamp. It must be a Date, number of seconds since Epoch, or a string in the format of YYYY-MM-DD or YYYY-MM-DD hh:mm. Zero-padding is optional and seconds are ignored.
info: render
STACK:
Y@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:45:50695
W@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:101988
parseEvent@[native code]
map@[native code]
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31780
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:33478
getScopedSlots@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:108311
getScopedSlots@[native code]
render@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:126624
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:23866
i@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:27910
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31524
Kn@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:29731
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12775
ue@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12166
promiseReactionJob@[native code]
1632426302057|notify-error: Vue error:
Error - Name:Error, Message:NaN is not a valid timestamp. It must be a Date, number of seconds since Epoch, or a string in the format of YYYY-MM-DD or YYYY-MM-DD hh:mm. Zero-padding is optional and seconds are ignored.
info: render
STACK:
Y@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:45:50695
W@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:101988
parseEvent@[native code]
map@[native code]
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31780
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:33478
getScopedSlots@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:108311
getScopedSlots@[native code]
render@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:126624
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:23866
i@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:27910
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31524
Kn@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:29731
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12775
ue@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12166
promiseReactionJob@[native code]
1632426319813|App::Mounted - preset path presented: /home-schedule
1632426320393|Vue error:
Error - Name:Error, Message:NaN is not a valid timestamp. It must be a Date, number of seconds since Epoch, or a string in the format of YYYY-MM-DD or YYYY-MM-DD hh:mm. Zero-padding is optional and seconds are ignored.
info: render
STACK:
Y@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:45:50695
W@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:101988
parseEvent@[native code]
map@[native code]
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31780
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:33478
getScopedSlots@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:108311
getScopedSlots@[native code]
render@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:126624
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:23866
i@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:27910
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31524
Kn@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:29731
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12775
ue@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12166
promiseReactionJob@[native code]
1632426320394|notify-error: Vue error:
Error - Name:Error, Message:NaN is not a valid timestamp. It must be a Date, number of seconds since Epoch, or a string in the format of YYYY-MM-DD or YYYY-MM-DD hh:mm. Zero-padding is optional and seconds are ignored.
info: render
STACK:
Y@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:45:50695
W@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:101988
parseEvent@[native code]
map@[native code]
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31780
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:33478
getScopedSlots@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:108311
getScopedSlots@[native code]
render@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:126624
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:23866
i@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:27910
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31524
Kn@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:29731
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12775
ue@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12166
promiseReactionJob@[native code]
1632426333532|Vue error:
Error - Name:Error, Message:NaN is not a valid timestamp. It must be a Date, number of seconds since Epoch, or a string in the format of YYYY-MM-DD or YYYY-MM-DD hh:mm. Zero-padding is optional and seconds are ignored.
info: render
STACK:
Y@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:45:50695
W@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:101988
parseEvent@[native code]
map@[native code]
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31780
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:33478
getScopedSlots@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:108311
getScopedSlots@[native code]
render@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:126624
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:23866
i@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:27910
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31524
Kn@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:29731
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12775
ue@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12166
promiseReactionJob@[native code]
1632426333532|notify-error: Vue error:
Error - Name:Error, Message:NaN is not a valid timestamp. It must be a Date, number of seconds since Epoch, or a string in the format of YYYY-MM-DD or YYYY-MM-DD hh:mm. Zero-padding is optional and seconds are ignored.
info: render
STACK:
Y@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:45:50695
W@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:101988
parseEvent@[native code]
map@[native code]
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31780
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:33478
getScopedSlots@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:108311
getScopedSlots@[native code]
render@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:126624
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:23866
i@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:27910
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31524
Kn@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:29731
http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12775
ue@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12166
promiseReactionJob@[native code]
1632432624067|App::Mounted - preset path presented: /about
1632432642216|App::Mounted - preset path presented: /about
1632432647725|auth::processLogout -> User logged out
1632432653007|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1632432660143|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1632432660193|auth::processLogin -> User 10 logged in
1632432660194|gzapi::APIUrl -> setting to: http://192.168.1.56:7575/api/v8.0/
1632432668970|Vue error:
Error - Name:Error, Message:NaN is not a valid timestamp. It must be a Date, number of seconds since Epoch, or a string in the format of YYYY-MM-DD or YYYY-MM-DD hh:mm. Zero-padding is optional and seconds are ignored.
info: render
STACK:
Y@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:45:50695
W@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:101988
parseEvent@[native code]
map@[native code]
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31780
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:33478
getScopedSlots@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:108311
getScopedSlots@[native code]
render@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:126624
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:23866
i@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:27910
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31524
Kn@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:29731
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12775
ue@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12166
promiseReactionJob@[native code]
1632432668972|notify-error: Vue error:
Error - Name:Error, Message:NaN is not a valid timestamp. It must be a Date, number of seconds since Epoch, or a string in the format of YYYY-MM-DD or YYYY-MM-DD hh:mm. Zero-padding is optional and seconds are ignored.
info: render
STACK:
Y@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:45:50695
W@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:101988
parseEvent@[native code]
map@[native code]
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31780
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:33478
getScopedSlots@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:108311
getScopedSlots@[native code]
render@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:126624
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:23866
i@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:27910
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31524
Kn@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:29731
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12775
ue@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12166
promiseReactionJob@[native code]
1632432678709|Vue error:
Error - Name:Error, Message:NaN is not a valid timestamp. It must be a Date, number of seconds since Epoch, or a string in the format of YYYY-MM-DD or YYYY-MM-DD hh:mm. Zero-padding is optional and seconds are ignored.
info: render
STACK:
Y@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:45:50695
W@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:101988
parseEvent@[native code]
map@[native code]
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31780
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:33478
getScopedSlots@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:108311
getScopedSlots@[native code]
render@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:126624
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:23866
i@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:27910
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31524
Kn@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:29731
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12775
ue@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12166
promiseReactionJob@[native code]
1632432678710|notify-error: Vue error:
Error - Name:Error, Message:NaN is not a valid timestamp. It must be a Date, number of seconds since Epoch, or a string in the format of YYYY-MM-DD or YYYY-MM-DD hh:mm. Zero-padding is optional and seconds are ignored.
info: render
STACK:
Y@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:45:50695
W@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:101988
parseEvent@[native code]
map@[native code]
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31780
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:33478
getScopedSlots@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:108311
getScopedSlots@[native code]
render@http://192.168.1.56:7575/js/ay-common.05538e3e.js:1:126624
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:23866
i@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:27910
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:30792
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:31524
Kn@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:29731
@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12775
ue@http://192.168.1.56:7575/js/chunk-vendors.d24d09fe.js:7:12166
promiseReactionJob@[native code]
//..........
Data Table filter, now impossible to remove a filter because save is blanked out, maybe needs a clear button that does it all? Delete should trigger save too I guess
so maybe save should expose on change, not on presence of filter
@@ -468,6 +155,8 @@ todo:2 reporting custom fields
todo:2 use const, not let unless need to reassign the variable
Going to need a case by case through all uses but it's a very important precaution so code it that way now for all new code
todo: 2 schedule form sync with ical, there's a case for it
todo:3 link back to list from single edit form
it would be very handy to have a simple link back to the list or back a level
on each edit form. If new record then it skips that and goes to list
@@ -557,7 +246,12 @@ todo:3 Whats new in this release popup or link tied into the update process of t
todo: 3 Schedule form reporting?
could just default to regular reporting list, doesn't absolutely need to be a calendar at least at first
as long as it has all appointments consolidated in single list
Will need to support it at the server though, perhaps it bypasses normal report routes in some way

View File

@@ -1,8 +1,5 @@
<template>
<div v-if="formState.ready" v-resize="onResize" class="my-n8">
<!-- `{{ "focus:" + focus }}` {{ diagInfo() }}
{{ evInfo }}
{{ events }}-->
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
<v-sheet height="64">
@@ -83,16 +80,6 @@
@mouseup:time="endDragExtend"
@mouseleave.native="cancelDrag"
>
<!--
@touchstart:time="startTime"
@touchmove:time="mouseMoveDa
@touchend:event="touchEndEvent"
@touchstart:event="touchStartEvent"yView"
@touchmove:day="mouseMoveMonthView"
@touchend:day="endDragExtend"
@touchend:time="endDragExtend"
-->
<template v-slot:event="{ event, timed, eventSummary }">
<div class="v-event-draggable">
<v-icon small :color="event.textColor" class="mr-1">{{
@@ -417,43 +404,8 @@
</template>
<script>
/*
TODO NEXT:
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
DOCS:
how to use the schedule
Investigate: can AyaNova be a calendar source for Google calendar and others (like provide ical)
so they can view, move around but create would be outside that but provided for when refresh.
This way a user could just use their built in calendar app rather than fighting with our implementation
Make a case with whatever is found if it looks like a v.next thing
keywords google calendar feed url
https://stayrony.github.io/Create-iCal-ics-Files-in-net-Core/
http://blog.bennymichielsen.be/2013/11/11/exposing-ical-data-in-webapi/
https://blog.elmah.io/generate-calendar-in-ical-format-with-net-using-ical-net/
https://stackoverflow.com/questions/49032408/i-am-trying-to-provide-google-calendar-with-url-of-calendar-served-by-iis-asp-n
Looks like you just provide text back in ical format so would need a token system of some kind I guess since google calendar is not going to login
Maybe a sync option via the ayanova app is what is needed, i.e. they have a menu option to download as ical or sync as ical in ayanova and the device recognizes the url protocol or other type and syncs
this might be a workaround to security issues and users can just update as needed for offline working
ical maybe has urls to open objects in it somehow as well so they can clickthrough google calendar to the source object??
reporting - make it happen
could just default to regular reporting list, doesn't absolutely need to be a calendar at least at first
as long as it has all appointments consolidated in single list
Move on to the shared service schedule with categories being people and all that entails
*/
// const FORM_CUSTOM_TEMPLATE_KEY = "home-schedule";
const FORM_KEY = "home-schedule";
const CLICK_DETECT_TIMEOUT = 100;
const CLICK_DETECT_TIMEOUT = 200; //100 is a bit too fast to recognize a click
export default {
async created() {
let vm = this;
@@ -475,7 +427,6 @@ export default {
},
data() {
return {
//formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
focus: "",
viewType: "month",
selectedEvent: {},
@@ -578,15 +529,9 @@ export default {
this.dragged = true;
}, CLICK_DETECT_TIMEOUT); // Min delay to be regarded as extend instead of click, also affects click time to display more info, too short needs faster click
//console.log("extendBottom setting extendEvent");
this.extendEvent = event;
this.createStart = event.start;
this.extendOriginal = event.end;
} else {
//probably don't need this, was diagnosing new on click on locked items
////console.log("extendBottom not editable");
// // this.dragged = false;
// // this.extendEvent = null;
}
},
async endDragExtend() {
@@ -595,29 +540,20 @@ export default {
//on create then dragged is set to false and createStart is only value set, dragEvent is null and extendEvent is null
//Handle the event, could be one of three things: changing an event start time, changing an event length or creating a new event
////console.log("end drag extend");
if (this.extendEvent && this.extendEvent.type == 0) {
//console.log("end drag extend NEW");
//NEW, prompt for deets and create or if cancelled then just remove this faux event from events list (it will be the last one in the array)
this.newItemDialog = true;
} else {
////console.log("end drag extend MODIFY??");
if (!this.dragged) {
//we're here due to mouse up but it's not a drag or an extend so it's a More Info mouse up click so bail out now
//console.log("end drag extend NOPE NOT MODIFY, MUST BE MOREINFO", {
// dragEvent: this.dragEvent
// });
this.dragEvent = null; //this needs to be set or it will keep dragging off an editable event even as the moreinfo dialog show
return;
}
//console.log("end drag extend YES MODIFY");
//MODIFY existing event, drag or extend
if (this.dragEvent || this.extendEvent) {
let param = { type: null, id: null, start: null, end: null };
if (this.dragEvent) {
// && this.dragged
param.type = this.dragEvent.type;
param.id = this.dragEvent.id;
param.start = window.$gz.locale.localScheduleFormatToUTC8601String(
@@ -658,7 +594,6 @@ export default {
}
this.dragTime = null;
this.dragEvent = null;
//console.log("endDragExtend setting extendEvent to null");
this.extendEvent = null;
this.createStart = null;
this.extendOriginal = null;
@@ -666,7 +601,6 @@ export default {
cancelDrag() {
if (this.extendEvent) {
if (this.extendOriginal) {
//console.log("cancelDrag setting extendEvent");
this.extendEvent.end = this.extendOriginal;
} else {
const i = this.events.indexOf(this.extendEvent);
@@ -675,7 +609,6 @@ export default {
}
}
}
//console.log("cancelDrag setting extendEvent to null");
this.extendEvent = null;
this.createStart = null;
this.dragTime = null;
@@ -685,8 +618,6 @@ export default {
//# mouse down on an event triggers this call
if (event) {
if (event.editable) {
//console.log("startDrag editable event: ", event);
//My work around to disambiguate dragging and clicking
clearTimeout(this.dragTimeout);
this.dragged = false;
@@ -698,7 +629,6 @@ export default {
this.dragTime = null;
this.extendOriginal = null;
} else {
//console.log("startDrag not editable");
this.dragged = false;
this.dragEvent = event;
// this.extendEvent = null;
@@ -711,16 +641,8 @@ export default {
if (!this.dragEvent && !this.extendEvent) {
return;
}
//console.log("mouseMoveDayView has event, processing...");
const mouse = this.toTime(tms);
if (this.dragEvent && this.dragTime !== null) {
//console.log("mousemovedayview dragging");
////console.log("mouseMoveDAyView::dragging path ", {
// dragged: this.dragged,
// dragEvent: this.dragEvent,
// dragTime: this.dragTime
// });
//# DRAGGING PATH
const start = this.dragEvent.start;
const end = this.dragEvent.end;
@@ -731,7 +653,6 @@ export default {
this.dragEvent.start = newStart;
this.dragEvent.end = newEnd;
} else if (this.extendEvent && this.createStart !== null) {
//console.log("mouseMoveDAyView::extending path ", this.extendEvent);
//# EXTENDING PATH
const mouseRounded = this.roundTime(mouse, false);
const min = Math.min(mouseRounded, this.createStart);
@@ -767,16 +688,13 @@ export default {
//# DAY VIEW *DRAG* EXISTING START EVENT (not extend)
//(also called on simple click to view schedule more info)
if (this.dragEvent.editable) {
//console.log("startTime calculating this.dragTime");
const start = this.dragEvent.start;
this.dragTime = mouse - start;
} else {
//console.log("startTime AVOIDED calculating this.dragTime");
}
} else {
//# DAY VIEW CREATE START EVENT
this.createStart = this.roundTime(mouse);
//console.log("startTime setting extendEvent");
this.extendEvent = {
name: "-",
color: this.$store.state.darkMode ? "white" : "black",
@@ -911,11 +829,6 @@ 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);
let res = await window.$gz.api.post("schedule/personal", {
@@ -939,10 +852,6 @@ 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,
@@ -968,7 +877,7 @@ export default {
//and trying to load the events manually is not working out as the calendar reports a different
//start and end than it provides for the change event
//this is brutal but works
// window.location.reload();
window.location.reload();
}
//eom
}
@@ -1131,7 +1040,6 @@ async function getFormUserOptions(vm) {
window.$gz.form.setErrorBoxErrors(vm);
} else {
if (res.data == null) {
//console.log("getFormUserOptions null setting default");
//make a default
vm.formUserOptions = {
firstTime: "00:00",