Browse Source

Merge pull request 'staging' (#25) from staging into master

Reviewed-on: ordo/adw-gantt#25
pull/1/head
ibnu 1 year ago
parent
commit
69447f2b0e
  1. 2
      edit-mode/function/function.js
  2. 35
      edit-mode/function/ganttConfig.js

2
edit-mode/function/function.js

@ -717,9 +717,11 @@ function updateLinksLag(data) {
let predecessor = data.data.find(item => item.id == link.source);
if (predecessor) {
let lag = gantt.calculateDuration(new Date(predecessor.end_date), new Date(task.start_date));
if (link.type == "0") {
link.lag = lag;
}
}
}
});
});
}

35
edit-mode/function/ganttConfig.js

@ -280,24 +280,41 @@ var allColumns = [
{
name: "planned_start", label: "Baseline Start", align: "center", min_width: 80, editor: editor.planned_start, resize: true, template: function (text) {
if (!text.planned_start) {
return text.start_date;
return moment(text.start_date).format("DD-MM-YYYY");
}
return text.planned_start;
return moment(text.planned_start).format("DD-MM-YYYY");
}
},
{
name: "planned_end", label: "Baseline Finish", align: "center", min_width: 80, editor: editor.planned_end, resize: true, template: function (text) {
if (!text.planned_end) {
return text.end_date;
return moment(text.end_date).format("DD-MM-YYYY");
}
return text.planned_end;
return moment(text.planned_end).format("DD-MM-YYYY");
}
},
{ name: "start_date", label: "Early Start", align: "center", min_width: 80, editor: editor.start_date, resize: true, template: function (text) {
return moment(text.start_date).format("DD-MM-YYYY");
}
},
{ name: "end_date", label: "Early Finish", align: "center", min_width: 80, editor: editor.end_date, resize: true, template: function (text) {
return moment(text.end_date).format("DD-MM-YYYY");
}
},
{ name: "actual_start", label: "Actual Start", align: "center", min_width: 80, resize: true, template: function (text) {
if (!text.actual_start) {
return '';
}
return moment(text.actual_start).format("DD-MM-YYYY");
}
},
{ name: "actual_end", label: "Actual Finish", align: "center", min_width: 80, resize: true, template: function (text) {
if (!text.actual_end) {
return '';
}
return moment(text.actual_end).format("DD-MM-YYYY");
}
},
{ name: "start_date", label: "Early Start", align: "center", min_width: 80, editor: editor.start_date, resize: true },
{ name: "end_date", label: "Early Finish", align: "center", min_width: 80, editor: editor.end_date, 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) {
let bobot = parseFloat(text.bobot_planning);

Loading…
Cancel
Save