|
onTreeDragStop(event) {
let treeElement = closest(event.target, ".e-treeview");
if (!treeElement) {
event.cancel = true;
let scheduleElement = closest(event.target, ".e-content-wrap");
if (scheduleElement) {
let treeviewData = this.treeObj.fields.dataSource;
if (event.target.classList.contains("e-work-cells")) {
const filteredData = treeviewData.filter(item => item.Id === parseInt(event.draggedNodeData.id, 10));
let cellData = this.scheduleObj.getCellDetails(event.target);
let resourceDetails = this.scheduleObj.getResourcesByIndex(cellData.groupIndex);
// In the below data we have added the custom value when adding this data through openEditor method the editor window doesn't contain the input field for the custom value. So, this value is not added to the Schedule data. To add this data you need to add the input field for this custom value inside the editor window
let eventData = {
title: filteredData[0].Name,
startTime: cellData.startTime,
endTime: cellData.endTime,
courseId: resourceDetails.resourceData.Id,
custom: "Custom"
};
this.scheduleObj.openEditor(eventData, "Add", true);
}
}
}
} |