This commit is contained in:
@@ -270,6 +270,7 @@ SETTINGS:
|
|||||||
drag/extend needs to actually update the work order
|
drag/extend needs to actually update the work order
|
||||||
drag/extend should not affect locked workorders!!
|
drag/extend should not affect locked workorders!!
|
||||||
Add canModify or something to event data so no need to even start the op if it can't be done
|
Add canModify or something to event data so no need to even start the op if it can't be done
|
||||||
|
Extension handle hard to see sb colored same as title text to contrast or have dark and light lines both maybe??
|
||||||
|
|
||||||
|
|
||||||
Test: overlapping sched items that start or end outside of view
|
Test: overlapping sched items that start or end outside of view
|
||||||
@@ -321,7 +322,7 @@ export default {
|
|||||||
evInfo: {},
|
evInfo: {},
|
||||||
dragEvent: null,
|
dragEvent: null,
|
||||||
dragStart: null,
|
dragStart: null,
|
||||||
createEvent: null,
|
extendEvent: null,
|
||||||
createStart: null,
|
createStart: null,
|
||||||
extendOriginal: null,
|
extendOriginal: null,
|
||||||
dragged: false,
|
dragged: false,
|
||||||
@@ -373,55 +374,58 @@ export default {
|
|||||||
}, 100); // Minimal delay to be regarded as extend instead of click
|
}, 100); // Minimal delay to be regarded as extend instead of click
|
||||||
|
|
||||||
//this.dragEvent = event;
|
//this.dragEvent = event;
|
||||||
this.createEvent = event;
|
this.extendEvent = event;
|
||||||
this.createStart = event.start;
|
this.createStart = event.start;
|
||||||
this.extendOriginal = event.end;
|
this.extendOriginal = event.end;
|
||||||
},
|
},
|
||||||
endDragExtend() {
|
endDragExtend() {
|
||||||
//On drag then dragEvent and dragTime are set
|
//On drag then dragEvent and dragTime are set
|
||||||
//on extend then createEvent (actual event), extendOriginal and createStart are set
|
//on extend then extendEvent (actual event), extendOriginal and createStart are set
|
||||||
//on create then createStart is only value set, dragEvent is null and createEvent is null
|
//on create then createStart is only value set, dragEvent is null and extendEvent is null
|
||||||
|
|
||||||
if (this.dragEvent) {
|
if (this.dragEvent) {
|
||||||
console.log("endDragExtend: event is DRAG of existing event");
|
console.log("endDragExtend: event is DRAG of existing event", {
|
||||||
|
dragEventStart: this.dragEvent.start,
|
||||||
|
dragTime: this.dragTime
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (this.createEvent) {
|
if (this.extendEvent) {
|
||||||
console.log("endDragExtend: event is EXTEND of existing event");
|
console.log("endDragExtend: event is EXTEND of existing event");
|
||||||
}
|
}
|
||||||
if (this.createStart && !this.dragEvent && !this.createEvent) {
|
if (this.createStart && !this.dragEvent && !this.extendEvent) {
|
||||||
console.log("endDragExtend: event is CREATE for new event");
|
console.log("endDragExtend: event is CREATE for new event");
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log("endDragExtend, deets: ", {
|
// console.log("endDragExtend, deets: ", {
|
||||||
// dragEvent: this.dragEvent,
|
// dragEvent: this.dragEvent,
|
||||||
// dragTime: this.dragTime,
|
// dragTime: this.dragTime,
|
||||||
// createEvent: this.createEvent,
|
// extendEvent: this.extendEvent,
|
||||||
// createStart: this.createStart,
|
// createStart: this.createStart,
|
||||||
// extendOriginal: this.extendOriginal
|
// extendOriginal: this.extendOriginal
|
||||||
// });
|
// });
|
||||||
|
|
||||||
this.dragTime = null;
|
this.dragTime = null;
|
||||||
this.dragEvent = null;
|
this.dragEvent = null;
|
||||||
this.createEvent = null;
|
this.extendEvent = null;
|
||||||
this.createStart = null;
|
this.createStart = null;
|
||||||
this.extendOriginal = null;
|
this.extendOriginal = null;
|
||||||
},
|
},
|
||||||
cancelDrag() {
|
cancelDrag() {
|
||||||
// console.log("cancelDrag");
|
// console.log("cancelDrag");
|
||||||
if (this.createEvent) {
|
if (this.extendEvent) {
|
||||||
console.log("Cancel drag A path (cancel?)");
|
console.log("Cancel drag A path (cancel?)");
|
||||||
if (this.extendOriginal) {
|
if (this.extendOriginal) {
|
||||||
this.createEvent.end = this.extendOriginal;
|
this.extendEvent.end = this.extendOriginal;
|
||||||
} else {
|
} else {
|
||||||
console.log("Cancel drag B path (do it?)");
|
console.log("Cancel drag B path (do it?)");
|
||||||
const i = this.events.indexOf(this.createEvent);
|
const i = this.events.indexOf(this.extendEvent);
|
||||||
if (i !== -1) {
|
if (i !== -1) {
|
||||||
this.events.splice(i, 1);
|
this.events.splice(i, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.createEvent = null;
|
this.extendEvent = null;
|
||||||
this.createStart = null;
|
this.createStart = null;
|
||||||
this.dragTime = null;
|
this.dragTime = null;
|
||||||
this.dragEvent = null;
|
this.dragEvent = null;
|
||||||
@@ -454,7 +458,7 @@ export default {
|
|||||||
|
|
||||||
this.dragEvent.start = newStart;
|
this.dragEvent.start = newStart;
|
||||||
this.dragEvent.end = newEnd;
|
this.dragEvent.end = newEnd;
|
||||||
} else if (this.createEvent && this.createStart !== null) {
|
} else if (this.extendEvent && this.createStart !== null) {
|
||||||
//# EXTENDING PATH
|
//# EXTENDING PATH
|
||||||
console.log("mosueMove: EXTENDING");
|
console.log("mosueMove: EXTENDING");
|
||||||
const mouseRounded = this.roundTime(mouse, false);
|
const mouseRounded = this.roundTime(mouse, false);
|
||||||
@@ -462,8 +466,8 @@ export default {
|
|||||||
const min = Math.min(mouseRounded, this.createStart);
|
const min = Math.min(mouseRounded, this.createStart);
|
||||||
const max = Math.max(mouseRounded, this.createStart);
|
const max = Math.max(mouseRounded, this.createStart);
|
||||||
|
|
||||||
this.createEvent.start = min;
|
this.extendEvent.start = min;
|
||||||
this.createEvent.end = max;
|
this.extendEvent.end = max;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
startTime(tms) {
|
startTime(tms) {
|
||||||
@@ -484,15 +488,15 @@ export default {
|
|||||||
"startTime::STUB Create new element, popup FAB speeddial here"
|
"startTime::STUB Create new element, popup FAB speeddial here"
|
||||||
);
|
);
|
||||||
// //console.log("startTime, create start:", this.createStart);
|
// //console.log("startTime, create start:", this.createStart);
|
||||||
// this.createEvent = {
|
// this.extendEvent = {
|
||||||
// name: `Event #${this.events.length}`,
|
// name: `Event #${this.events.length}`,
|
||||||
// color: this.rndElement(this.colors),
|
// color: this.rndElement(this.colors),
|
||||||
// start: this.createStart,
|
// start: this.createStart,
|
||||||
// end: this.createStart,
|
// end: this.createStart,
|
||||||
// timed: true
|
// timed: true
|
||||||
// };
|
// };
|
||||||
// //console.log("startTime, pushing event:", this.createEvent);
|
// //console.log("startTime, pushing event:", this.extendEvent);
|
||||||
// this.events.push(this.createEvent);
|
// this.events.push(this.extendEvent);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
roundTime(time, down = true) {
|
roundTime(time, down = true) {
|
||||||
@@ -879,11 +883,11 @@ async function fetchTranslatedText(vm) {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
height: 4px;
|
height: 4px;
|
||||||
border-top: 1px solid white;
|
border-top: 1px solid gray;
|
||||||
border-bottom: 1px solid white;
|
border-bottom: 1px solid gray;
|
||||||
width: 16px;
|
width: 32px;
|
||||||
margin-left: -8px;
|
margin-left: -8px;
|
||||||
opacity: 0.8;
|
// opacity: 0.8;
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user