|
|
|
@ -539,10 +539,10 @@ function setUpForShowHideColumn(data) {
|
|
|
|
|
configColumn[val.column_name] = val.show |
|
|
|
|
}); |
|
|
|
|
if (!isBaselineSet) { |
|
|
|
|
configColumn.planned_start = undefined; |
|
|
|
|
configColumn.planned_end = undefined; |
|
|
|
|
configColumn.planned_duration = undefined; |
|
|
|
|
configColumn.baseline_progress = undefined; |
|
|
|
|
// configColumn.planned_start = undefined;
|
|
|
|
|
// configColumn.planned_end = undefined;
|
|
|
|
|
// configColumn.planned_duration = undefined;
|
|
|
|
|
// configColumn.baseline_progress = undefined;
|
|
|
|
|
}
|
|
|
|
|
gantt.config.columns = createColumnsConfig(configColumn); |
|
|
|
|
|
|
|
|
@ -716,8 +716,25 @@ function updateLinksLag(data) {
|
|
|
|
|
if (link.target == task.id) { |
|
|
|
|
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" && isBaselineSet) { |
|
|
|
|
let lag; |
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|