{{ category.name }}
+ {{ category.id }}
@@ -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() {
}