This commit is contained in:
2021-09-17 19:34:13 +00:00
parent fb25a7a4b0
commit b8f940a005
3 changed files with 29 additions and 78 deletions

View File

@@ -2,6 +2,7 @@
<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">
@@ -265,6 +266,9 @@ SETTINGS:
https://vuetifyjs.com/en/components/calendars/#drag-and-drop
https://vuetifyjs.com/en/components/floating-action-buttons/#speed-dial
issues:
drag losing end time for event
Test: overlapping sched items that start or end outside of view
this is a test of the query in schedulecontroller at server
@@ -393,12 +397,19 @@ export default {
//console.log("mouseMove got time:", mouse);
if (this.dragEvent && this.dragTime !== null) {
// console.log("mosueMove:A", {
// dragEvent: this.dragEvent,
// dragTime: this.dragTime
// });
console.log("mosueMove:A", {
dragEvent: JSON.stringify(this.dragEvent),
dragTime: JSON.stringify(this.dragTime)
});
//new Date(this.dragEvent.start).getTime();
const start = this.dragEvent.start;
const end = this.dragEvent.end;
// if (typeof start == "string") {
// start = new Date(start).getTime();
// }
// if (typeof end == "string") {
// end = new Date(end).getTime();
// }
const duration = end - start;
const newStartTime = mouse - this.dragTime;
@@ -409,7 +420,7 @@ export default {
this.dragEvent.start = newStart;
this.dragEvent.end = newEnd;
} else if (this.createEvent && this.createStart !== null) {
//console.log("mosueMove:B");
console.log("mosueMove:B");
const mouseRounded = this.roundTime(mouse, false);
//console.log("mouseMove mouseRounded:", mouseRounded);
const min = Math.min(mouseRounded, this.createStart);
@@ -429,7 +440,7 @@ export default {
this.extendOriginal = null;
},
cancelDrag() {
// console.log("cancelDrag");
// console.log("cancelDrag");
if (this.createEvent) {
if (this.extendOriginal) {
this.createEvent.end = this.extendOriginal;
@@ -615,15 +626,11 @@ export default {
...x,
start: window.$gz.locale.utcDateToScheduleCompatibleFormatLocalized(
x.start,
this.timeZoneName,
this.languageName,
this.hour12
this.timeZoneName
),
end: window.$gz.locale.utcDateToScheduleCompatibleFormatLocalized(
x.end,
this.timeZoneName,
this.languageName,
this.hour12
this.timeZoneName
)
};
});