This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
<template v-slot:category="{ category }">
|
||||
<div @click="openUserSchedule(category.id)" class="text-center">
|
||||
<v-btn text class="text-none">{{ category.name }}</v-btn>
|
||||
{{ category.id }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -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() {
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
//DRAGGING BETWEEN CATEGORIES ISSUES IN FF
|
||||
//https://github.com/vuetifyjs/vuetify/issues/11616
|
||||
//https://github.com/vuetifyjs/vuetify/issues/14243
|
||||
|
||||
//this was supposed to fix the ff issue but it regressed
|
||||
.v-event-draggable {
|
||||
padding-left: 6px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user