|
|
@ -285,19 +285,6 @@ var allColumns = [ |
|
|
|
return text.planned_start; |
|
|
|
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: "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) { |
|
|
|
name: "planned_end", label: "Baseline Finish", align: "center", min_width: 80, editor: editor.planned_end, resize: true, template: function (text) { |
|
|
|
if (!text.planned_end) { |
|
|
|
if (!text.planned_end) { |
|
|
@ -306,24 +293,11 @@ var allColumns = [ |
|
|
|
return text.planned_end; |
|
|
|
return text.planned_end; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// {
|
|
|
|
{ name: "start_date", label: "Early Start", align: "center", min_width: 80, editor: editor.start_date, resize: true },
|
|
|
|
// name: "early_end", label: "Early Finish", align: "center", min_width: 80, editor: editor.early_end, resize: true, template: function (text) {
|
|
|
|
{ name: "end_date", label: "Early Finish", align: "center", min_width: 80, editor: editor.end_date, resize: true }, |
|
|
|
// let start;
|
|
|
|
|
|
|
|
// let end;
|
|
|
|
|
|
|
|
// text.planned_start ? start = text.planned_start : start = text.start_date;
|
|
|
|
|
|
|
|
// text.planned_end ? end = text.planned_end : end = text.end_date;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// let plannedDuration = gantt.calculateDuration({
|
|
|
|
|
|
|
|
// start_date: new Date(start),
|
|
|
|
|
|
|
|
// end_date: new Date(end)
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// return moment(text.start_date).add(plannedDuration-1, 'days').format('YYYY-MM-DD');
|
|
|
|
|
|
|
|
// // return text.planned_end;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
{ name: "early_end", label: "Early Finish", align: "center", min_width: 80, resize: true }, |
|
|
|
|
|
|
|
{ name: "end_date", label: "Actual Finish", align: "center", min_width: 80, resize: true }, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ name: "actual_start", label: "Actual Start", align: "center", min_width: 80, resize: true }, |
|
|
|
|
|
|
|
{ name: "actual_end", label: "Actual Finish", align: "center", min_width: 80, resize: true },
|
|
|
|
{ |
|
|
|
{ |
|
|
|
name: "bobot_planning", label: "Bobot (%)", align: "center", editor: editor.bobot_planning, resize: true, min_width: 115, template: function (text) { |
|
|
|
name: "bobot_planning", label: "Bobot (%)", align: "center", editor: editor.bobot_planning, resize: true, min_width: 115, template: function (text) { |
|
|
|
let bobot = parseFloat(text.bobot_planning); |
|
|
|
let bobot = parseFloat(text.bobot_planning); |
|
|
@ -380,7 +354,7 @@ var allColumns = [ |
|
|
|
}) |
|
|
|
}) |
|
|
|
return plannedDuration; |
|
|
|
return plannedDuration; |
|
|
|
}}, |
|
|
|
}}, |
|
|
|
{ name: "duration", label: "Actual Duration (Day)", align: "center", min_width: 50, resize: true, editor: editor.duration }, |
|
|
|
{ name: "duration", label: "Duration (Day)", align: "center", min_width: 50, resize: true, editor: editor.duration }, |
|
|
|
{ |
|
|
|
{ |
|
|
|
name: "rencana_biaya", label: "Cost Planning", align: "right", min_width: 100, resize: true, template: function (text) { |
|
|
|
name: "rencana_biaya", label: "Cost Planning", align: "right", min_width: 100, resize: true, template: function (text) { |
|
|
|
if (!text.rencana_biaya) { |
|
|
|
if (!text.rencana_biaya) { |
|
|
@ -548,8 +522,8 @@ let columnShows = { |
|
|
|
planned_start: false, |
|
|
|
planned_start: false, |
|
|
|
planned_end: false, |
|
|
|
planned_end: false, |
|
|
|
planned_duration: false, |
|
|
|
planned_duration: false, |
|
|
|
early_start: false, |
|
|
|
actual_start: false, |
|
|
|
early_end: false, |
|
|
|
actual_end: false, |
|
|
|
duration: true, |
|
|
|
duration: true, |
|
|
|
rencana_biaya: true, |
|
|
|
rencana_biaya: true, |
|
|
|
cost_actual: true, |
|
|
|
cost_actual: true, |
|
|
@ -576,8 +550,8 @@ gantt.config.columns = createColumnsConfig({ |
|
|
|
planned_start: true, |
|
|
|
planned_start: true, |
|
|
|
planned_end: true, |
|
|
|
planned_end: true, |
|
|
|
planned_duration: true, |
|
|
|
planned_duration: true, |
|
|
|
early_start: true, |
|
|
|
actual_start: true, |
|
|
|
early_end: true, |
|
|
|
actual_end: true, |
|
|
|
duration: true, |
|
|
|
duration: true, |
|
|
|
rencana_biaya: true, |
|
|
|
rencana_biaya: true, |
|
|
|
cost_actual: true, |
|
|
|
cost_actual: true, |
|
|
|