Browse Source

Fix baseline progress

pull/1/head
Wahyu Ramadhan 1 year ago
parent
commit
6ee809c58e
  1. 7
      edit-mode/function/ganttConfig.js

7
edit-mode/function/ganttConfig.js

@ -304,8 +304,8 @@ var allColumns = [
{
name: "baseline_progress", label: "Baseline Progress (%)", align: "center", editor: baselineProgressEditor, min_width: 125, template: function (text) {
let today = new Date();
let start = new Date(text.planned_start) || new Date(text.start_date);
let end = new Date(text.planned_end) || new Date(text.end_date);
let start = text.planned_start ? new Date(text.planned_start) : new Date(text.start_date);
let end = text.planned_end ? new Date(text.planned_end) : new Date(text.end_date);
let todayDuration = gantt.calculateDuration({
start_date: start,
end_date: today
@ -318,6 +318,9 @@ var allColumns = [
todayDuration = 0;
}
progress = todayDuration/endDuration * 100
if (progress > 100) {
progress = 100;
}
return roundToTwo(progress);
}, resize: true
},

Loading…
Cancel
Save