Commit 9f98ba69 authored by Frank Bergmann's avatar Frank Bergmann

- Implemented scheduling of lag times

parent 8056c3ae
......@@ -751,6 +751,23 @@ Ext.define('GanttEditor.controller.GanttSchedulingController', {
************************************************************************************** */
/**
* Returns the "time" milliseconds of a dependency lag
*/
dependencyLagTime: function(depModel) {
var me = this;
var diff = depModel.diff;
if (!diff) diff = 0.0;
var diff_factor = me.dependencyPropertyPanel.dependencyFormatFactor(depModel.diff_format_id);
var result = 1000.0 * diff * diff_factor;
if (result != 0.0) {
console.log('dependencyLagTime: lag='+result);
}
return result;
},
/**
* Check the planned units vs. assigned resources percentage.
......@@ -848,6 +865,10 @@ Ext.define('GanttEditor.controller.GanttSchedulingController', {
return;
}
// Calculage the time (milliseconds) of the lag time in the dependency
var lagTime = me.dependencyLagTime(dep);
diff = diff + lagTime;
if (diff > 0) {
// Round the diff to the next hour and check if the difference is max. 1 minute
var diffRoundedByHour = Math.round(diff / (3600.0 * 1000.0)) * (3600.0 * 1000.0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment