Browse Source

Add plan date editor

pull/1/head
Wahyu Ramadhan 1 year ago
parent
commit
8b2e792d54
  1. 16
      edit-mode/function/ganttConfig.js

16
edit-mode/function/ganttConfig.js

@ -174,6 +174,8 @@ const editor = {
kode_sortname: { type: "text", map_to: "kode_sortname" },
start_date: { type: "date", map_to: "start_date", min: new Date(2018, 0, 1) },
end_date: { type: "date", map_to: "end_date", min: new Date(2018, 0, 1) },
planned_start: { type: "date", map_to: "planned_start", min: new Date(2018, 0, 1) },
planned_end: { type: "date", map_to: "planned_end", min: new Date(2018, 0, 1) },
duration: { type: "duration", map_to: "duration", min: 0, max: 365, formatter: formatter },
cost: { type: "number", map_to: "rencana_biaya", min: 0 },
costActual: { type: "number", map_to: "biaya_actual", min: 0 },
@ -273,6 +275,18 @@ var allColumns = [
{ name: "text", label: "Activity", tree: true, min_width: 150, editor: editor.text, resize: true },
{ name: "start_date", label: "Start Date", align: "center", min_width: 80, editor: editor.start_date, resize: true },
{ name: "end_date", label: "Finish Date", align: "center", min_width: 80, editor: editor.end_date, resize: true },
{ name: "planned_start", label: "Planned Start", align: "center", min_width: 80, editor: editor.planned_start, resize: true, template: function (text) {
if (!text.planned_start) {
return text.start_date;
}
return text.planned_start;
} },
{ name: "planned_end", label: "Planned End", align: "center", min_width: 80, editor: editor.planned_end, resize: true, template: function (text) {
if (!text.planned_end) {
return text.end_date;
}
return text.planned_end;
} },
{ 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) {
if(!text.rencana_biaya){
@ -440,6 +454,8 @@ gantt.config.columns = createColumnsConfig({
text: true,
start_date: true,
end_date: true,
planned_start: true,
planned_end: true,
duration: true,
rencana_biaya: true,
cost_actual: true,

Loading…
Cancel
Save