|
|
|
@ -23,7 +23,6 @@ gantt.attachEvent("onTaskRowClick", function(id,row){
|
|
|
|
|
gantt.ext.inlineEditors.attachEvent("onBeforeEditStart", function(state){ |
|
|
|
|
let id = parseInt(state.id) |
|
|
|
|
let ganttData = gantt.getTask(id); |
|
|
|
|
// console.log("cek ganttData", ganttData);
|
|
|
|
|
if(ganttData.type_activity && ganttData.type_activity=="header"){ |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
@ -36,13 +35,11 @@ gantt.ext.inlineEditors.attachEvent("onBeforeEditStart", function(state){
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(column=="cost_actual"){ |
|
|
|
|
// let ganttData = gantt.getTask(id);
|
|
|
|
|
let progress = ganttData.progress ? ganttData.progress : 0 |
|
|
|
|
if(progress <= 0){ |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// console.log("cek state", state);
|
|
|
|
|
return true |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -57,18 +54,12 @@ gantt.attachEvent("onBeforeTaskUpdate", function(id,new_item){
|
|
|
|
|
progress = progress*100 |
|
|
|
|
} |
|
|
|
|
progress = progress/100; |
|
|
|
|
// format cost planning
|
|
|
|
|
let costPlanning = new_item.rencana_biaya; |
|
|
|
|
costPlanning = replaceAll(costPlanning, ".", ""); |
|
|
|
|
costPlanning = replaceAll(costPlanning, ",", "."); |
|
|
|
|
new_item['rencana_biaya'] = costPlanning; |
|
|
|
|
new_item['progress'] = progress; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gantt.attachEvent("onBeforeLinkAdd", function(id,link){ |
|
|
|
|
//any custom logic here
|
|
|
|
|
// console.log("cek link", link);
|
|
|
|
|
let source = link.source; |
|
|
|
|
let target = link.target; |
|
|
|
|
let parents = gantt.getParent(source); |
|
|
|
|