@syncfusion/ej2-gantt 21.2.8 → 21.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/dist/ej2-gantt.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +149 -54
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +144 -49
- package/dist/es6/ej2-gantt.es5.js.map +1 -1
- package/dist/global/ej2-gantt.min.js +2 -2
- package/dist/global/ej2-gantt.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +18 -18
- package/src/gantt/actions/dependency.js +9 -0
- package/src/gantt/actions/edit.d.ts +1 -0
- package/src/gantt/actions/edit.js +14 -3
- package/src/gantt/base/date-processor.js +9 -1
- package/src/gantt/base/gantt-chart.js +13 -2
- package/src/gantt/base/task-processor.js +51 -20
- package/src/gantt/base/tree-grid.js +2 -2
- package/src/gantt/export/export-helper.js +3 -0
- package/src/gantt/renderer/chart-rows.d.ts +1 -0
- package/src/gantt/renderer/chart-rows.js +39 -19
- package/src/gantt/renderer/timeline.js +4 -2
|
@@ -1557,7 +1557,15 @@ class DateProcessor {
|
|
|
1557
1557
|
const segment = segments[i];
|
|
1558
1558
|
const sDate = segment.startDate;
|
|
1559
1559
|
const eDate = segment.endDate;
|
|
1560
|
-
|
|
1560
|
+
if (this.parent.timelineModule.bottomTier === "Hour") {
|
|
1561
|
+
duration += Math.ceil(this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60));
|
|
1562
|
+
}
|
|
1563
|
+
else if (this.parent.timelineModule.bottomTier === "Minutes") {
|
|
1564
|
+
duration += Math.ceil(this.getTimeDifference(sDate, eDate) / (1000 * 60));
|
|
1565
|
+
}
|
|
1566
|
+
else {
|
|
1567
|
+
duration += Math.ceil(this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * 24));
|
|
1568
|
+
}
|
|
1561
1569
|
}
|
|
1562
1570
|
return duration;
|
|
1563
1571
|
}
|
|
@@ -2039,29 +2047,53 @@ class TaskProcessor extends DateProcessor {
|
|
|
2039
2047
|
startDate = this.checkStartDate(startDate, data.ganttProperties, false);
|
|
2040
2048
|
if (!isNullOrUndefined(duration)) {
|
|
2041
2049
|
endDate = this.getEndDate(startDate, duration, data.ganttProperties.durationUnit, data.ganttProperties, false);
|
|
2050
|
+
if (taskSettings.duration) {
|
|
2051
|
+
remainingDuration = data.ganttProperties.duration - sumOfDuration;
|
|
2052
|
+
if (remainingDuration <= 0) {
|
|
2053
|
+
continue;
|
|
2054
|
+
}
|
|
2055
|
+
duration = i === segments.length - 1 ? remainingDuration : remainingDuration > 0 &&
|
|
2056
|
+
duration > remainingDuration ? remainingDuration : duration;
|
|
2057
|
+
endDate = this.getEndDate(startDate, duration, data.ganttProperties.durationUnit, data.ganttProperties, false);
|
|
2058
|
+
}
|
|
2059
|
+
else if (!taskSettings.duration && taskSettings.endDate) {
|
|
2060
|
+
endDate = (!isNullOrUndefined(data.ganttProperties.endDate)) && endDate.getTime() >
|
|
2061
|
+
data.ganttProperties.endDate.getTime() && i !== segments.length - 1 ? endDate : data.ganttProperties.endDate;
|
|
2062
|
+
duration = this.getDuration(startDate, endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
|
|
2063
|
+
if (ganttSegments.length > 0 && endDate.getTime() < startDate.getTime()
|
|
2064
|
+
&& endDate.getTime() <= data.ganttProperties.endDate.getTime()) {
|
|
2065
|
+
ganttSegments[i - 1].duration = this.getDuration(ganttSegments[i - 1].startDate, data.ganttProperties.endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
|
|
2066
|
+
continue;
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2042
2069
|
}
|
|
2043
2070
|
else {
|
|
2044
2071
|
endDate = this.getDateFromFormat(endDate);
|
|
2072
|
+
if (endDate && (isNullOrUndefined(duration) || String(duration) === '')) {
|
|
2073
|
+
if (endDate.getHours() === 0 && this.parent.defaultEndTime !== 86400) {
|
|
2074
|
+
this.setTime(this.parent.defaultEndTime, endDate);
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2045
2077
|
endDate = this.checkEndDate(endDate, data.ganttProperties, false);
|
|
2046
2078
|
duration = this.getDuration(startDate, endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2079
|
+
if (taskSettings.duration) {
|
|
2080
|
+
remainingDuration = data.ganttProperties.duration - sumOfDuration - 1;
|
|
2081
|
+
if (remainingDuration <= 0) {
|
|
2082
|
+
continue;
|
|
2083
|
+
}
|
|
2084
|
+
duration = i === segments.length - 1 ? remainingDuration : remainingDuration > 0 &&
|
|
2085
|
+
duration > remainingDuration ? remainingDuration : duration;
|
|
2086
|
+
endDate = this.getEndDate(startDate, duration, data.ganttProperties.durationUnit, data.ganttProperties, false);
|
|
2052
2087
|
}
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
&& endDate.getTime() <= data.ganttProperties.endDate.getTime()) {
|
|
2063
|
-
ganttSegments[i - 1].duration = this.getDuration(ganttSegments[i - 1].startDate, data.ganttProperties.endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
|
|
2064
|
-
continue;
|
|
2088
|
+
else if (!taskSettings.duration && taskSettings.endDate) {
|
|
2089
|
+
endDate = (!isNullOrUndefined(data.ganttProperties.endDate)) && endDate.getTime() >
|
|
2090
|
+
data.ganttProperties.endDate.getTime() && i !== segments.length - 1 ? endDate : data.ganttProperties.endDate;
|
|
2091
|
+
duration = this.getDuration(startDate, endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
|
|
2092
|
+
if (ganttSegments.length > 0 && endDate.getTime() < startDate.getTime()
|
|
2093
|
+
&& endDate.getTime() <= data.ganttProperties.endDate.getTime()) {
|
|
2094
|
+
ganttSegments[i - 1].duration = this.getDuration(ganttSegments[i - 1].startDate, data.ganttProperties.endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
|
|
2095
|
+
continue;
|
|
2096
|
+
}
|
|
2065
2097
|
}
|
|
2066
2098
|
}
|
|
2067
2099
|
segment = {};
|
|
@@ -2924,7 +2956,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
2924
2956
|
const data = [];
|
|
2925
2957
|
for (let k = 0; k < preTaskResources.length; k++) {
|
|
2926
2958
|
resourceData.filter((resourceInfo) => {
|
|
2927
|
-
if (resourceInfo[resourceSettings.id] === preTaskResources[k][resourceSettings.id]) {
|
|
2959
|
+
if (resourceInfo[resourceSettings.id] === preTaskResources[k][resourceSettings.id] && data.indexOf(preTaskResources[k]) === -1) {
|
|
2928
2960
|
data.push(preTaskResources[k]);
|
|
2929
2961
|
}
|
|
2930
2962
|
});
|
|
@@ -3202,7 +3234,9 @@ class TaskProcessor extends DateProcessor {
|
|
|
3202
3234
|
if (resourceUnit !== 100) {
|
|
3203
3235
|
resName += '[' + resourceUnit + '%' + ']';
|
|
3204
3236
|
}
|
|
3205
|
-
|
|
3237
|
+
if (!isNullOrUndefined(resName)) {
|
|
3238
|
+
resourceName.push(resName);
|
|
3239
|
+
}
|
|
3206
3240
|
if (data.taskData) {
|
|
3207
3241
|
const mapping = taskMapping.resourceInfo;
|
|
3208
3242
|
// eslint-disable-next-line
|
|
@@ -3703,7 +3737,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
3703
3737
|
if (!isNullOrUndefined(ganttRecord.segments) && ganttRecord.segments.length > 0) {
|
|
3704
3738
|
const segments = ganttRecord.segments;
|
|
3705
3739
|
let fixedWidth = true;
|
|
3706
|
-
const totalTaskWidth = this.splitTasksDuration(segments) * this.parent.perDayWidth;
|
|
3740
|
+
const totalTaskWidth = this.splitTasksDuration(segments) * ((this.parent.timelineModule.bottomTier === "Hour" || this.parent.timelineModule.bottomTier === "Minutes") ? this.parent.timelineSettings.timelineUnitSize : this.parent.perDayWidth);
|
|
3707
3741
|
let totalProgressWidth = this.parent.dataOperation.getProgressWidth(totalTaskWidth, ganttRecord.progress);
|
|
3708
3742
|
for (let i = 0; i < segments.length; i++) {
|
|
3709
3743
|
const segment = segments[i];
|
|
@@ -3751,6 +3785,8 @@ class TaskProcessor extends DateProcessor {
|
|
|
3751
3785
|
const ganttRecord = data.ganttProperties;
|
|
3752
3786
|
this.parent.setRecordValue('autoWidth', this.calculateWidth(data, true), ganttRecord, true);
|
|
3753
3787
|
this.parent.setRecordValue('autoLeft', this.calculateLeft(ganttRecord, true), ganttRecord, true);
|
|
3788
|
+
this.parent.setRecordValue('progressWidth', this.parent.dataOperation.getProgressWidth((ganttRecord.isAutoSchedule ||
|
|
3789
|
+
!data.hasChildRecords ? ganttRecord.width : ganttRecord.autoWidth), ganttRecord.progress), ganttRecord, true);
|
|
3754
3790
|
}
|
|
3755
3791
|
/**
|
|
3756
3792
|
* To calculate parent progress value
|
|
@@ -3886,6 +3922,9 @@ class TaskProcessor extends DateProcessor {
|
|
|
3886
3922
|
}
|
|
3887
3923
|
}
|
|
3888
3924
|
this.parent.setRecordValue('isMilestone', milestone, parentProp, true);
|
|
3925
|
+
if (!isNullOrUndefined(this.parent.taskFields.milestone)) {
|
|
3926
|
+
this.updateMappingData(parentData, 'milestone');
|
|
3927
|
+
}
|
|
3889
3928
|
if (parentProp.isAutoSchedule) {
|
|
3890
3929
|
this.calculateDuration(parentData);
|
|
3891
3930
|
}
|
|
@@ -5305,7 +5344,13 @@ class GanttChart {
|
|
|
5305
5344
|
* @private
|
|
5306
5345
|
*/
|
|
5307
5346
|
getRecordByTaskBar(target) {
|
|
5308
|
-
|
|
5347
|
+
let item;
|
|
5348
|
+
if (this.parent.enableVirtualization && this.parent.enableMultiTaskbar) {
|
|
5349
|
+
item = this.parent.flatData[this.getIndexByTaskBar(target)];
|
|
5350
|
+
}
|
|
5351
|
+
else {
|
|
5352
|
+
item = this.parent.currentViewData[this.getIndexByTaskBar(target)];
|
|
5353
|
+
}
|
|
5309
5354
|
return item;
|
|
5310
5355
|
}
|
|
5311
5356
|
/**
|
|
@@ -5663,7 +5708,12 @@ class GanttChart {
|
|
|
5663
5708
|
else {
|
|
5664
5709
|
const id = row.getAttribute('rowUniqueId');
|
|
5665
5710
|
const record = this.parent.getRecordByID(id);
|
|
5666
|
-
|
|
5711
|
+
if (this.parent.enableVirtualization && this.parent.enableMultiTaskbar) {
|
|
5712
|
+
recordIndex = this.parent.flatData.indexOf(record);
|
|
5713
|
+
}
|
|
5714
|
+
else {
|
|
5715
|
+
recordIndex = this.parent.currentViewData.indexOf(record);
|
|
5716
|
+
}
|
|
5667
5717
|
}
|
|
5668
5718
|
return recordIndex;
|
|
5669
5719
|
}
|
|
@@ -7067,9 +7117,11 @@ class Timeline {
|
|
|
7067
7117
|
const validStartLeft = this.parent.dataOperation.getTaskLeft(validStartDate, false);
|
|
7068
7118
|
const validEndLeft = this.parent.dataOperation.getTaskLeft(validEndDate, false);
|
|
7069
7119
|
let isChanged;
|
|
7120
|
+
let taskbarModule = this.parent.editModule.taskbarEditModule;
|
|
7070
7121
|
if (!isNullOrUndefined(maxStartLeft) && ((minStartDate < this.timelineStartDate) ||
|
|
7071
|
-
(!isNullOrUndefined(
|
|
7072
|
-
|
|
7122
|
+
(!isNullOrUndefined(taskbarModule)) && (!isNullOrUndefined(taskbarModule.taskBarEditAction)
|
|
7123
|
+
&& taskbarModule.taskBarEditAction !== 'ProgressResizing' &&
|
|
7124
|
+
taskbarModule.taskBarEditAction !== 'RightResizing')) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
|
|
7073
7125
|
isChanged = 'prevTimeSpan';
|
|
7074
7126
|
minStartDate = minStartDate > this.timelineStartDate ? this.timelineStartDate : minStartDate;
|
|
7075
7127
|
}
|
|
@@ -7663,7 +7715,7 @@ class GanttTreeGrid {
|
|
|
7663
7715
|
this.parent.columnByField = {};
|
|
7664
7716
|
this.parent.customColumns = [];
|
|
7665
7717
|
const tasksMapping = ['id', 'name', 'startDate', 'endDate', 'duration', 'dependency',
|
|
7666
|
-
'progress', 'baselineStartDate', 'baselineEndDate', 'resourceInfo', 'notes', 'work', 'manual', 'type'];
|
|
7718
|
+
'progress', 'baselineStartDate', 'baselineEndDate', 'resourceInfo', 'notes', 'work', 'manual', 'type', 'milestone'];
|
|
7667
7719
|
for (let i = 0; i < length; i++) {
|
|
7668
7720
|
let column = {};
|
|
7669
7721
|
if (typeof ganttObj.columns[i] === 'string') {
|
|
@@ -8005,7 +8057,7 @@ class GanttTreeGrid {
|
|
|
8005
8057
|
}
|
|
8006
8058
|
} // eslint-disable-next-line
|
|
8007
8059
|
durationValueAccessor(field, data, column) {
|
|
8008
|
-
const ganttProp = data.ganttProperties;
|
|
8060
|
+
const ganttProp = (!isNullOrUndefined(data)) ? data.ganttProperties : null;
|
|
8009
8061
|
if (!isNullOrUndefined(ganttProp)) {
|
|
8010
8062
|
return this.parent.dataOperation.getDurationString(ganttProp.duration, ganttProp.durationUnit);
|
|
8011
8063
|
}
|
|
@@ -8784,7 +8836,7 @@ class ChartRows extends DateProcessor {
|
|
|
8784
8836
|
(isNullOrUndefined(data.ganttProperties.segments) || (!isNullOrUndefined(data.ganttProperties.segments) &&
|
|
8785
8837
|
data.ganttProperties.segments.length === 0))) {
|
|
8786
8838
|
if (template !== '' && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
|
|
8787
|
-
|
|
8839
|
+
const templateElement = this.createDivElement(template)[0];
|
|
8788
8840
|
if (this.parent.disableHtmlEncode) {
|
|
8789
8841
|
templateElement.innerText = labelString;
|
|
8790
8842
|
}
|
|
@@ -8799,7 +8851,7 @@ class ChartRows extends DateProcessor {
|
|
|
8799
8851
|
!this.isTemplate(childLabel) &&
|
|
8800
8852
|
progressDiv[0].querySelectorAll('.e-task-label')[0].children[0])
|
|
8801
8853
|
progressDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
|
|
8802
|
-
if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent
|
|
8854
|
+
if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent === '' &&
|
|
8803
8855
|
childLabel && !childLabel['elementRef'] && tempDiv.innerHTML !== '')
|
|
8804
8856
|
progressDiv[0].querySelectorAll('.e-task-label')[0].textContent = childLabel;
|
|
8805
8857
|
}
|
|
@@ -9470,7 +9522,7 @@ class ChartRows extends DateProcessor {
|
|
|
9470
9522
|
!this.isTemplate(parentLabel) &&
|
|
9471
9523
|
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0])
|
|
9472
9524
|
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
|
|
9473
|
-
if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent
|
|
9525
|
+
if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent === '' &&
|
|
9474
9526
|
parentLabel && !parentLabel['elementRef'] && div.innerHTML !== '')
|
|
9475
9527
|
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent = parentLabel;
|
|
9476
9528
|
}
|
|
@@ -9500,11 +9552,19 @@ class ChartRows extends DateProcessor {
|
|
|
9500
9552
|
* @returns {NodeList} .
|
|
9501
9553
|
* @private
|
|
9502
9554
|
*/
|
|
9503
|
-
getTableTrNode() {
|
|
9555
|
+
getTableTrNode(i) {
|
|
9504
9556
|
const table = createElement('table');
|
|
9505
9557
|
const className = (this.parent.gridLines === 'Horizontal' || this.parent.gridLines === 'Both') ?
|
|
9506
9558
|
'e-chart-row-border' : '';
|
|
9507
|
-
|
|
9559
|
+
const rows = this.parent.treeGrid.grid.contentModule.getRows()[i];
|
|
9560
|
+
let activecls;
|
|
9561
|
+
if (rows && rows.isSelected) {
|
|
9562
|
+
activecls = 'e-active';
|
|
9563
|
+
}
|
|
9564
|
+
else {
|
|
9565
|
+
activecls = '';
|
|
9566
|
+
}
|
|
9567
|
+
table.innerHTML = '<tr class="' + this.getRowClassName(this.templateData) + ' ' + chartRow + ' ' + (activecls) + '"' +
|
|
9508
9568
|
'style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
|
|
9509
9569
|
this.parent.rowHeight + 'px;">' +
|
|
9510
9570
|
'<td class="' + chartRowCell + ' ' + className
|
|
@@ -9614,7 +9674,7 @@ class ChartRows extends DateProcessor {
|
|
|
9614
9674
|
return this.createDivElement(template);
|
|
9615
9675
|
}
|
|
9616
9676
|
childTaskbarProgressResizer() {
|
|
9617
|
-
|
|
9677
|
+
const width = this.parent.enableRtl ? (this.templateData.ganttProperties.progressWidth + 8) : (this.templateData.ganttProperties.progressWidth - 6);
|
|
9618
9678
|
const template = '<div class="' + childProgressResizer + '"' +
|
|
9619
9679
|
'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + width + 'px;margin-top:' +
|
|
9620
9680
|
(this.taskBarHeight - 4) + 'px;"><div class="' + progressBarHandler + '"' +
|
|
@@ -9941,7 +10001,7 @@ class ChartRows extends DateProcessor {
|
|
|
9941
10001
|
this.parent.renderTemplates();
|
|
9942
10002
|
this.triggerQueryTaskbarInfo();
|
|
9943
10003
|
this.parent.modifiedRecords = [];
|
|
9944
|
-
if (this.parent.viewType
|
|
10004
|
+
if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation) {
|
|
9945
10005
|
this.updateOverlapped();
|
|
9946
10006
|
}
|
|
9947
10007
|
if (collapsedResourceRecord.length) {
|
|
@@ -9965,7 +10025,7 @@ class ChartRows extends DateProcessor {
|
|
|
9965
10025
|
getGanttChartRow(i, tempTemplateData) {
|
|
9966
10026
|
this.templateData = tempTemplateData;
|
|
9967
10027
|
let taskBaselineTemplateNode = null;
|
|
9968
|
-
const parentTrNode = this.getTableTrNode();
|
|
10028
|
+
const parentTrNode = this.getTableTrNode(i);
|
|
9969
10029
|
const leftLabelNode = this.getLeftLabelNode(i);
|
|
9970
10030
|
const taskbarContainerNode = this.taskbarContainer();
|
|
9971
10031
|
taskbarContainerNode[0].setAttribute('aria-label', this.generateAriaLabel(this.templateData));
|
|
@@ -10405,8 +10465,8 @@ class ChartRows extends DateProcessor {
|
|
|
10405
10465
|
}
|
|
10406
10466
|
// To update the row height when allow overallocation set to false
|
|
10407
10467
|
updateDragDropRecords(data, tr) {
|
|
10408
|
-
|
|
10409
|
-
|
|
10468
|
+
const childRecords = data.childRecords;
|
|
10469
|
+
const rowIndex = this.parent.currentViewData.indexOf(data);
|
|
10410
10470
|
let treeGridContentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
10411
10471
|
this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
10412
10472
|
if (!tr) {
|
|
@@ -10516,6 +10576,19 @@ class ChartRows extends DateProcessor {
|
|
|
10516
10576
|
}
|
|
10517
10577
|
}
|
|
10518
10578
|
}
|
|
10579
|
+
updateResourceTaskbarElement(tRow, parentTr) {
|
|
10580
|
+
const cloneElement = tRow.querySelector('.e-taskbar-main-container');
|
|
10581
|
+
addClass([cloneElement], 'collpse-parent-border');
|
|
10582
|
+
const id = tRow.querySelector('.' + taskBarMainContainer).getAttribute('rowUniqueId');
|
|
10583
|
+
const ganttData = this.parent.getRecordByID(id);
|
|
10584
|
+
let zIndex = "";
|
|
10585
|
+
if (ganttData && !isNullOrUndefined(ganttData.ganttProperties.eOverlapIndex)) {
|
|
10586
|
+
zIndex = (ganttData.ganttProperties.eOverlapIndex).toString();
|
|
10587
|
+
}
|
|
10588
|
+
const cloneChildElement = cloneElement.cloneNode(true);
|
|
10589
|
+
cloneChildElement.style.zIndex = zIndex;
|
|
10590
|
+
parentTr[0].childNodes[0].childNodes[0].childNodes[0].appendChild(cloneChildElement);
|
|
10591
|
+
}
|
|
10519
10592
|
getResourceParent(record) {
|
|
10520
10593
|
const chartRows = this.parent.ganttChartModule.getChartRows();
|
|
10521
10594
|
//Below code is for rendering taskbartemplate in resource view with multi taskbar
|
|
@@ -10539,20 +10612,19 @@ class ChartRows extends DateProcessor {
|
|
|
10539
10612
|
parentTrNode[0].childNodes[0].childNodes[0].appendChild(collapseParent);
|
|
10540
10613
|
const tasks = this.parent.dataOperation.setSortedChildTasks(record);
|
|
10541
10614
|
this.parent.dataOperation.updateOverlappingIndex(tasks);
|
|
10542
|
-
|
|
10543
|
-
|
|
10544
|
-
|
|
10545
|
-
|
|
10546
|
-
|
|
10547
|
-
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
|
|
10615
|
+
let tRow;
|
|
10616
|
+
if (this.parent.enableVirtualization) {
|
|
10617
|
+
for (let i = 0; i < record.childRecords.length; i++) {
|
|
10618
|
+
tRow = this.getGanttChartRow(record.childRecords[i].index, this.parent.flatData[record.childRecords[i].index]);
|
|
10619
|
+
this.updateResourceTaskbarElement(tRow, parentTrNode);
|
|
10620
|
+
}
|
|
10621
|
+
}
|
|
10622
|
+
else {
|
|
10623
|
+
for (let i = 0; i < chartRows.length; i++) {
|
|
10624
|
+
if (chartRows[i].classList.contains('gridrowtaskId'
|
|
10625
|
+
+ record.ganttProperties.rowUniqueID + 'level' + (record.level + 1))) {
|
|
10626
|
+
this.updateResourceTaskbarElement(chartRows[i], parentTrNode);
|
|
10552
10627
|
}
|
|
10553
|
-
const cloneChildElement = cloneElement.cloneNode(true);
|
|
10554
|
-
cloneChildElement.style.zIndex = zIndex;
|
|
10555
|
-
parentTrNode[0].childNodes[0].childNodes[0].childNodes[0].appendChild(cloneChildElement);
|
|
10556
10628
|
}
|
|
10557
10629
|
}
|
|
10558
10630
|
parentTrNode[0].childNodes[0].childNodes[0].appendChild([].slice.call(leftLabelNode)[0]);
|
|
@@ -11059,6 +11131,15 @@ class Dependency {
|
|
|
11059
11131
|
for (let count = 0; count < totLength; count++) {
|
|
11060
11132
|
if (flatData[count].ganttProperties.predecessorsName) {
|
|
11061
11133
|
this.validatePredecessorDates(flatData[count]);
|
|
11134
|
+
let predecessorCollection = flatData[count].ganttProperties.predecessor;
|
|
11135
|
+
if (predecessorCollection && predecessorCollection.length > 1) {
|
|
11136
|
+
for (let i = 0; i < predecessorCollection.length; i++) {
|
|
11137
|
+
const validateRecord = this.parent.getRecordByID(predecessorCollection[i].to);
|
|
11138
|
+
if (validateRecord) {
|
|
11139
|
+
this.validatePredecessorDates(validateRecord);
|
|
11140
|
+
}
|
|
11141
|
+
}
|
|
11142
|
+
}
|
|
11062
11143
|
if (flatData[count].hasChildRecords && this.parent.editModule && !this.parent.allowUnscheduledTasks
|
|
11063
11144
|
&& this.parent.allowParentDependency) {
|
|
11064
11145
|
this.parent.editModule['updateChildItems'](flatData[count]);
|
|
@@ -23471,6 +23552,7 @@ class Edit$2 {
|
|
|
23471
23552
|
this.isFromDeleteMethod = false;
|
|
23472
23553
|
this.targetedRecords = [];
|
|
23473
23554
|
this.isNewRecordAdded = false;
|
|
23555
|
+
this.isValidatedEditedRecord = false;
|
|
23474
23556
|
/** @hidden */
|
|
23475
23557
|
this.updateParentRecords = [];
|
|
23476
23558
|
/** @hidden */
|
|
@@ -24123,8 +24205,9 @@ class Edit$2 {
|
|
|
24123
24205
|
(isNullOrUndefined(taskData.startDate) && !isNullOrUndefined(prevStart)) ||
|
|
24124
24206
|
(isNullOrUndefined(taskData.endDate) && !isNullOrUndefined(prevEnd)) ||
|
|
24125
24207
|
(prevStart && prevStart.getTime() !== taskData.startDate.getTime())
|
|
24126
|
-
|
|
24127
|
-
|| (!isNullOrUndefined(prevDuration) && prevDuration !== taskData.duration
|
|
24208
|
+
|| (prevEnd && prevEnd.getTime() !== taskData.endDate.getTime())
|
|
24209
|
+
|| (!isNullOrUndefined(prevDuration) && prevDuration !== taskData.duration)
|
|
24210
|
+
|| (!isNullOrUndefined(prevDuration) && prevDuration === taskData.duration &&
|
|
24128
24211
|
prevDurationUnit !== taskData.durationUnit)) {
|
|
24129
24212
|
isMoved = true;
|
|
24130
24213
|
}
|
|
@@ -24237,6 +24320,11 @@ class Edit$2 {
|
|
|
24237
24320
|
this.parent.connectorLineEditModule.openValidationDialog(validateObject);
|
|
24238
24321
|
}
|
|
24239
24322
|
else {
|
|
24323
|
+
if (this.parent.editModule && this.parent.editModule.dialogModule &&
|
|
24324
|
+
this.parent.editModule.dialogModule['isEdit'] && this.predecessorUpdated) {
|
|
24325
|
+
this.isValidatedEditedRecord = true;
|
|
24326
|
+
this.parent.predecessorModule.validatePredecessor(args.data, [], '');
|
|
24327
|
+
}
|
|
24240
24328
|
this.parent.connectorLineEditModule.applyPredecessorOption();
|
|
24241
24329
|
}
|
|
24242
24330
|
}
|
|
@@ -24300,7 +24388,10 @@ class Edit$2 {
|
|
|
24300
24388
|
if (this.taskbarMoved) {
|
|
24301
24389
|
this.parent.editedTaskBarItem = ganttRecord;
|
|
24302
24390
|
}
|
|
24303
|
-
this.
|
|
24391
|
+
if (!this.isValidatedEditedRecord) {
|
|
24392
|
+
this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
|
|
24393
|
+
}
|
|
24394
|
+
this.isValidatedEditedRecord = false;
|
|
24304
24395
|
this.parent.predecessorModule.isValidatedParentTaskID = '';
|
|
24305
24396
|
}
|
|
24306
24397
|
if (this.parent.allowParentDependency && ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
@@ -26175,6 +26266,7 @@ class Edit$2 {
|
|
|
26175
26266
|
this.parent.treeGrid.parentData = [];
|
|
26176
26267
|
this.parent.addDeleteRecord = true;
|
|
26177
26268
|
this.parent.selectedRowIndex = 0;
|
|
26269
|
+
this.parent.treeGrid['isAddedFromGantt'] = true;
|
|
26178
26270
|
this.parent.treeGrid.refresh();
|
|
26179
26271
|
if (this.parent.enableImmutableMode) {
|
|
26180
26272
|
this.parent.modifiedRecords = args.modifiedRecords;
|
|
@@ -34327,7 +34419,10 @@ class ExportHelper {
|
|
|
34327
34419
|
const footerBrush = new PdfSolidBrush(this.ganttStyle.footer.backgroundColor);
|
|
34328
34420
|
footer.graphics.drawRectangle(pen, footerBrush, 0, 0, pdfDoc.pageSettings.width, 35);
|
|
34329
34421
|
/* eslint-disable-next-line */
|
|
34330
|
-
|
|
34422
|
+
let font = new PdfStandardFont(this.ganttStyle.fontFamily, this.ganttStyle.footer.fontSize, this.ganttStyle.footer.fontStyle);
|
|
34423
|
+
if (this.ganttStyle.font) {
|
|
34424
|
+
font = this.ganttStyle.font;
|
|
34425
|
+
}
|
|
34331
34426
|
const brush = new PdfSolidBrush(this.ganttStyle.footer.fontColor);
|
|
34332
34427
|
const pageNumber = new PdfPageNumberField(font);
|
|
34333
34428
|
const count = new PdfPageCountField(font, brush);
|