|
|
@ -539,10 +539,10 @@ function setUpForShowHideColumn(data) { |
|
|
|
configColumn[val.column_name] = val.show |
|
|
|
configColumn[val.column_name] = val.show |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (!isBaselineSet) { |
|
|
|
if (!isBaselineSet) { |
|
|
|
configColumn.planned_start = undefined; |
|
|
|
// configColumn.planned_start = undefined;
|
|
|
|
configColumn.planned_end = undefined; |
|
|
|
// configColumn.planned_end = undefined;
|
|
|
|
configColumn.planned_duration = undefined; |
|
|
|
// configColumn.planned_duration = undefined;
|
|
|
|
configColumn.baseline_progress = undefined; |
|
|
|
// configColumn.baseline_progress = undefined;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
gantt.config.columns = createColumnsConfig(configColumn); |
|
|
|
gantt.config.columns = createColumnsConfig(configColumn); |
|
|
|
|
|
|
|
|
|
|
@ -722,8 +722,25 @@ function updateLinksLag(data) { |
|
|
|
if (link.target == task.id) { |
|
|
|
if (link.target == task.id) { |
|
|
|
let predecessor = data.data.find(item => item.id == link.source); |
|
|
|
let predecessor = data.data.find(item => item.id == link.source); |
|
|
|
if (predecessor) { |
|
|
|
if (predecessor) { |
|
|
|
let lag = gantt.calculateDuration(new Date(predecessor.end_date), new Date(task.start_date)); |
|
|
|
let lag; |
|
|
|
if (link.type == "0" && isBaselineSet) { |
|
|
|
if (isBaselineSet) { |
|
|
|
|
|
|
|
switch (link.type) { |
|
|
|
|
|
|
|
case "0": |
|
|
|
|
|
|
|
lag = gantt.calculateDuration(new Date(predecessor.end_date), new Date(task.start_date)); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "1": |
|
|
|
|
|
|
|
lag = gantt.calculateDuration(new Date(predecessor.start_date), new Date(task.start_date)); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "2": |
|
|
|
|
|
|
|
lag = gantt.calculateDuration(new Date(predecessor.end_date), new Date(task.end_date)); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "3": |
|
|
|
|
|
|
|
lag = gantt.calculateDuration(new Date(predecessor.start_date), new Date(task.end_date)); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
// Handle an unknown link type if needed
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
link.lag = lag; |
|
|
|
link.lag = lag; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|