|
|
@ -538,7 +538,12 @@ function setUpForShowHideColumn(data) { |
|
|
|
columns.map((val, index) => { |
|
|
|
columns.map((val, index) => { |
|
|
|
configColumn[val.column_name] = val.show |
|
|
|
configColumn[val.column_name] = val.show |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
if (!isBaselineSet) { |
|
|
|
|
|
|
|
configColumn.planned_start = undefined; |
|
|
|
|
|
|
|
configColumn.planned_end = undefined; |
|
|
|
|
|
|
|
configColumn.planned_duration = undefined; |
|
|
|
|
|
|
|
configColumn.baseline_progress = undefined; |
|
|
|
|
|
|
|
}
|
|
|
|
gantt.config.columns = createColumnsConfig(configColumn); |
|
|
|
gantt.config.columns = createColumnsConfig(configColumn); |
|
|
|
|
|
|
|
|
|
|
|
gantt.render(); |
|
|
|
gantt.render(); |
|
|
@ -709,4 +714,18 @@ $(window).on('beforeunload', function(event) { |
|
|
|
function sendStorage(){ |
|
|
|
function sendStorage(){ |
|
|
|
const batchEntityData = localStorage.getItem('batchEntity'); |
|
|
|
const batchEntityData = localStorage.getItem('batchEntity'); |
|
|
|
window.parent.postMessage({ batchEntity: batchEntityData }, '*'); |
|
|
|
window.parent.postMessage({ batchEntity: batchEntityData }, '*'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function updateLinksLag(data) { |
|
|
|
|
|
|
|
data.data.forEach(task => { |
|
|
|
|
|
|
|
data.links.forEach(link => { |
|
|
|
|
|
|
|
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)); |
|
|
|
|
|
|
|
link.lag = lag; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|