|
|
@ -494,7 +494,18 @@ gantt.templates.task_end_date = function(date){ |
|
|
|
gantt.templates.rightside_text = function (start, end, task) { |
|
|
|
gantt.templates.rightside_text = function (start, end, task) { |
|
|
|
if (task.planned_end) { |
|
|
|
if (task.planned_end) { |
|
|
|
if (end.getTime() > task.planned_end.getTime()) { |
|
|
|
if (end.getTime() > task.planned_end.getTime()) { |
|
|
|
var overdue = Math.ceil(Math.abs((end.getTime() - task.planned_end.getTime()) / (24 * 60 * 60 * 1000))); |
|
|
|
var plannedEndDate = gantt.calculateEndDate({ |
|
|
|
|
|
|
|
start_date: task.start_date, |
|
|
|
|
|
|
|
duration: gantt.calculateDuration({ |
|
|
|
|
|
|
|
start_date: task.start_date, |
|
|
|
|
|
|
|
end_date: task.planned_end |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
var overdue = gantt.calculateDuration({ |
|
|
|
|
|
|
|
start_date: plannedEndDate, |
|
|
|
|
|
|
|
end_date: end, |
|
|
|
|
|
|
|
task: task |
|
|
|
|
|
|
|
}, 'day'); |
|
|
|
var text = "<b>Overdue: " + overdue + " days</b>"; |
|
|
|
var text = "<b>Overdue: " + overdue + " days</b>"; |
|
|
|
return text; |
|
|
|
return text; |
|
|
|
} |
|
|
|
} |
|
|
|