From 4a07afde50a9fb75c98ff1c08f9255f41a845c12 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 7 Oct 2021 16:42:25 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 4 +++- ayanova/src/views/home-schedule.vue | 8 +++++++- ayanova/src/views/svc-schedule.vue | 24 +++++++++++++++++++++--- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 2af8f050..16f4d446 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -20,8 +20,10 @@ SVC-SCHEDULE OUTSTANDING ITEMS need ability to drag to another tech in category view + bug issue: https://github.com/vuetifyjs/vuetify/issues/11616 + works in chrome but not ff + - bugbug: mouse move day view is firing twice for in category view needs filter docs notes diff --git a/ayanova/src/views/home-schedule.vue b/ayanova/src/views/home-schedule.vue index 243c0d72..311741db 100644 --- a/ayanova/src/views/home-schedule.vue +++ b/ayanova/src/views/home-schedule.vue @@ -583,7 +583,13 @@ export default { //MODIFY existing event, drag or extend if (this.dragEvent || this.extendEvent) { - const param = { type: null, id: null, start: null, end: null }; + const param = { + type: null, + id: null, + start: null, + end: null, + userId: this.$store.state.userId //Home-schedule the user id is always the current user, this is required due to same route handling svc-schedule where userid can change + }; if (this.dragEvent) { param.type = this.dragEvent.type; diff --git a/ayanova/src/views/svc-schedule.vue b/ayanova/src/views/svc-schedule.vue index 39d27a80..a12c693d 100644 --- a/ayanova/src/views/svc-schedule.vue +++ b/ayanova/src/views/svc-schedule.vue @@ -123,6 +123,7 @@ @@ -546,7 +547,13 @@ export default { } //MODIFY existing event, drag or extend if (this.dragEvent || this.extendEvent) { - const param = { type: null, id: null, start: null, end: null }; + const param = { + type: null, + id: null, + start: null, + end: null, + userId: null + }; if (this.dragEvent) { param.type = this.dragEvent.type; @@ -559,6 +566,7 @@ export default { this.dragEvent.end, this.timeZoneName ); + param.userId = this.dragEvent.userId; } else { param.type = this.extendEvent.type; param.id = this.extendEvent.id; @@ -570,6 +578,7 @@ export default { this.extendEvent.end, this.timeZoneName ); + param.userId = this.extendEvent.userId; } try { window.$gz.form.deleteAllErrorBoxErrors(this); @@ -645,7 +654,6 @@ export default { if (!tms.category && this.viewType == "category") { return; } - console.log("mousing", tms.category); //no event being dragged or exgtended? if (!this.dragEvent && !this.extendEvent) { return; @@ -653,7 +661,6 @@ export default { const mouse = this.toTime(tms); if (this.dragEvent && this.dragTime !== null) { - console.log("dragging, category:", tms.category); //# DRAGGING PATH const start = this.dragEvent.start; const end = this.dragEvent.end; @@ -663,6 +670,12 @@ export default { const newEnd = newStart + duration; this.dragEvent.start = newStart; this.dragEvent.end = newEnd; + if (tms.category && tms.category.name != this.dragEvent.category) { + this.dragEvent.category = tms.category.name; + this.dragEvent.userId = this.categories.find( + z => z.name == tms.category.name + ).id; + } } else if (this.extendEvent && this.createStart !== null) { //# EXTENDING PATH const mouseRounded = this.roundTime(mouse, false); @@ -1162,6 +1175,11 @@ async function fetchTranslatedText() { }