diff --git a/edit-mode/function/ganttConfig.js b/edit-mode/function/ganttConfig.js index 104b12c..360e8a5 100644 --- a/edit-mode/function/ganttConfig.js +++ b/edit-mode/function/ganttConfig.js @@ -285,18 +285,18 @@ var allColumns = [ return text.planned_start; } }, - // { - // name: "early_start", label: "Early Start", align: "center", min_width: 80, editor: editor.early_start, resize: true, template: function (text) { - // let siblingId = gantt.getPrevSibling(text.id); - // if(siblingId){ - // let tempText = gantt.getTask(siblingId); - // console.log("iddd ", gantt.getTask(siblingId)); - // return moment(tempText.end_date).format('YYYY-MM-DD'); - // } - // return text.planned_start; - // } - // }, - { name: "early_start", label: "Early Start", align: "center", min_width: 80, editor: editor.early_start, resize: true }, + { + name: "early_start", label: "Early Start", align: "center", min_width: 80, editor: editor.early_start, resize: true, template: function (text) { + let siblingId = gantt.getPrevSibling(text.id); + if(siblingId){ + let tempText = gantt.getTask(siblingId); + // console.log("iddd ", gantt.getTask(siblingId)); + return moment(tempText.end_date).format('YYYY-MM-DD'); + } + return text.planned_start; + } + }, + // { name: "early_start", label: "Early Start", align: "center", min_width: 80, editor: editor.early_start, resize: true }, { name: "start_date", label: "Actual Start", align: "center", min_width: 80, editor: editor.start_date, resize: true }, { name: "planned_end", label: "Baseline Finish", align: "center", min_width: 80, editor: editor.planned_end, resize: true, template: function (text) { @@ -306,7 +306,6 @@ var allColumns = [ return text.planned_end; } }, - // { name: "early_end", label: "Early Finish", align: "center", min_width: 80, editor: editor.early_end, resize: true }, // { // name: "early_end", label: "Early Finish", align: "center", min_width: 80, editor: editor.early_end, resize: true, template: function (text) { // let start;