@syncfusion/ej2-gantt 20.1.60 → 20.2.39
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 +35 -0
- 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 +1129 -82
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +1128 -79
- 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/actions.d.ts +1 -0
- package/src/gantt/actions/actions.js +1 -0
- package/src/gantt/actions/cell-edit.js +5 -3
- package/src/gantt/actions/connector-line-edit.js +20 -6
- package/src/gantt/actions/context-menu.js +3 -4
- package/src/gantt/actions/critical-path.d.ts +26 -0
- package/src/gantt/actions/critical-path.js +735 -0
- package/src/gantt/actions/dependency.js +3 -0
- package/src/gantt/actions/edit.js +29 -3
- package/src/gantt/actions/filter.js +1 -1
- package/src/gantt/actions/keyboard.js +2 -2
- package/src/gantt/actions/rowdragdrop.js +7 -1
- package/src/gantt/actions/selection.js +3 -0
- package/src/gantt/actions/taskbar-edit.js +5 -1
- package/src/gantt/actions/toolbar.js +20 -4
- package/src/gantt/base/css-constants.d.ts +12 -0
- package/src/gantt/base/css-constants.js +12 -0
- package/src/gantt/base/date-processor.d.ts +1 -1
- package/src/gantt/base/date-processor.js +9 -3
- package/src/gantt/base/enum.d.ts +3 -1
- package/src/gantt/base/gantt-chart.js +9 -2
- package/src/gantt/base/gantt-model.d.ts +8 -1
- package/src/gantt/base/gantt.d.ts +32 -1
- package/src/gantt/base/gantt.js +133 -5
- package/src/gantt/base/interface.d.ts +16 -0
- package/src/gantt/base/splitter.js +4 -0
- package/src/gantt/base/task-processor.js +16 -7
- package/src/gantt/base/tree-grid.js +1 -1
- package/src/gantt/export/export-helper.js +16 -3
- package/src/gantt/export/pdf-base/pdf-style/gantt-theme.js +16 -0
- package/src/gantt/renderer/chart-rows.js +16 -5
- package/src/gantt/renderer/nonworking-day.js +5 -2
- package/src/gantt/renderer/timeline.d.ts +1 -0
- package/src/gantt/renderer/timeline.js +63 -26
- package/src/global.js +1 -1
- package/styles/bootstrap-dark.css +144 -92
- package/styles/bootstrap.css +141 -89
- package/styles/bootstrap4.css +142 -90
- package/styles/bootstrap5-dark.css +146 -94
- package/styles/bootstrap5.css +146 -94
- package/styles/fabric-dark.css +143 -91
- package/styles/fabric.css +148 -96
- package/styles/fluent-dark.css +152 -100
- package/styles/fluent.css +146 -94
- package/styles/gantt/_bootstrap-dark-definition.scss +22 -16
- package/styles/gantt/_bootstrap-definition.scss +21 -15
- package/styles/gantt/_bootstrap4-definition.scss +30 -24
- package/styles/gantt/_bootstrap5-definition.scss +20 -14
- package/styles/gantt/_fabric-dark-definition.scss +22 -16
- package/styles/gantt/_fabric-definition.scss +22 -16
- package/styles/gantt/_fluent-definition.scss +19 -13
- package/styles/gantt/_fusionnew-definition.scss +212 -0
- package/styles/gantt/_highcontrast-definition.scss +22 -16
- package/styles/gantt/_highcontrast-light-definition.scss +17 -11
- package/styles/gantt/_layout.scss +131 -136
- package/styles/gantt/_material-dark-definition.scss +22 -16
- package/styles/gantt/_material-definition.scss +27 -21
- package/styles/gantt/_material3-definition.scss +213 -0
- package/styles/gantt/_tailwind-definition.scss +16 -10
- package/styles/gantt/_theme.scss +56 -1
- package/styles/gantt/bootstrap-dark.css +144 -92
- package/styles/gantt/bootstrap.css +141 -89
- package/styles/gantt/bootstrap4.css +142 -90
- package/styles/gantt/bootstrap5-dark.css +146 -94
- package/styles/gantt/bootstrap5.css +146 -94
- package/styles/gantt/fabric-dark.css +143 -91
- package/styles/gantt/fabric.css +148 -96
- package/styles/gantt/fluent-dark.css +152 -100
- package/styles/gantt/fluent.css +146 -94
- package/styles/gantt/highcontrast-light.css +140 -91
- package/styles/gantt/highcontrast.css +143 -91
- package/styles/gantt/icons/_bootstrap-dark.scss +4 -1
- package/styles/gantt/icons/_bootstrap.scss +4 -1
- package/styles/gantt/icons/_bootstrap4.scss +4 -1
- package/styles/gantt/icons/_bootstrap5.scss +4 -0
- package/styles/gantt/icons/_fabric-dark.scss +4 -0
- package/styles/gantt/icons/_fabric.scss +4 -0
- package/styles/gantt/icons/_fluent.scss +4 -0
- package/styles/gantt/icons/_fusionnew.scss +120 -0
- package/styles/gantt/icons/_highcontrast.scss +4 -0
- package/styles/gantt/icons/_material-dark.scss +4 -0
- package/styles/gantt/icons/_material.scss +4 -0
- package/styles/gantt/icons/_material3.scss +124 -0
- package/styles/gantt/icons/_tailwind-dark.scss +4 -0
- package/styles/gantt/icons/_tailwind.scss +4 -0
- package/styles/gantt/material-dark.css +147 -95
- package/styles/gantt/material.css +149 -97
- package/styles/gantt/tailwind-dark.css +154 -102
- package/styles/gantt/tailwind.css +150 -98
- package/styles/highcontrast-light.css +140 -91
- package/styles/highcontrast.css +143 -91
- package/styles/material-dark.css +147 -95
- package/styles/material.css +149 -97
- package/styles/tailwind-dark.css +154 -102
- package/styles/tailwind.css +150 -98
|
@@ -238,7 +238,7 @@ class DateProcessor {
|
|
|
238
238
|
this.setTime(this.parent.defaultStartTime, cloneStartDate);
|
|
239
239
|
}
|
|
240
240
|
else if (hour < this.parent.defaultStartTime && validateAsMilestone) {
|
|
241
|
-
this.setTime(this.parent.
|
|
241
|
+
this.setTime(this.parent.defaultStartTime, cloneStartDate);
|
|
242
242
|
}
|
|
243
243
|
else if ((hour === this.parent.defaultEndTime && (!ganttProp || !validateAsMilestone)) || hour > this.parent.defaultEndTime) {
|
|
244
244
|
cloneStartDate.setDate(cloneStartDate.getDate() + 1);
|
|
@@ -390,7 +390,7 @@ class DateProcessor {
|
|
|
390
390
|
* @returns {Date} .
|
|
391
391
|
* @private
|
|
392
392
|
*/
|
|
393
|
-
checkBaselineEndDate(date) {
|
|
393
|
+
checkBaselineEndDate(date, ganttProp) {
|
|
394
394
|
if (isNullOrUndefined(date)) {
|
|
395
395
|
return null;
|
|
396
396
|
}
|
|
@@ -400,7 +400,7 @@ class DateProcessor {
|
|
|
400
400
|
if (hour > this.parent.defaultEndTime) {
|
|
401
401
|
this.setTime(this.parent.defaultEndTime, cloneDate);
|
|
402
402
|
}
|
|
403
|
-
else if (hour <= this.parent.defaultStartTime) {
|
|
403
|
+
else if (hour <= this.parent.defaultStartTime && !ganttProp.isMilestone) {
|
|
404
404
|
cloneDate.setDate(cloneDate.getDate() - 1);
|
|
405
405
|
this.setTime(this.parent.defaultEndTime, cloneDate);
|
|
406
406
|
}
|
|
@@ -1383,6 +1383,12 @@ class DateProcessor {
|
|
|
1383
1383
|
* @private
|
|
1384
1384
|
*/
|
|
1385
1385
|
calculateProjectDates(editArgs) {
|
|
1386
|
+
if (this.parent.isLoad && this.parent.enablePersistence &&
|
|
1387
|
+
this.parent.cloneProjectStartDate && this.parent.cloneProjectEndDate) {
|
|
1388
|
+
this.parent.cloneProjectStartDate = this.getDateFromFormat(this.parent.cloneProjectStartDate);
|
|
1389
|
+
this.parent.cloneProjectEndDate = this.getDateFromFormat(this.parent.cloneProjectEndDate);
|
|
1390
|
+
return;
|
|
1391
|
+
}
|
|
1386
1392
|
const sDate = typeof this.parent.projectStartDate === 'string' ?
|
|
1387
1393
|
new Date(this.parent.projectStartDate) : this.parent.projectStartDate;
|
|
1388
1394
|
const eDate = typeof this.parent.projectEndDate === 'string' ?
|
|
@@ -1578,10 +1584,11 @@ class TaskProcessor extends DateProcessor {
|
|
|
1578
1584
|
const mappingData = new DataManager(dataSource).executeLocal(new Query()
|
|
1579
1585
|
.group(this.parent.taskFields.parentID));
|
|
1580
1586
|
const rootData = [];
|
|
1587
|
+
let index;
|
|
1581
1588
|
for (let i = 0; i < mappingData.length; i++) {
|
|
1582
1589
|
const groupData = mappingData[i];
|
|
1583
1590
|
if (!isNullOrUndefined(groupData.key)) {
|
|
1584
|
-
|
|
1591
|
+
index = this.taskIds.indexOf(groupData.key.toString());
|
|
1585
1592
|
if (index > -1) {
|
|
1586
1593
|
if (!isNullOrUndefined(groupData.key)) {
|
|
1587
1594
|
dataSource[index][this.parent.taskFields.child] = groupData.items;
|
|
@@ -1589,7 +1596,9 @@ class TaskProcessor extends DateProcessor {
|
|
|
1589
1596
|
}
|
|
1590
1597
|
}
|
|
1591
1598
|
}
|
|
1592
|
-
|
|
1599
|
+
if (index !== -1) {
|
|
1600
|
+
rootData.push.apply(rootData, groupData.items); // eslint-disable-line
|
|
1601
|
+
}
|
|
1593
1602
|
}
|
|
1594
1603
|
this.hierarchyData = this.dataReorder(dataSource, rootData);
|
|
1595
1604
|
}
|
|
@@ -1803,7 +1812,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
1803
1812
|
progress = progress ? parseFloat(progress.toString()) ? parseFloat(progress.toString()) : 0 : 0;
|
|
1804
1813
|
const predecessors = data[taskSettings.dependency];
|
|
1805
1814
|
const baselineStartDate = this.getDateFromFormat(data[taskSettings.baselineStartDate], true);
|
|
1806
|
-
|
|
1815
|
+
let baselineEndDate = this.getDateFromFormat(data[taskSettings.baselineEndDate], true);
|
|
1807
1816
|
const ganttData = {};
|
|
1808
1817
|
const ganttProperties = {};
|
|
1809
1818
|
const autoSchedule = (this.parent.taskMode === 'Auto') ? true :
|
|
@@ -1837,7 +1846,11 @@ class TaskProcessor extends DateProcessor {
|
|
|
1837
1846
|
if (baselineEndDate && baselineEndDate.getHours() === 0 && this.parent.defaultEndTime !== 86400) {
|
|
1838
1847
|
this.setTime(this.parent.defaultEndTime, baselineEndDate);
|
|
1839
1848
|
}
|
|
1840
|
-
|
|
1849
|
+
if ((ganttProperties.baselineStartDate && baselineEndDate &&
|
|
1850
|
+
(ganttProperties.baselineStartDate.getTime() > baselineEndDate.getTime())) || ganttProperties.isMilestone) {
|
|
1851
|
+
baselineEndDate = ganttProperties.baselineStartDate;
|
|
1852
|
+
}
|
|
1853
|
+
this.parent.setRecordValue('baselineEndDate', this.checkBaselineEndDate(baselineEndDate, ganttProperties), ganttProperties, true);
|
|
1841
1854
|
this.parent.setRecordValue('progress', progress, ganttProperties, true);
|
|
1842
1855
|
this.parent.setRecordValue('totalProgress', progress, ganttProperties, true);
|
|
1843
1856
|
this.parent.setRecordValue('predecessorsName', predecessors, ganttProperties, true);
|
|
@@ -1858,7 +1871,6 @@ class TaskProcessor extends DateProcessor {
|
|
|
1858
1871
|
!isNullOrUndefined(taskSettings.child)) {
|
|
1859
1872
|
this.parent.setRecordValue(taskSettings.child, [], ganttData);
|
|
1860
1873
|
}
|
|
1861
|
-
this.parent.setRecordValue('baselineEndDate', this.checkBaselineEndDate(baselineEndDate), ganttProperties, true);
|
|
1862
1874
|
if (!isNullOrUndefined(data[taskSettings.child]) && data[taskSettings.child].length > 0) {
|
|
1863
1875
|
this.parent.setRecordValue('hasChildRecords', true, ganttData);
|
|
1864
1876
|
this.parent.setRecordValue('isMilestone', false, ganttProperties, true);
|
|
@@ -2070,10 +2082,10 @@ class TaskProcessor extends DateProcessor {
|
|
|
2070
2082
|
work = parseFloat(work.toFixed(2));
|
|
2071
2083
|
}
|
|
2072
2084
|
}
|
|
2073
|
-
if (ganttData.childRecords.length > 0) {
|
|
2085
|
+
if (ganttData.childRecords.length > 0 && this.parent.isOnEdit) {
|
|
2074
2086
|
let childCompletedWorks = 0;
|
|
2075
2087
|
for (let i = 0; i < ganttData.childRecords.length; i++) {
|
|
2076
|
-
childCompletedWorks += ganttData.childRecords[i]
|
|
2088
|
+
childCompletedWorks += ganttData.childRecords[i].ganttProperties.work;
|
|
2077
2089
|
}
|
|
2078
2090
|
work += childCompletedWorks;
|
|
2079
2091
|
}
|
|
@@ -2572,7 +2584,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
2572
2584
|
calculateBaselineWidth(ganttProperties) {
|
|
2573
2585
|
const baselineStartDate = this.getDateFromFormat(ganttProperties.baselineStartDate);
|
|
2574
2586
|
const baselineEndDate = this.getDateFromFormat(ganttProperties.baselineEndDate);
|
|
2575
|
-
if (baselineStartDate && baselineEndDate) {
|
|
2587
|
+
if (baselineStartDate && baselineEndDate && (baselineStartDate.getTime() !== baselineEndDate.getTime())) {
|
|
2576
2588
|
return (this.getTaskWidth(baselineStartDate, baselineEndDate));
|
|
2577
2589
|
}
|
|
2578
2590
|
else {
|
|
@@ -3630,6 +3642,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
3630
3642
|
let maxEndDate = null;
|
|
3631
3643
|
let milestoneCount = 0;
|
|
3632
3644
|
let totalProgress = 0;
|
|
3645
|
+
let childCompletedWorks = 0;
|
|
3633
3646
|
let childData;
|
|
3634
3647
|
for (let count = 0; count < childLength; count++) {
|
|
3635
3648
|
childData = childRecords[count];
|
|
@@ -3667,6 +3680,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
3667
3680
|
else {
|
|
3668
3681
|
milestoneCount++;
|
|
3669
3682
|
}
|
|
3683
|
+
childCompletedWorks += childData.ganttProperties.work;
|
|
3670
3684
|
}
|
|
3671
3685
|
if (!deleteUpdate) {
|
|
3672
3686
|
if (this.compareDates(previousStartDate, minStartDate) !== 0) {
|
|
@@ -3692,6 +3706,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
3692
3706
|
}
|
|
3693
3707
|
this.updateWorkWithDuration(parentData);
|
|
3694
3708
|
let parentWork = parentProp.work;
|
|
3709
|
+
parentWork = this.parent.isOnEdit ? parentWork : (parentWork + childCompletedWorks);
|
|
3695
3710
|
this.parent.setRecordValue('work', parentWork, parentProp, true);
|
|
3696
3711
|
this.parent.setRecordValue('taskType', 'FixedDuration', parentProp, true);
|
|
3697
3712
|
if (!isNullOrUndefined(this.parent.taskFields.type)) {
|
|
@@ -3762,8 +3777,12 @@ const parentProgressBarInnerDiv = 'e-gantt-parent-progressbar-inner-div';
|
|
|
3762
3777
|
const taskLabel = 'e-task-label';
|
|
3763
3778
|
const childTaskBarInnerDiv = 'e-gantt-child-taskbar-inner-div';
|
|
3764
3779
|
const childProgressBarInnerDiv = 'e-gantt-child-progressbar-inner-div';
|
|
3780
|
+
const criticalChildTaskBarInnerDiv = 'e-gantt-child-critical-taskbar-inner-div';
|
|
3781
|
+
const criticalChildProgressBarInnerDiv = 'e-gantt-child-critical-progressbar-inner-div';
|
|
3765
3782
|
const milestoneTop = 'e-milestone-top';
|
|
3766
3783
|
const milestoneBottom = 'e-milestone-bottom';
|
|
3784
|
+
const criticalMilestoneTop = 'e-critical-milestone-top';
|
|
3785
|
+
const criticalMilestoneBottom = 'e-critical-milestone-bottom';
|
|
3767
3786
|
const baselineBar = 'e-baseline-bar';
|
|
3768
3787
|
const baselineMilestoneContainer = 'e-baseline-gantt-milestone-container';
|
|
3769
3788
|
const baselineMilestoneDiv = 'e-baseline-gantt-milestone';
|
|
@@ -3799,6 +3818,7 @@ const traceManualUnscheduledTask = 'e-gantt-unscheduled-manualtask';
|
|
|
3799
3818
|
const traceParentTaskBar = 'e-gantt-parent-taskbar';
|
|
3800
3819
|
const traceParentProgressBar = 'e-gantt-parent-progressbar';
|
|
3801
3820
|
const traceUnscheduledTask = 'e-gantt-unscheduled-task';
|
|
3821
|
+
const criticalUnscheduledTask = 'e-gantt-critical-unscheduled-taskbar';
|
|
3802
3822
|
const taskIndicatorDiv = 'e-indicator-span';
|
|
3803
3823
|
const leftResizeGripper = 'e-left-resize-gripper';
|
|
3804
3824
|
const rightResizeGripper = 'e-right-resize-gripper';
|
|
@@ -3826,13 +3846,19 @@ const unscheduledMilestoneBottom = 'e-unscheduled-milestone-bottom';
|
|
|
3826
3846
|
const dependencyViewContainer = 'e-gantt-dependency-view-container';
|
|
3827
3847
|
const connectorLineContainer = 'e-connector-line-container';
|
|
3828
3848
|
const connectorLine = 'e-line';
|
|
3849
|
+
const criticalConnectorLine = 'e-criticalconnector-line';
|
|
3850
|
+
const criticalConnectorLineRightArrow = 'e-criticalconnector-line-right-arrow';
|
|
3851
|
+
const criticalConnectorLineLeftArrow = 'e-criticalconnector-line-left-arrow';
|
|
3829
3852
|
const connectorLineRightArrow = 'e-connector-line-right-arrow';
|
|
3830
3853
|
const connectorLineLeftArrow = 'e-connector-line-left-arrow';
|
|
3831
3854
|
const connectorLineZIndex = 'e-connector-line-z-index';
|
|
3832
3855
|
const connectorLineHover = 'e-connector-line-hover';
|
|
3856
|
+
const criticalConnectorLineHover = 'e-critical-connector-line-hover';
|
|
3833
3857
|
const connectorLineHoverZIndex = 'e-connector-line-hover-z-index';
|
|
3834
3858
|
const connectorLineRightArrowHover = 'e-connector-line-right-arrow-hover';
|
|
3835
3859
|
const connectorLineLeftArrowHover = 'e-connector-line-left-arrow-hover';
|
|
3860
|
+
const criticalConnectorLineRightArrowHover = 'e-critical-connector-line-right-arrow-hover';
|
|
3861
|
+
const criticalConnectorLineLeftArrowHover = 'e-critical-connector-line-left-arrow-hover';
|
|
3836
3862
|
|
|
3837
3863
|
const connectorPointLeft = 'e-connectorpoint-left';
|
|
3838
3864
|
const connectorPointRight = 'e-connectorpoint-right';
|
|
@@ -3859,6 +3885,7 @@ const editIcon = 'e-edit';
|
|
|
3859
3885
|
const indentIcon = 'e-indent';
|
|
3860
3886
|
const outdentIcon = 'e-outdent';
|
|
3861
3887
|
const addIcon = 'e-add';
|
|
3888
|
+
|
|
3862
3889
|
const addAboveIcon = 'e-add-above';
|
|
3863
3890
|
const addBelowIcon = 'e-add-below';
|
|
3864
3891
|
//Predecessor touch mode
|
|
@@ -4162,6 +4189,10 @@ class GanttChart {
|
|
|
4162
4189
|
this.parent.predecessorModule.createConnectorLinesCollection();
|
|
4163
4190
|
}
|
|
4164
4191
|
this.parent.connectorLineModule.renderConnectorLines(this.parent.updatedConnectorLineCollection);
|
|
4192
|
+
if (this.parent.enableCriticalPath) {
|
|
4193
|
+
let crtiticalModule = this.parent.criticalPathModule;
|
|
4194
|
+
this.parent.criticalPathModule.criticalConnectorLine(crtiticalModule.criticalPathCollection, crtiticalModule.detailPredecessorCollection, this.parent.enableCriticalPath, crtiticalModule.predecessorCollectionTaskIds);
|
|
4195
|
+
}
|
|
4165
4196
|
if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation) {
|
|
4166
4197
|
this.renderOverAllocationContainer();
|
|
4167
4198
|
}
|
|
@@ -4785,6 +4816,9 @@ class GanttChart {
|
|
|
4785
4816
|
* @private
|
|
4786
4817
|
*/
|
|
4787
4818
|
expandedGanttRow(args) {
|
|
4819
|
+
if (isNullOrUndefined(args['gridRow'])) {
|
|
4820
|
+
return;
|
|
4821
|
+
}
|
|
4788
4822
|
const record = getValue('data', args);
|
|
4789
4823
|
if (this.isExpandCollapseFromChart) {
|
|
4790
4824
|
this.expandCollapseChartRows('expand', getValue('chartRow', args), record, null);
|
|
@@ -5039,7 +5073,7 @@ class GanttChart {
|
|
|
5039
5073
|
this.parent.treeGrid.grid.notify('key-pressed', e);
|
|
5040
5074
|
}
|
|
5041
5075
|
}
|
|
5042
|
-
if (!isInEditedState) {
|
|
5076
|
+
if (!isNullOrUndefined(isInEditedState) && !this.parent.editModule.cellEditModule.isCellEdit) {
|
|
5043
5077
|
if (nextElement) {
|
|
5044
5078
|
if ($target.classList.contains('e-rowcell')) {
|
|
5045
5079
|
this.manageFocus($target, 'remove', false);
|
|
@@ -5047,7 +5081,7 @@ class GanttChart {
|
|
|
5047
5081
|
else {
|
|
5048
5082
|
this.manageFocus($target, 'remove', true);
|
|
5049
5083
|
}
|
|
5050
|
-
if (nextElement.classList.contains('e-rowcell') && $target.nextElementSibling) {
|
|
5084
|
+
if ((nextElement.classList.contains('e-rowcell') && $target.nextElementSibling) || $target.classList.contains('e-right-label-container')) {
|
|
5051
5085
|
if (!$target.classList.contains('e-rowcell')) {
|
|
5052
5086
|
this.parent.treeGrid.grid.notify('key-pressed', e);
|
|
5053
5087
|
const fmodule = getValue('focusModule', this.parent.treeGrid.grid);
|
|
@@ -5328,6 +5362,9 @@ class Timeline {
|
|
|
5328
5362
|
this.totalTimelineWidth = 0;
|
|
5329
5363
|
this.customTimelineSettings = null;
|
|
5330
5364
|
this.parent.isTimelineRoundOff = this.isZoomToFit ? false : isNullOrUndefined(this.parent.projectStartDate) ? true : false;
|
|
5365
|
+
if (this.parent.enablePersistence) {
|
|
5366
|
+
this.parent.timelineSettings = this.parent.currentZoomingLevel;
|
|
5367
|
+
}
|
|
5331
5368
|
}
|
|
5332
5369
|
/**
|
|
5333
5370
|
* To render timeline header series.
|
|
@@ -5454,6 +5491,10 @@ class Timeline {
|
|
|
5454
5491
|
this.parent.isTimelineRoundOff = this.isZoomToFit ? false : isNullOrUndefined(this.parent.projectStartDate) ? true : false;
|
|
5455
5492
|
this.processTimelineUnit();
|
|
5456
5493
|
this.parent.updateProjectDates(this.parent.cloneProjectStartDate, this.parent.cloneProjectEndDate, this.parent.isTimelineRoundOff);
|
|
5494
|
+
const criticalModule = this.parent.criticalPathModule;
|
|
5495
|
+
if (this.parent.enableCriticalPath && criticalModule) {
|
|
5496
|
+
criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
5497
|
+
}
|
|
5457
5498
|
if (this.isZooming || this.isZoomToFit) {
|
|
5458
5499
|
const args = {
|
|
5459
5500
|
requestType: this.isZoomIn ? 'AfterZoomIn' : this.isZoomToFit ? 'AfterZoomToProject' : 'AfterZoomOut',
|
|
@@ -5510,8 +5551,8 @@ class Timeline {
|
|
|
5510
5551
|
}
|
|
5511
5552
|
}
|
|
5512
5553
|
const newTimeline = extend({}, {}, zoomingLevel, true);
|
|
5513
|
-
this.roundOffDateToZoom(this.parent.cloneProjectStartDate, true, perDayWidth, newTimeline.bottomTier.unit);
|
|
5514
|
-
this.roundOffDateToZoom(this.parent.cloneProjectEndDate, false, perDayWidth, newTimeline.bottomTier.unit);
|
|
5554
|
+
this.roundOffDateToZoom(this.parent.cloneProjectStartDate, true, perDayWidth, newTimeline.bottomTier.unit, zoomingLevel);
|
|
5555
|
+
this.roundOffDateToZoom(this.parent.cloneProjectEndDate, false, perDayWidth, newTimeline.bottomTier.unit, zoomingLevel);
|
|
5515
5556
|
const numberOfCells = this.calculateNumberOfTimelineCells(newTimeline);
|
|
5516
5557
|
const scrollHeight = this.parent.ganttChartModule.scrollElement.offsetHeight - 17; //17 is horizontal scrollbar width
|
|
5517
5558
|
const contentHeight = this.parent.ganttChartModule.chartBodyContent.offsetHeight;
|
|
@@ -5527,24 +5568,40 @@ class Timeline {
|
|
|
5527
5568
|
this.parent.trigger('actionBegin', args);
|
|
5528
5569
|
this.changeTimelineSettings(newTimeline);
|
|
5529
5570
|
}
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5571
|
+
bottomTierCellWidthCalc(mode, zoomLevel, date) {
|
|
5572
|
+
let convertedMilliSeconds;
|
|
5573
|
+
switch (mode) {
|
|
5574
|
+
case 'Minutes':
|
|
5575
|
+
convertedMilliSeconds = zoomLevel.bottomTier.count * (60 * 1000);
|
|
5576
|
+
break;
|
|
5577
|
+
case 'Hour':
|
|
5578
|
+
convertedMilliSeconds = zoomLevel.bottomTier.count * (60 * 60 * 1000);
|
|
5579
|
+
break;
|
|
5580
|
+
case 'Week':
|
|
5581
|
+
convertedMilliSeconds = zoomLevel.bottomTier.count * (7 * 24 * 60 * 60 * 1000);
|
|
5582
|
+
break;
|
|
5583
|
+
case 'Day':
|
|
5584
|
+
convertedMilliSeconds = zoomLevel.bottomTier.count * (24 * 60 * 60 * 1000);
|
|
5585
|
+
break;
|
|
5586
|
+
case 'Month':
|
|
5587
|
+
const daysInMonth = new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
|
|
5588
|
+
convertedMilliSeconds = zoomLevel.bottomTier.count * (60 * 60 * 24 * daysInMonth * 1000);
|
|
5589
|
+
break;
|
|
5590
|
+
case 'Year':
|
|
5591
|
+
const daysInYear = (date.getFullYear() % 400 === 0 || (date.getFullYear() % 100 !== 0 && date.getFullYear() % 4 === 0)) ? 366 : 365;
|
|
5592
|
+
convertedMilliSeconds = zoomLevel.bottomTier.count * (60 * 60 * 24 * daysInYear * 1000);
|
|
5593
|
+
break;
|
|
5594
|
+
}
|
|
5595
|
+
return convertedMilliSeconds;
|
|
5596
|
+
}
|
|
5597
|
+
roundOffDateToZoom(date, isStartDate, perDayWidth, tierMode, zoomingLevel) {
|
|
5598
|
+
const roundOffTime = this.bottomTierCellWidthCalc(tierMode, zoomingLevel, date);
|
|
5533
5599
|
if (isStartDate) {
|
|
5534
5600
|
date.setTime(date.getTime() - roundOffTime);
|
|
5535
5601
|
}
|
|
5536
5602
|
else {
|
|
5537
5603
|
date.setTime(date.getTime() + roundOffTime);
|
|
5538
5604
|
}
|
|
5539
|
-
if (tierMode === 'Hour') {
|
|
5540
|
-
date.setMinutes(isStartDate ? -120 : 120);
|
|
5541
|
-
}
|
|
5542
|
-
else if (tierMode === 'Minutes') {
|
|
5543
|
-
date.setSeconds(isStartDate ? -120 : 120);
|
|
5544
|
-
}
|
|
5545
|
-
else {
|
|
5546
|
-
date.setHours(isStartDate ? -48 : 48, 0, 0, 0);
|
|
5547
|
-
}
|
|
5548
5605
|
}
|
|
5549
5606
|
calculateNumberOfTimelineCells(newTimeline) {
|
|
5550
5607
|
const numberOfDays = Math.abs((this.parent.cloneProjectEndDate.getTime() -
|
|
@@ -6110,7 +6167,7 @@ class Timeline {
|
|
|
6110
6167
|
parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell, isFirstCell);
|
|
6111
6168
|
scheduleDateCollection.push(new Date(startDate.toString()));
|
|
6112
6169
|
if (isFirstCell) {
|
|
6113
|
-
newTime = this.calculateQuarterEndDate(startDate).getTime();
|
|
6170
|
+
newTime = this.calculateQuarterEndDate(startDate, count).getTime();
|
|
6114
6171
|
}
|
|
6115
6172
|
else {
|
|
6116
6173
|
increment = this.getIncrement(startDate, count, mode);
|
|
@@ -6266,19 +6323,29 @@ class Timeline {
|
|
|
6266
6323
|
mode === 'Hour' || mode === 'Minutes') &&
|
|
6267
6324
|
this.parent.nonWorkingDayIndex.indexOf(day.getDay()) !== -1;
|
|
6268
6325
|
}
|
|
6269
|
-
calculateQuarterEndDate(date) {
|
|
6326
|
+
calculateQuarterEndDate(date, count) {
|
|
6270
6327
|
const month = date.getMonth();
|
|
6271
|
-
if (
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6328
|
+
if (count === 3) {
|
|
6329
|
+
if (month >= 0 && month <= 2) {
|
|
6330
|
+
return new Date(date.getFullYear(), 3, 1);
|
|
6331
|
+
}
|
|
6332
|
+
else if (month >= 3 && month <= 5) {
|
|
6333
|
+
return new Date(date.getFullYear(), 6, 1);
|
|
6334
|
+
}
|
|
6335
|
+
else if (month >= 6 && month <= 8) {
|
|
6336
|
+
return new Date(date.getFullYear(), 9, 1);
|
|
6337
|
+
}
|
|
6338
|
+
else {
|
|
6339
|
+
return new Date(date.getFullYear() + 1, 0, 1);
|
|
6340
|
+
}
|
|
6279
6341
|
}
|
|
6280
6342
|
else {
|
|
6281
|
-
|
|
6343
|
+
if (month >= 0 && month <= 5) {
|
|
6344
|
+
return new Date(date.getFullYear(), 6, 1);
|
|
6345
|
+
}
|
|
6346
|
+
else {
|
|
6347
|
+
return new Date(date.getFullYear() + 1, 0, 1);
|
|
6348
|
+
}
|
|
6282
6349
|
}
|
|
6283
6350
|
}
|
|
6284
6351
|
/**
|
|
@@ -6309,7 +6376,7 @@ class Timeline {
|
|
|
6309
6376
|
this.customFormat(scheduleWeeks, format, tier, mode, formatter);
|
|
6310
6377
|
thWidth = (this.getIncrement(scheduleWeeks, count, mode) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth;
|
|
6311
6378
|
const cellWidth = thWidth;
|
|
6312
|
-
thWidth = isLast || isFirstCell ? isLast ? this.calculateWidthBetweenTwoDate(mode, scheduleWeeks, this.timelineRoundOffEndDate) : this.calculateWidthBetweenTwoDate(mode, scheduleWeeks, this.calculateQuarterEndDate(scheduleWeeks))
|
|
6379
|
+
thWidth = isLast || isFirstCell ? isLast ? this.calculateWidthBetweenTwoDate(mode, scheduleWeeks, this.timelineRoundOffEndDate) : this.calculateWidthBetweenTwoDate(mode, scheduleWeeks, this.calculateQuarterEndDate(scheduleWeeks, count))
|
|
6313
6380
|
: thWidth;
|
|
6314
6381
|
const isWeekendCell = this.isWeekendHeaderCell(mode, tier, scheduleWeeks);
|
|
6315
6382
|
const textClassName = tier === 'topTier' ? ' e-gantt-top-cell-text' : '';
|
|
@@ -6662,6 +6729,10 @@ class Timeline {
|
|
|
6662
6729
|
else if (type === 'nextTimeSpan' && isFrom === 'publicMethod') {
|
|
6663
6730
|
this.parent.ganttChartModule.updateScrollLeft(this.parent.timelineModule.totalTimelineWidth);
|
|
6664
6731
|
}
|
|
6732
|
+
else if (type === 'nextTimeSpan' && isFrom === 'TaskbarEditing') {
|
|
6733
|
+
let currentScrollLeft = document.getElementsByClassName('e-chart-scroll-container e-content')[0].scrollLeft;
|
|
6734
|
+
this.parent.element.querySelector('.e-timeline-header-container').scrollLeft = currentScrollLeft;
|
|
6735
|
+
}
|
|
6665
6736
|
this.parent.timelineModule.timeSpanActionEvent('actionComplete', type, isFrom);
|
|
6666
6737
|
}
|
|
6667
6738
|
else {
|
|
@@ -6896,7 +6967,7 @@ class GanttTreeGrid {
|
|
|
6896
6967
|
const scrollWidth = this.getScrollbarWidth();
|
|
6897
6968
|
const isMobile = /Android|Mac|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
6898
6969
|
if (scrollWidth !== 0) {
|
|
6899
|
-
content.style.cssText += 'width: calc(100% + ' + (scrollWidth + 1) + 'px);';
|
|
6970
|
+
content.style.cssText += 'width: calc(100% + ' + (scrollWidth + 1) + 'px);'; //actual scrollbar width 17 px but here scrollbar width set to 16px hence adding increment of 1
|
|
6900
6971
|
}
|
|
6901
6972
|
else {
|
|
6902
6973
|
content.classList.add('e-gantt-scroll-padding');
|
|
@@ -8055,7 +8126,7 @@ class ChartRows extends DateProcessor {
|
|
|
8055
8126
|
'border-bottom-right-radius:' + this.getBorderRadius(data.ganttProperties) + 'px;">' +
|
|
8056
8127
|
'</div>');
|
|
8057
8128
|
}
|
|
8058
|
-
|
|
8129
|
+
const tempDiv = createElement('div');
|
|
8059
8130
|
if (this.taskLabelTemplateFunction && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
|
|
8060
8131
|
const taskLabelTemplateNode = this.taskLabelTemplateFunction(extend({ index: i }, data), this.parent, 'TaskLabelTemplate', this.getTemplateID('TaskLabelTemplate'), false, undefined, progressDiv[0]);
|
|
8061
8132
|
if (taskLabelTemplateNode && taskLabelTemplateNode.length > 0) {
|
|
@@ -8068,7 +8139,8 @@ class ChartRows extends DateProcessor {
|
|
|
8068
8139
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
8069
8140
|
}
|
|
8070
8141
|
if (labelString.indexOf('null') === -1) {
|
|
8071
|
-
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
|
|
8142
|
+
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
|
|
8143
|
+
!this.isTemplate(this.parent.labelSettings.taskLabel)) {
|
|
8072
8144
|
labelString = '';
|
|
8073
8145
|
}
|
|
8074
8146
|
if (isNaN(parseInt(labelString))) {
|
|
@@ -8118,7 +8190,7 @@ class ChartRows extends DateProcessor {
|
|
|
8118
8190
|
progressDiv[0].querySelectorAll('.e-task-label')[0].children[0])
|
|
8119
8191
|
progressDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
|
|
8120
8192
|
if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent == '' &&
|
|
8121
|
-
childLabel && !childLabel['elementRef'] && tempDiv.innerHTML
|
|
8193
|
+
childLabel && !childLabel['elementRef'] && tempDiv.innerHTML !== '')
|
|
8122
8194
|
progressDiv[0].querySelectorAll('.e-task-label')[0].textContent = childLabel;
|
|
8123
8195
|
}
|
|
8124
8196
|
if (!isNullOrUndefined(taskbarInnerDiv) && taskbarInnerDiv.length > 0) {
|
|
@@ -8136,6 +8208,13 @@ class ChartRows extends DateProcessor {
|
|
|
8136
8208
|
let splitTasks = '';
|
|
8137
8209
|
for (let i = 0; i < data.ganttProperties.segments.length; i++) {
|
|
8138
8210
|
const segment = data.ganttProperties.segments[i];
|
|
8211
|
+
let progressBarVisible;
|
|
8212
|
+
if (!segment.showProgress) {
|
|
8213
|
+
progressBarVisible = 'hidden';
|
|
8214
|
+
}
|
|
8215
|
+
else {
|
|
8216
|
+
progressBarVisible = 'initial';
|
|
8217
|
+
}
|
|
8139
8218
|
const segmentPosition = (i === 0) ? 'e-segment-first' : (i === data.ganttProperties.segments.length - 1)
|
|
8140
8219
|
? 'e-segment-last' : 'e-segment-inprogress';
|
|
8141
8220
|
splitTasks += (
|
|
@@ -8143,7 +8222,7 @@ class ChartRows extends DateProcessor {
|
|
|
8143
8222
|
'<div class="' + childTaskBarInnerDiv + ' ' + segmentPosition + ' ' + traceChildTaskBar + ' ' +
|
|
8144
8223
|
' e-segmented-taskbar' +
|
|
8145
8224
|
'"style="width:' + segment.width + 'px;position: absolute; left:' + segment.left + 'px;height:' +
|
|
8146
|
-
(this.taskBarHeight) + 'px; overflow:
|
|
8225
|
+
(this.taskBarHeight) + 'px; overflow:' + progressBarVisible + ';" data-segment-index = "' + i + '" aria-label = "' +
|
|
8147
8226
|
this.generateSpiltTaskAriaLabel(segment, data.ganttProperties) + '"> ' +
|
|
8148
8227
|
this.getSplitTaskbarLeftResizerNode() +
|
|
8149
8228
|
//split progress bar
|
|
@@ -8265,6 +8344,7 @@ class ChartRows extends DateProcessor {
|
|
|
8265
8344
|
this.parent.dataOperation.updateMappingData(mergeData, 'segments');
|
|
8266
8345
|
if (segments.length === 1) {
|
|
8267
8346
|
this.parent.setRecordValue('endDate', endDate, mergeData.ganttProperties, true);
|
|
8347
|
+
this.parent.setRecordValue('EndDate', endDate, mergeData, true);
|
|
8268
8348
|
this.parent.setRecordValue('segments', null, mergeData.ganttProperties, true);
|
|
8269
8349
|
this.parent.dataOperation.updateMappingData(mergeData, 'segments');
|
|
8270
8350
|
}
|
|
@@ -8433,6 +8513,7 @@ class ChartRows extends DateProcessor {
|
|
|
8433
8513
|
else {
|
|
8434
8514
|
startDate = new Date(splitDate.getTime());
|
|
8435
8515
|
startDate.setDate(startDate.getDate() + 1 + increment);
|
|
8516
|
+
this.setTime(this.parent.defaultStartTime, startDate);
|
|
8436
8517
|
startDate = this.parent.dataOperation.checkStartDate(startDate, ganttProp, false);
|
|
8437
8518
|
segmentEndDate = new Date(endDate.getTime());
|
|
8438
8519
|
segmentEndDate.setDate(segmentEndDate.getDate() + 1);
|
|
@@ -8693,7 +8774,7 @@ class ChartRows extends DateProcessor {
|
|
|
8693
8774
|
'width:' + data.ganttProperties.progressWidth + 'px;' +
|
|
8694
8775
|
'border-top-right-radius:' + this.getBorderRadius(data) + 'px;' +
|
|
8695
8776
|
'border-bottom-right-radius:' + this.getBorderRadius(data) + 'px;height:100%;"></div>');
|
|
8696
|
-
|
|
8777
|
+
const div = createElement('div');
|
|
8697
8778
|
if (this.taskLabelTemplateFunction) {
|
|
8698
8779
|
const parentTaskLabelNode = this.taskLabelTemplateFunction(extend({ index: i }, data), this.parent, 'TaskLabelTemplate', this.getTemplateID('TaskLabelTemplate'), false, undefined, progressBarInnerDiv[0]);
|
|
8699
8780
|
if (parentTaskLabelNode && parentTaskLabelNode.length > 0) {
|
|
@@ -8706,7 +8787,8 @@ class ChartRows extends DateProcessor {
|
|
|
8706
8787
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
8707
8788
|
}
|
|
8708
8789
|
if (labelString.indexOf('null') === -1) {
|
|
8709
|
-
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
|
|
8790
|
+
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
|
|
8791
|
+
!this.isTemplate(this.parent.labelSettings.taskLabel)) {
|
|
8710
8792
|
labelString = '';
|
|
8711
8793
|
}
|
|
8712
8794
|
if (isNaN(parseInt(labelString))) {
|
|
@@ -8735,7 +8817,7 @@ class ChartRows extends DateProcessor {
|
|
|
8735
8817
|
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0])
|
|
8736
8818
|
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
|
|
8737
8819
|
if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent == '' &&
|
|
8738
|
-
parentLabel && !parentLabel['elementRef'] && div.innerHTML
|
|
8820
|
+
parentLabel && !parentLabel['elementRef'] && div.innerHTML !== '')
|
|
8739
8821
|
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent = parentLabel;
|
|
8740
8822
|
}
|
|
8741
8823
|
const milestoneTemplate = '<div class="' + parentMilestone + '" style="position:absolute;">' +
|
|
@@ -10287,6 +10369,9 @@ class Dependency {
|
|
|
10287
10369
|
updateConnectorLineObject(parentGanttRecord, childGanttRecord, predecessor) {
|
|
10288
10370
|
const connectorObj = this.parent.connectorLineModule.createConnectorLineObject(parentGanttRecord, childGanttRecord, predecessor);
|
|
10289
10371
|
if (connectorObj) {
|
|
10372
|
+
if (childGanttRecord.isCritical && parentGanttRecord.isCritical) {
|
|
10373
|
+
connectorObj.isCritical = true;
|
|
10374
|
+
}
|
|
10290
10375
|
if ((this.parent.connectorLineIds.length > 0 && this.parent.connectorLineIds.indexOf(connectorObj.connectorLineId) === -1) ||
|
|
10291
10376
|
this.parent.connectorLineIds.length === 0) {
|
|
10292
10377
|
this.parent.updatedConnectorLineCollection.push(connectorObj);
|
|
@@ -11357,6 +11442,7 @@ class Splitter$1 {
|
|
|
11357
11442
|
this.splitterObject = new Splitter({
|
|
11358
11443
|
height: null,
|
|
11359
11444
|
width: this.parent.ganttWidth.toString(),
|
|
11445
|
+
enablePersistence: this.parent.enablePersistence,
|
|
11360
11446
|
separatorSize: this.parent.splitterSettings.separatorSize,
|
|
11361
11447
|
paneSettings: [
|
|
11362
11448
|
{
|
|
@@ -11408,6 +11494,9 @@ class Splitter$1 {
|
|
|
11408
11494
|
* @private
|
|
11409
11495
|
*/
|
|
11410
11496
|
calculateSplitterPosition(splitter$$1, isDynamic) {
|
|
11497
|
+
if (!isNullOrUndefined(this.splitterObject) && this.parent.enablePersistence) {
|
|
11498
|
+
return this.splitterObject.paneSettings[0].size;
|
|
11499
|
+
}
|
|
11411
11500
|
if (splitter$$1.view === 'Grid') {
|
|
11412
11501
|
return '100%';
|
|
11413
11502
|
}
|
|
@@ -12104,8 +12193,8 @@ class FocusModule {
|
|
|
12104
12193
|
break;
|
|
12105
12194
|
}
|
|
12106
12195
|
case 'delete':
|
|
12107
|
-
if (ganttObj.selectionModule && ganttObj.editModule &&
|
|
12108
|
-
(ganttObj.editModule.dialogModule.dialogObj &&
|
|
12196
|
+
if (ganttObj.selectionModule && ganttObj.editModule && ganttObj.editModule.dialogModule &&
|
|
12197
|
+
(!ganttObj.editModule.dialogModule.dialogObj || (ganttObj.editModule.dialogModule.dialogObj &&
|
|
12109
12198
|
!ganttObj.editModule.dialogModule.dialogObj.visible)) && (!ganttObj.editSettings.allowTaskbarEditing
|
|
12110
12199
|
|| (ganttObj.editSettings.allowTaskbarEditing && !ganttObj.editModule.taskbarEditModule.touchEdit))) {
|
|
12111
12200
|
if ((ganttObj.selectionSettings.mode !== 'Cell' && ganttObj.selectionModule.selectedRowIndexes.length)
|
|
@@ -12292,6 +12381,7 @@ let Gantt = class Gantt extends Component {
|
|
|
12292
12381
|
* @private
|
|
12293
12382
|
*/
|
|
12294
12383
|
this.isEdit = false;
|
|
12384
|
+
setValue('mergePersistData', this.mergePersistGanttData, this);
|
|
12295
12385
|
}
|
|
12296
12386
|
/**
|
|
12297
12387
|
* To get the module name
|
|
@@ -12361,8 +12451,10 @@ let Gantt = class Gantt extends Component {
|
|
|
12361
12451
|
this.dataOperation.getNonWorkingDayIndex();
|
|
12362
12452
|
this.columnMapping = {};
|
|
12363
12453
|
this.controlId = this.element.id;
|
|
12364
|
-
this.cloneProjectStartDate =
|
|
12365
|
-
|
|
12454
|
+
this.cloneProjectStartDate = this.enablePersistence && this.cloneProjectStartDate ?
|
|
12455
|
+
this.cloneProjectStartDate : null;
|
|
12456
|
+
this.cloneProjectEndDate = this.enablePersistence && this.cloneProjectEndDate ?
|
|
12457
|
+
this.cloneProjectEndDate : null;
|
|
12366
12458
|
this.totalHolidayDates = this.dataOperation.getHolidayDates();
|
|
12367
12459
|
this.ganttChartModule = new GanttChart(this);
|
|
12368
12460
|
this.timelineModule = new Timeline(this);
|
|
@@ -12629,6 +12721,10 @@ let Gantt = class Gantt extends Component {
|
|
|
12629
12721
|
this.updateRowHeightInConnectorLine(this.updatedConnectorLineCollection);
|
|
12630
12722
|
this.connectorLineModule.renderConnectorLines(this.updatedConnectorLineCollection);
|
|
12631
12723
|
}
|
|
12724
|
+
if (this.enableCriticalPath) {
|
|
12725
|
+
let criticalModule = this.criticalPathModule;
|
|
12726
|
+
this.criticalPathModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
12727
|
+
}
|
|
12632
12728
|
}
|
|
12633
12729
|
}
|
|
12634
12730
|
keyActionHandler(e) {
|
|
@@ -12959,6 +13055,38 @@ let Gantt = class Gantt extends Component {
|
|
|
12959
13055
|
const value = this.dateValidationModule.getWorkString(work, workUnit);
|
|
12960
13056
|
return value;
|
|
12961
13057
|
}
|
|
13058
|
+
updateTreeColumns() {
|
|
13059
|
+
let temp;
|
|
13060
|
+
var field;
|
|
13061
|
+
let gridColumns = this.treeGrid.grid.getColumns();
|
|
13062
|
+
if (this.treeColumnIndex !== -1 && this.columns[this.treeColumnIndex] &&
|
|
13063
|
+
!isNullOrUndefined(this.columns[this.treeColumnIndex]['template'])) {
|
|
13064
|
+
temp = this.columns[this.treeColumnIndex]['template'];
|
|
13065
|
+
field = this.columns[this.treeColumnIndex]['field'];
|
|
13066
|
+
}
|
|
13067
|
+
let gridColumn;
|
|
13068
|
+
for (let i = 0; i < gridColumns.length; i++) {
|
|
13069
|
+
gridColumn = {};
|
|
13070
|
+
for (let j = 0; j < this.columns.length; j++) {
|
|
13071
|
+
if (this.columns[j]['field'] == gridColumns[i].field) {
|
|
13072
|
+
for (const prop of Object.keys(this.columns[j])) {
|
|
13073
|
+
if (!isUndefined(this.columns[j][prop])) {
|
|
13074
|
+
gridColumn[prop] = gridColumns[i][prop];
|
|
13075
|
+
}
|
|
13076
|
+
gridColumn.visible = gridColumns[i].visible;
|
|
13077
|
+
gridColumn.width = gridColumns[i].width;
|
|
13078
|
+
}
|
|
13079
|
+
this.columns[j] = (gridColumn);
|
|
13080
|
+
if (this.columns[j]['type'] !== 'checkbox' && (!isNullOrUndefined(temp) && temp !== '')) {
|
|
13081
|
+
this.columns[j]['template'] = temp;
|
|
13082
|
+
}
|
|
13083
|
+
}
|
|
13084
|
+
}
|
|
13085
|
+
}
|
|
13086
|
+
if (this.columns.length > 0) {
|
|
13087
|
+
this.treeGrid.setProperties({ columns: this.columns }, true);
|
|
13088
|
+
}
|
|
13089
|
+
}
|
|
12962
13090
|
/**
|
|
12963
13091
|
*
|
|
12964
13092
|
* @param {object} args .
|
|
@@ -12979,6 +13107,9 @@ let Gantt = class Gantt extends Component {
|
|
|
12979
13107
|
this.splitterElement.style.height = '100%';
|
|
12980
13108
|
}
|
|
12981
13109
|
if (this.isLoad) {
|
|
13110
|
+
if (this.enablePersistence) {
|
|
13111
|
+
this.updateTreeColumns();
|
|
13112
|
+
}
|
|
12982
13113
|
this.updateCurrentViewData();
|
|
12983
13114
|
if (!this.enableVirtualization) {
|
|
12984
13115
|
this.updateContentHeight();
|
|
@@ -13008,7 +13139,14 @@ let Gantt = class Gantt extends Component {
|
|
|
13008
13139
|
else {
|
|
13009
13140
|
this.getCurrentRecords(args);
|
|
13010
13141
|
}
|
|
13142
|
+
if (this.enableCriticalPath && this.criticalPathModule) {
|
|
13143
|
+
this.criticalPathModule.showCriticalPath(this.enableCriticalPath);
|
|
13144
|
+
}
|
|
13011
13145
|
this.notify('recordsUpdated', {});
|
|
13146
|
+
if (this.enableCriticalPath && this.criticalPathModule) {
|
|
13147
|
+
let criticalModule = this.criticalPathModule;
|
|
13148
|
+
this.criticalPathModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
13149
|
+
}
|
|
13012
13150
|
this.initialChartRowElements = this.ganttChartModule.getChartRows();
|
|
13013
13151
|
this.isLoad = false;
|
|
13014
13152
|
this.trigger('dataBound', args);
|
|
@@ -13096,6 +13234,7 @@ let Gantt = class Gantt extends Component {
|
|
|
13096
13234
|
}
|
|
13097
13235
|
break;
|
|
13098
13236
|
case 'timezone':
|
|
13237
|
+
case 'enableCriticalPath':
|
|
13099
13238
|
this.dataOperation.checkDataBinding(true);
|
|
13100
13239
|
break;
|
|
13101
13240
|
case 'filterSettings':
|
|
@@ -13263,15 +13402,42 @@ let Gantt = class Gantt extends Component {
|
|
|
13263
13402
|
}
|
|
13264
13403
|
}
|
|
13265
13404
|
/**
|
|
13266
|
-
*
|
|
13405
|
+
* Returns the properties to be maintained in persisted state.
|
|
13267
13406
|
*
|
|
13268
13407
|
* @returns {string} .
|
|
13269
13408
|
* @private
|
|
13270
13409
|
*/
|
|
13271
13410
|
getPersistData() {
|
|
13272
|
-
const keyEntity = ['
|
|
13411
|
+
const keyEntity = ['sortSettings',
|
|
13412
|
+
'filterSettings', 'columns', 'searchSettings', 'selectedRowIndex', 'treeColumnIndex', 'currentZoomingLevel', 'cloneProjectStartDate', 'cloneProjectEndDate'];
|
|
13413
|
+
const ignoreOnPersist = {
|
|
13414
|
+
filterSettings: ['type', 'mode', 'showFilterBarStatus', 'immediateModeDelay', 'ignoreAccent', 'hierarchyMode'],
|
|
13415
|
+
searchSettings: ['fields', 'operator', 'ignoreCase'],
|
|
13416
|
+
sortSettings: [], columns: [], selectedRowIndex: []
|
|
13417
|
+
};
|
|
13418
|
+
const ignoreOnColumn = ['filter', 'edit', 'filterBarTemplate', 'headerTemplate', 'template',
|
|
13419
|
+
'commandTemplate', 'commands', 'dataSource'];
|
|
13420
|
+
for (let i = 0; i < keyEntity.length; i++) {
|
|
13421
|
+
const currentObject = this[keyEntity[i]];
|
|
13422
|
+
for (let k = 0, val = ignoreOnPersist[keyEntity[i]]; (!isNullOrUndefined(val) && k < val.length); k++) {
|
|
13423
|
+
const objVal = val[k];
|
|
13424
|
+
delete currentObject[objVal];
|
|
13425
|
+
}
|
|
13426
|
+
}
|
|
13427
|
+
this.ignoreInArrays(ignoreOnColumn, this.columns);
|
|
13273
13428
|
return this.addOnPersist(keyEntity);
|
|
13274
13429
|
}
|
|
13430
|
+
ignoreInArrays(ignoreOnColumn, columns) {
|
|
13431
|
+
for (let i = 0; i < columns.length; i++) {
|
|
13432
|
+
this.ignoreInColumn(ignoreOnColumn, columns[i]);
|
|
13433
|
+
}
|
|
13434
|
+
}
|
|
13435
|
+
ignoreInColumn(ignoreOnColumn, column) {
|
|
13436
|
+
for (let i = 0; i < ignoreOnColumn.length; i++) {
|
|
13437
|
+
delete column[ignoreOnColumn[i]];
|
|
13438
|
+
column.filter = {};
|
|
13439
|
+
}
|
|
13440
|
+
}
|
|
13275
13441
|
/**
|
|
13276
13442
|
* @returns {void} .
|
|
13277
13443
|
* @private
|
|
@@ -13354,6 +13520,12 @@ let Gantt = class Gantt extends Component {
|
|
|
13354
13520
|
args: [this]
|
|
13355
13521
|
});
|
|
13356
13522
|
}
|
|
13523
|
+
if (this.enableCriticalPath) {
|
|
13524
|
+
modules.push({
|
|
13525
|
+
member: 'criticalPath',
|
|
13526
|
+
args: [this]
|
|
13527
|
+
});
|
|
13528
|
+
}
|
|
13357
13529
|
if (this.allowResizing) {
|
|
13358
13530
|
modules.push({
|
|
13359
13531
|
member: 'resize',
|
|
@@ -13431,6 +13603,17 @@ let Gantt = class Gantt extends Component {
|
|
|
13431
13603
|
this.sortModule.sortColumn(columnName, direction, isMultiSort);
|
|
13432
13604
|
}
|
|
13433
13605
|
}
|
|
13606
|
+
mergePersistGanttData() {
|
|
13607
|
+
if (!this.treeGrid) {
|
|
13608
|
+
this.treeGrid = new TreeGrid();
|
|
13609
|
+
}
|
|
13610
|
+
const persist1 = 'mergePersistGridData';
|
|
13611
|
+
this.treeGrid.grid[persist1].apply(this);
|
|
13612
|
+
}
|
|
13613
|
+
mergeColumns(storedColumn, columns) {
|
|
13614
|
+
const persist2 = 'mergeColumns';
|
|
13615
|
+
this.treeGrid.grid[persist2].apply(this, [storedColumn, columns]);
|
|
13616
|
+
}
|
|
13434
13617
|
/**
|
|
13435
13618
|
* Clears all the sorted columns of the Gantt.
|
|
13436
13619
|
*
|
|
@@ -13508,7 +13691,7 @@ let Gantt = class Gantt extends Component {
|
|
|
13508
13691
|
*/
|
|
13509
13692
|
updateGridLineContainerHeight() {
|
|
13510
13693
|
if (this.chartVerticalLineContainer) {
|
|
13511
|
-
this.chartVerticalLineContainer.style.height = formatUnit(this.
|
|
13694
|
+
this.chartVerticalLineContainer.style.height = formatUnit(this.getContentHeight());
|
|
13512
13695
|
}
|
|
13513
13696
|
}
|
|
13514
13697
|
/**
|
|
@@ -13612,6 +13795,7 @@ let Gantt = class Gantt extends Component {
|
|
|
13612
13795
|
progress: 'Progress',
|
|
13613
13796
|
dependency: 'Dependency',
|
|
13614
13797
|
notes: 'Notes',
|
|
13798
|
+
criticalPath: 'Critical Path',
|
|
13615
13799
|
baselineStartDate: 'Baseline Start Date',
|
|
13616
13800
|
baselineEndDate: 'Baseline End Date',
|
|
13617
13801
|
taskMode: 'Task Mode',
|
|
@@ -14309,6 +14493,34 @@ let Gantt = class Gantt extends Component {
|
|
|
14309
14493
|
this.editModule.outdent();
|
|
14310
14494
|
}
|
|
14311
14495
|
}
|
|
14496
|
+
/**
|
|
14497
|
+
* To render the critical path tasks in Gantt.
|
|
14498
|
+
*
|
|
14499
|
+
* @returns {void} .
|
|
14500
|
+
* @param {boolean} isCritical- whether to render critical path or not .
|
|
14501
|
+
* @public
|
|
14502
|
+
*/
|
|
14503
|
+
showCriticalPath(isCritical) {
|
|
14504
|
+
if (this.criticalPathModule) {
|
|
14505
|
+
this.criticalPathModule.showCriticalPath(isCritical);
|
|
14506
|
+
let criticalModule = this.criticalPathModule;
|
|
14507
|
+
this.criticalPathModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
14508
|
+
}
|
|
14509
|
+
}
|
|
14510
|
+
/**
|
|
14511
|
+
* To get all the critical tasks in Gantt.
|
|
14512
|
+
*
|
|
14513
|
+
* @returns {IGanttData[]} .
|
|
14514
|
+
* @public
|
|
14515
|
+
*/
|
|
14516
|
+
getCriticalTasks() {
|
|
14517
|
+
if (!isNullOrUndefined(this.criticalPathModule) && this.enableCriticalPath) {
|
|
14518
|
+
return this.criticalPathModule.getCriticalTasks();
|
|
14519
|
+
}
|
|
14520
|
+
else {
|
|
14521
|
+
return null;
|
|
14522
|
+
}
|
|
14523
|
+
}
|
|
14312
14524
|
/**
|
|
14313
14525
|
* To perform Zoom in action on Gantt timeline.
|
|
14314
14526
|
*
|
|
@@ -15120,6 +15332,9 @@ __decorate([
|
|
|
15120
15332
|
__decorate([
|
|
15121
15333
|
Property(false)
|
|
15122
15334
|
], Gantt.prototype, "enableContextMenu", void 0);
|
|
15335
|
+
__decorate([
|
|
15336
|
+
Property(false)
|
|
15337
|
+
], Gantt.prototype, "enableCriticalPath", void 0);
|
|
15123
15338
|
__decorate([
|
|
15124
15339
|
Property()
|
|
15125
15340
|
], Gantt.prototype, "contextMenuItems", void 0);
|
|
@@ -15417,7 +15632,7 @@ class CellEdit {
|
|
|
15417
15632
|
return;
|
|
15418
15633
|
}
|
|
15419
15634
|
if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
|
|
15420
|
-
data['isManual']
|
|
15635
|
+
data['isManual'] === false) || this.parent.taskMode === 'Auto')) || field === taskSettings.duration
|
|
15421
15636
|
|| field === taskSettings.dependency || field === taskSettings.progress
|
|
15422
15637
|
|| field === taskSettings.work || field === 'taskType')) {
|
|
15423
15638
|
args.cancel = true;
|
|
@@ -15606,7 +15821,7 @@ class CellEdit {
|
|
|
15606
15821
|
const ganttProb = args.data.ganttProperties;
|
|
15607
15822
|
let currentValue = args.data[this.parent.taskFields.startDate];
|
|
15608
15823
|
currentValue = currentValue ? new Date(currentValue.getTime()) : null;
|
|
15609
|
-
currentValue = this.parent.dateValidationModule.checkStartDate(currentValue);
|
|
15824
|
+
currentValue = this.parent.dateValidationModule.checkStartDate(currentValue, ganttData.ganttProperties, ganttData.ganttProperties.isMilestone);
|
|
15610
15825
|
if (isNullOrUndefined(currentValue)) {
|
|
15611
15826
|
if (!ganttData.hasChildRecords) {
|
|
15612
15827
|
this.parent.setRecordValue('startDate', null, ganttProb, true);
|
|
@@ -15731,7 +15946,9 @@ class CellEdit {
|
|
|
15731
15946
|
const currentDuration = ganttProb.duration;
|
|
15732
15947
|
if (isNullOrUndefined(currentDuration)) {
|
|
15733
15948
|
this.parent.setRecordValue('isMilestone', false, ganttProb, true);
|
|
15734
|
-
this.parent.
|
|
15949
|
+
if (args.data[this.parent.taskFields.duration] != null) {
|
|
15950
|
+
this.parent.setRecordValue('endDate', null, ganttProb, true);
|
|
15951
|
+
}
|
|
15735
15952
|
}
|
|
15736
15953
|
else {
|
|
15737
15954
|
if (isNullOrUndefined(startDate) && !isNullOrUndefined(endDate)) {
|
|
@@ -16714,7 +16931,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
16714
16931
|
this.timerCount = this.parent.ganttChartModule.scrollObject.previousScroll.left;
|
|
16715
16932
|
this.startScrollTimer('left');
|
|
16716
16933
|
}
|
|
16717
|
-
else if (isConnectorLineEdit && ((mouseY +
|
|
16934
|
+
else if (isConnectorLineEdit && ((mouseY + 80) >
|
|
16718
16935
|
containerPosition.top + this.parent.ganttChartModule.chartBodyContainer.offsetHeight)) {
|
|
16719
16936
|
this.timerCount = this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
16720
16937
|
this.startScrollTimer('bottom');
|
|
@@ -17591,6 +17808,10 @@ class TaskbarEdit extends DateProcessor {
|
|
|
17591
17808
|
else {
|
|
17592
17809
|
this.parent.isOnEdit = false;
|
|
17593
17810
|
this.cancelTaskbarEditActionInMouseLeave();
|
|
17811
|
+
if (this.parent.enableCriticalPath && this.parent.criticalPathModule) {
|
|
17812
|
+
let criticalModule = this.parent.criticalPathModule;
|
|
17813
|
+
criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
17814
|
+
}
|
|
17594
17815
|
}
|
|
17595
17816
|
}
|
|
17596
17817
|
if (this.parent.viewType === 'ResourceView' && this.parent.enableMultiTaskbar && !isNullOrUndefined(this.taskBarEditElement)) {
|
|
@@ -20247,9 +20468,16 @@ class ConnectorLineEdit {
|
|
|
20247
20468
|
addHighlight(element) {
|
|
20248
20469
|
this.connectorLineElement = element;
|
|
20249
20470
|
addClass([element], [connectorLineHoverZIndex]);
|
|
20250
|
-
|
|
20251
|
-
|
|
20252
|
-
|
|
20471
|
+
if (element.querySelectorAll('.' + connectorLine)[0].classList.contains('e-criticalconnector-line')) {
|
|
20472
|
+
addClass(element.querySelectorAll('.' + connectorLine), [criticalConnectorLineHover]);
|
|
20473
|
+
addClass(element.querySelectorAll('.' + connectorLineRightArrow), [criticalConnectorLineRightArrowHover]);
|
|
20474
|
+
addClass(element.querySelectorAll('.' + connectorLineLeftArrow), [criticalConnectorLineLeftArrowHover]);
|
|
20475
|
+
}
|
|
20476
|
+
else {
|
|
20477
|
+
addClass(element.querySelectorAll('.' + connectorLine), [connectorLineHover]);
|
|
20478
|
+
addClass(element.querySelectorAll('.' + connectorLineRightArrow), [connectorLineRightArrowHover]);
|
|
20479
|
+
addClass(element.querySelectorAll('.' + connectorLineLeftArrow), [connectorLineLeftArrowHover]);
|
|
20480
|
+
}
|
|
20253
20481
|
}
|
|
20254
20482
|
/**
|
|
20255
20483
|
* To remove connector line highlight class.
|
|
@@ -20260,9 +20488,16 @@ class ConnectorLineEdit {
|
|
|
20260
20488
|
removeHighlight() {
|
|
20261
20489
|
if (!isNullOrUndefined(this.connectorLineElement)) {
|
|
20262
20490
|
removeClass([this.connectorLineElement], [connectorLineHoverZIndex]);
|
|
20263
|
-
|
|
20264
|
-
|
|
20265
|
-
|
|
20491
|
+
if (this.connectorLineElement.querySelectorAll('.' + connectorLine)[0].classList.contains(criticalConnectorLineHover)) {
|
|
20492
|
+
removeClass(this.connectorLineElement.querySelectorAll('.' + connectorLine), [criticalConnectorLineHover]);
|
|
20493
|
+
removeClass(this.connectorLineElement.querySelectorAll('.' + connectorLineRightArrow), [criticalConnectorLineRightArrowHover]);
|
|
20494
|
+
removeClass(this.connectorLineElement.querySelectorAll('.' + connectorLineLeftArrow), [criticalConnectorLineLeftArrowHover]);
|
|
20495
|
+
}
|
|
20496
|
+
else {
|
|
20497
|
+
removeClass(this.connectorLineElement.querySelectorAll('.' + connectorLine), [connectorLineHover]);
|
|
20498
|
+
removeClass(this.connectorLineElement.querySelectorAll('.' + connectorLineRightArrow), [connectorLineRightArrowHover]);
|
|
20499
|
+
removeClass(this.connectorLineElement.querySelectorAll('.' + connectorLineLeftArrow), [connectorLineLeftArrowHover]);
|
|
20500
|
+
}
|
|
20266
20501
|
this.connectorLineElement = null;
|
|
20267
20502
|
}
|
|
20268
20503
|
}
|
|
@@ -21441,6 +21676,9 @@ class Edit$2 {
|
|
|
21441
21676
|
}
|
|
21442
21677
|
if ((key === tasks.baselineStartDate || key === tasks.baselineEndDate) &&
|
|
21443
21678
|
(ganttData.ganttProperties.baselineStartDate && ganttData.ganttProperties.baselineEndDate)) {
|
|
21679
|
+
ganttObj.setRecordValue('baselineStartDate', ganttObj.dataOperation.checkBaselineStartDate(ganttData.ganttProperties.baselineStartDate), ganttData.ganttProperties, true);
|
|
21680
|
+
ganttObj.dataOperation.setTime(this.parent.defaultEndTime, ganttData.ganttProperties.baselineEndDate);
|
|
21681
|
+
ganttObj.setRecordValue('baselineEndDate', ganttObj.dataOperation.checkBaselineEndDate(ganttData.ganttProperties.baselineEndDate), ganttData.ganttProperties, true);
|
|
21444
21682
|
ganttObj.setRecordValue('baselineLeft', ganttObj.dataOperation.calculateBaselineLeft(ganttData.ganttProperties), ganttData.ganttProperties, true);
|
|
21445
21683
|
ganttObj.setRecordValue('baselineWidth', ganttObj.dataOperation.calculateBaselineWidth(ganttData.ganttProperties), ganttData.ganttProperties, true);
|
|
21446
21684
|
}
|
|
@@ -22202,6 +22440,11 @@ class Edit$2 {
|
|
|
22202
22440
|
eventArgs.taskBarEditAction = args.taskBarEditAction;
|
|
22203
22441
|
}
|
|
22204
22442
|
this.endEditAction(args);
|
|
22443
|
+
if (this.parent.enableCriticalPath) {
|
|
22444
|
+
let criticalModule = this.parent.criticalPathModule;
|
|
22445
|
+
criticalModule.showCriticalPath(true);
|
|
22446
|
+
criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
22447
|
+
}
|
|
22205
22448
|
this.parent.trigger('actionComplete', eventArgs);
|
|
22206
22449
|
}
|
|
22207
22450
|
else {
|
|
@@ -22536,6 +22779,8 @@ class Edit$2 {
|
|
|
22536
22779
|
}
|
|
22537
22780
|
else {
|
|
22538
22781
|
this.deleteSelectedItems();
|
|
22782
|
+
const focusingElement = this.parent.element.querySelector('.e-treegrid');
|
|
22783
|
+
focusingElement.focus();
|
|
22539
22784
|
}
|
|
22540
22785
|
}
|
|
22541
22786
|
}
|
|
@@ -23405,7 +23650,17 @@ class Edit$2 {
|
|
|
23405
23650
|
this.refreshRecordInImmutableMode();
|
|
23406
23651
|
}
|
|
23407
23652
|
}
|
|
23408
|
-
refreshRecordInImmutableMode() {
|
|
23653
|
+
refreshRecordInImmutableMode(data, dragged) {
|
|
23654
|
+
if (!dragged && !isNullOrUndefined(data)) {
|
|
23655
|
+
for (let i = data[0].index + 1; i < this.parent.currentViewData.length; i++) {
|
|
23656
|
+
if (data[0].level < this.parent.currentViewData[i].level) {
|
|
23657
|
+
this.parent.modifiedRecords.push(this.parent.currentViewData[i]);
|
|
23658
|
+
}
|
|
23659
|
+
else {
|
|
23660
|
+
break;
|
|
23661
|
+
}
|
|
23662
|
+
}
|
|
23663
|
+
}
|
|
23409
23664
|
for (let i = 0; i < this.parent.modifiedRecords.length; i++) {
|
|
23410
23665
|
const originalData = this.parent.modifiedRecords[i];
|
|
23411
23666
|
let treeIndex = this.parent.allowRowDragAndDrop ? 1 : 0;
|
|
@@ -23567,7 +23822,13 @@ class Edit$2 {
|
|
|
23567
23822
|
const insertCrud = data.insert(updatedData[addedRecords], null, query);
|
|
23568
23823
|
insertCrud.then((e) => {
|
|
23569
23824
|
const changedRecords = 'changedRecords';
|
|
23570
|
-
|
|
23825
|
+
let addedRecords;
|
|
23826
|
+
if (!isNullOrUndefined(e[0])) {
|
|
23827
|
+
addedRecords = e[0];
|
|
23828
|
+
}
|
|
23829
|
+
else {
|
|
23830
|
+
addedRecords = updatedData['addedRecords'][0];
|
|
23831
|
+
}
|
|
23571
23832
|
/* tslint:disable-next-line */
|
|
23572
23833
|
const updateCrud = data.update(this.parent.taskFields.id, updatedData[changedRecords], null, query);
|
|
23573
23834
|
updateCrud.then(() => {
|
|
@@ -24112,7 +24373,7 @@ class Edit$2 {
|
|
|
24112
24373
|
this.parent.treeGrid.parentData = [];
|
|
24113
24374
|
this.parent.treeGrid.refresh();
|
|
24114
24375
|
if (this.parent.enableImmutableMode) {
|
|
24115
|
-
this.refreshRecordInImmutableMode();
|
|
24376
|
+
this.refreshRecordInImmutableMode(args.data, isDrag);
|
|
24116
24377
|
}
|
|
24117
24378
|
if (isDrag) {
|
|
24118
24379
|
args.requestType = 'rowDropped';
|
|
@@ -24724,7 +24985,7 @@ class Filter$1 {
|
|
|
24724
24985
|
const ganttElement = closest(element, '#' + this.parent.element.id)
|
|
24725
24986
|
|| element.querySelector('#' + this.parent.element.id);
|
|
24726
24987
|
if ((!(this.filterMenuElement.contains(element)) && !isNullOrUndefined(ganttElement)) || (!(this.filterMenuElement.contains(element)) && (isNullOrUndefined(datePickerElement))
|
|
24727
|
-
&& (isNullOrUndefined(dateTimePickerElement)) && ((element.nodeName === 'DIV') || (element.nodeName === 'HTML')))) {
|
|
24988
|
+
&& (isNullOrUndefined(dateTimePickerElement)) && ((element.nodeName === 'DIV') || (element.nodeName === 'HTML') || (element.nodeName === 'SPAN') || (element.nodeName === 'BUTTON')))) {
|
|
24728
24989
|
remove(this.filterMenuElement);
|
|
24729
24990
|
this.parent.treeGrid.grid.notify('filter-menu-close', { isOpen: false });
|
|
24730
24991
|
this.filterMenuElement = null;
|
|
@@ -25370,6 +25631,9 @@ class Selection$1 {
|
|
|
25370
25631
|
this.popUpClickHandler(e);
|
|
25371
25632
|
if (this.parent.selectionSettings.mode !== 'Cell' && isSelected) {
|
|
25372
25633
|
if (closest(e.target, 'tr.e-chart-row')) {
|
|
25634
|
+
if (this.parent.enableVirtualization) {
|
|
25635
|
+
this.parent.treeGrid.grid.selectionModule.isInteracted = true;
|
|
25636
|
+
}
|
|
25373
25637
|
this.highlightSelectedRows(e, true);
|
|
25374
25638
|
}
|
|
25375
25639
|
else {
|
|
@@ -25428,7 +25692,7 @@ class Toolbar$3 {
|
|
|
25428
25692
|
this.predefinedItems = {};
|
|
25429
25693
|
this.items = ['Add', 'Edit', 'Update', 'Delete', 'Cancel', 'ExpandAll', 'CollapseAll', 'Search',
|
|
25430
25694
|
'PrevTimeSpan', 'NextTimeSpan', 'ZoomIn', 'ZoomOut', 'ZoomToFit', 'ExcelExport',
|
|
25431
|
-
'CsvExport', 'PdfExport', 'Indent', 'Outdent'];
|
|
25695
|
+
'CsvExport', 'PdfExport', 'Indent', 'Outdent', 'CriticalPath'];
|
|
25432
25696
|
this.parent = parent;
|
|
25433
25697
|
this.id = this.parent.element.id;
|
|
25434
25698
|
this.parent.on('ui-toolbarupdate', this.propertyChanged, this);
|
|
@@ -25452,10 +25716,18 @@ class Toolbar$3 {
|
|
|
25452
25716
|
}
|
|
25453
25717
|
const preItems = ['Add', 'Edit', 'Update', 'Delete', 'Cancel', 'ExpandAll', 'CollapseAll',
|
|
25454
25718
|
'PrevTimeSpan', 'NextTimeSpan', 'ZoomIn', 'ZoomOut', 'ZoomToFit', 'ExcelExport', 'CsvExport',
|
|
25455
|
-
'PdfExport', 'Indent', 'Outdent'];
|
|
25719
|
+
'PdfExport', 'Indent', 'Outdent', 'CriticalPath'];
|
|
25456
25720
|
for (const item of preItems) {
|
|
25457
|
-
|
|
25458
|
-
|
|
25721
|
+
let itemStr;
|
|
25722
|
+
let localeName;
|
|
25723
|
+
if (item === 'CriticalPath') {
|
|
25724
|
+
itemStr = "critical-path";
|
|
25725
|
+
localeName = "criticalPath";
|
|
25726
|
+
}
|
|
25727
|
+
else {
|
|
25728
|
+
itemStr = item.toLowerCase();
|
|
25729
|
+
localeName = item[0].toLowerCase() + item.slice(1);
|
|
25730
|
+
}
|
|
25459
25731
|
this.predefinedItems[item] = {
|
|
25460
25732
|
id: this.parent.element.id + '_' + itemStr, prefixIcon: 'e-' + itemStr,
|
|
25461
25733
|
text: this.parent.isAdaptive ? '' : this.parent.localeObj.getConstant(localeName),
|
|
@@ -25656,6 +25928,14 @@ class Toolbar$3 {
|
|
|
25656
25928
|
gObj.indent();
|
|
25657
25929
|
}
|
|
25658
25930
|
break;
|
|
25931
|
+
case gID + '_critical-path':
|
|
25932
|
+
if (gObj.enableCriticalPath) {
|
|
25933
|
+
gObj.enableCriticalPath = false;
|
|
25934
|
+
}
|
|
25935
|
+
else {
|
|
25936
|
+
gObj.enableCriticalPath = true;
|
|
25937
|
+
}
|
|
25938
|
+
break;
|
|
25659
25939
|
case gID + '_outdent':
|
|
25660
25940
|
if (gObj.editModule && gObj.selectionModule.getSelectedRecords().length) {
|
|
25661
25941
|
gObj.outdent();
|
|
@@ -25954,8 +26234,9 @@ class NonWorkingDay {
|
|
|
25954
26234
|
let toDate;
|
|
25955
26235
|
const container = createElement('div');
|
|
25956
26236
|
const height = this.parent.contentHeight;
|
|
26237
|
+
// eslint-disable-next-line
|
|
25957
26238
|
let toolbarHeight = 0;
|
|
25958
|
-
if (!isNullOrUndefined(this.parent.toolbarModule)) {
|
|
26239
|
+
if (!isNullOrUndefined(this.parent.toolbarModule) && !isNullOrUndefined(this.parent.toolbarModule.element)) {
|
|
25959
26240
|
toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
|
|
25960
26241
|
}
|
|
25961
26242
|
const viewportHeight = this.parent.ganttHeight - toolbarHeight - this.parent.ganttChartModule.chartTimelineContainer.offsetHeight;
|
|
@@ -26060,6 +26341,7 @@ class NonWorkingDay {
|
|
|
26060
26341
|
}
|
|
26061
26342
|
updateHolidayLabelHeight() {
|
|
26062
26343
|
const height = this.parent.getContentHeight();
|
|
26344
|
+
// eslint-disable-next-line
|
|
26063
26345
|
let toolbarHeight = 0;
|
|
26064
26346
|
if (!isNullOrUndefined(this.parent.toolbarModule) && !isNullOrUndefined(this.parent.toolbarModule.element)) {
|
|
26065
26347
|
toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
|
|
@@ -26261,6 +26543,737 @@ class DayMarkers {
|
|
|
26261
26543
|
}
|
|
26262
26544
|
}
|
|
26263
26545
|
|
|
26546
|
+
class CriticalPath {
|
|
26547
|
+
constructor(parent) {
|
|
26548
|
+
this.resourceCollectionIds = [];
|
|
26549
|
+
this.criticalTasks = [];
|
|
26550
|
+
this.parent = parent;
|
|
26551
|
+
}
|
|
26552
|
+
getCriticalTasks() {
|
|
26553
|
+
return this.criticalTasks;
|
|
26554
|
+
}
|
|
26555
|
+
showCriticalPath(isCritical) {
|
|
26556
|
+
const modelIds = this.parent.ids;
|
|
26557
|
+
const totalRecords = this.parent.flatData;
|
|
26558
|
+
if (isCritical && this.parent.flatData.length > 0 && !this.parent.enableMultiTaskbar) {
|
|
26559
|
+
this.parent.enableCriticalPath = true;
|
|
26560
|
+
const parentRecords = this.parent.treeGrid.parentData;
|
|
26561
|
+
let checkEndDateTaskid;
|
|
26562
|
+
let checkEndDate = parentRecords[0].ganttProperties.endDate;
|
|
26563
|
+
let dateDifference = 0;
|
|
26564
|
+
const checkBeyondEnddate = [];
|
|
26565
|
+
const totalPredecessorsCollection = [];
|
|
26566
|
+
const totalPredecessorsCollectionId = [];
|
|
26567
|
+
let predecessorIndex = 0;
|
|
26568
|
+
const taskBeyondEnddate = [];
|
|
26569
|
+
const predecessorTaskBeyondEnddate = [];
|
|
26570
|
+
const collection = [];
|
|
26571
|
+
const collectionTaskId = [];
|
|
26572
|
+
const fromDataObject = [];
|
|
26573
|
+
let criticalPathIds = [];
|
|
26574
|
+
/* eslint-disable-next-line */
|
|
26575
|
+
if (parentRecords[0].ganttProperties.autoEndDate > parentRecords[0].ganttProperties.endDate && !parentRecords[0].ganttProperties.isAutoSchedule) {
|
|
26576
|
+
checkEndDate = parentRecords[0].ganttProperties.autoEndDate;
|
|
26577
|
+
}
|
|
26578
|
+
checkEndDateTaskid = parentRecords[0].ganttProperties.taskId;
|
|
26579
|
+
// Find the total project endDate
|
|
26580
|
+
for (let i = 1; i < parentRecords.length; i++) {
|
|
26581
|
+
if (parentRecords[i].ganttProperties.endDate >= checkEndDate) {
|
|
26582
|
+
checkEndDate = parentRecords[i].ganttProperties.endDate;
|
|
26583
|
+
checkEndDateTaskid = parentRecords[i].ganttProperties.taskId;
|
|
26584
|
+
}
|
|
26585
|
+
if (!parentRecords[i].ganttProperties.isAutoSchedule) {
|
|
26586
|
+
if (parentRecords[i].ganttProperties.autoEndDate >= checkEndDate) {
|
|
26587
|
+
checkEndDate = parentRecords[i].ganttProperties.autoEndDate;
|
|
26588
|
+
checkEndDateTaskid = parentRecords[i].ganttProperties.taskId;
|
|
26589
|
+
}
|
|
26590
|
+
}
|
|
26591
|
+
}
|
|
26592
|
+
this.maxEndDate = checkEndDate;
|
|
26593
|
+
// find the tasks that ends on total project end date that stored in checkBeyondEnddate
|
|
26594
|
+
// find the tasks with predecessor that stored in totalPredecessorsCollectionId.
|
|
26595
|
+
for (let j = 0; j < totalRecords.length; j++) {
|
|
26596
|
+
totalRecords[j].isCritical = false;
|
|
26597
|
+
totalRecords[j].ganttProperties.isCritical = false;
|
|
26598
|
+
/* eslint-disable-next-line */
|
|
26599
|
+
dateDifference = this.parent.dataOperation.getDuration(totalRecords[j].ganttProperties.endDate, checkEndDate, totalRecords[j].ganttProperties.durationUnit, totalRecords[j].ganttProperties.isAutoSchedule, totalRecords[j].ganttProperties.isMilestone);
|
|
26600
|
+
totalRecords[j].slack = dateDifference + ' ' + totalRecords[j].ganttProperties.durationUnit;
|
|
26601
|
+
totalRecords[j].ganttProperties.slack = dateDifference + ' ' + totalRecords[j].ganttProperties.durationUnit;
|
|
26602
|
+
if (totalRecords[j].ganttProperties.endDate >= checkEndDate) {
|
|
26603
|
+
checkBeyondEnddate.push(parseInt(totalRecords[j].ganttProperties.taskId, 10));
|
|
26604
|
+
}
|
|
26605
|
+
if (totalRecords[j].ganttProperties.predecessor) {
|
|
26606
|
+
if (totalRecords[j].ganttProperties.predecessor.length !== 0) {
|
|
26607
|
+
totalPredecessorsCollection.push(totalRecords[j]);
|
|
26608
|
+
totalPredecessorsCollectionId.push(parseInt(totalRecords[j].ganttProperties.taskId, 10));
|
|
26609
|
+
}
|
|
26610
|
+
}
|
|
26611
|
+
}
|
|
26612
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
26613
|
+
for (let i = 0; i < this.parent.taskIds.length; i++) {
|
|
26614
|
+
this.resourceCollectionIds[i] = this.parent.taskIds[i].slice(1);
|
|
26615
|
+
}
|
|
26616
|
+
}
|
|
26617
|
+
// seperate the predecessor connected taskes from the individual taskes that ends on total project end date
|
|
26618
|
+
for (let k = 0; k < checkBeyondEnddate.length; k++) {
|
|
26619
|
+
if (totalPredecessorsCollectionId.indexOf(checkBeyondEnddate[k]) === -1) {
|
|
26620
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
26621
|
+
predecessorIndex = modelIds.indexOf(checkBeyondEnddate[k].toString());
|
|
26622
|
+
}
|
|
26623
|
+
else {
|
|
26624
|
+
predecessorIndex = this.resourceCollectionIds.indexOf(checkBeyondEnddate[k].toString());
|
|
26625
|
+
}
|
|
26626
|
+
if (totalRecords[predecessorIndex].ganttProperties.progress < 100) {
|
|
26627
|
+
totalRecords[predecessorIndex].isCritical = true;
|
|
26628
|
+
totalRecords[predecessorIndex].ganttProperties.isCritical = true;
|
|
26629
|
+
}
|
|
26630
|
+
totalRecords[predecessorIndex]['slack'] = 0 + ' ' + totalRecords[predecessorIndex].ganttProperties.durationUnit;
|
|
26631
|
+
taskBeyondEnddate.push(checkBeyondEnddate[k]);
|
|
26632
|
+
}
|
|
26633
|
+
else {
|
|
26634
|
+
predecessorTaskBeyondEnddate.push(checkBeyondEnddate[k]);
|
|
26635
|
+
}
|
|
26636
|
+
}
|
|
26637
|
+
const predecessorLength = totalPredecessorsCollection.length;
|
|
26638
|
+
const endTask = [];
|
|
26639
|
+
// find the detail collection of predecessor for each taskes that stored in collection.
|
|
26640
|
+
for (let x = 0; x < predecessorLength; x++) {
|
|
26641
|
+
let to = -1;
|
|
26642
|
+
let from = -1;
|
|
26643
|
+
let toPredecessor = -1;
|
|
26644
|
+
let fromPredecessor = -1;
|
|
26645
|
+
const currentIndex = x;
|
|
26646
|
+
const predecessor = totalPredecessorsCollection[x].ganttProperties.predecessor;
|
|
26647
|
+
const individualPredecessorLength = totalPredecessorsCollection[x].ganttProperties.predecessor.length;
|
|
26648
|
+
const taskid = (parseInt(totalPredecessorsCollection[x].ganttProperties.taskId, 10));
|
|
26649
|
+
for (let y = 0; y < individualPredecessorLength; y++) {
|
|
26650
|
+
if (parseInt(predecessor[y].from, 10) === taskid) {
|
|
26651
|
+
if (to === -1) {
|
|
26652
|
+
if (!predecessor[y].offset) {
|
|
26653
|
+
to = predecessor[y].to;
|
|
26654
|
+
toPredecessor = predecessor[y].type;
|
|
26655
|
+
}
|
|
26656
|
+
else {
|
|
26657
|
+
to = predecessor[y].to + ':' + predecessor[y].offset + predecessor[y].offsetUnit;
|
|
26658
|
+
toPredecessor = predecessor[y].type;
|
|
26659
|
+
}
|
|
26660
|
+
}
|
|
26661
|
+
else {
|
|
26662
|
+
if (!predecessor[y].offset) {
|
|
26663
|
+
to = to + ',' + predecessor[y].to;
|
|
26664
|
+
toPredecessor = toPredecessor + ',' + predecessor[y].type;
|
|
26665
|
+
}
|
|
26666
|
+
else {
|
|
26667
|
+
to = to + ',' + predecessor[y].to + ':' + predecessor[y].offset + predecessor[y].offsetUnit;
|
|
26668
|
+
toPredecessor = toPredecessor + ',' + predecessor[y].type;
|
|
26669
|
+
}
|
|
26670
|
+
}
|
|
26671
|
+
}
|
|
26672
|
+
if (parseInt(predecessor[y].to, 10) === taskid) {
|
|
26673
|
+
if (from === -1) {
|
|
26674
|
+
if (!predecessor[y].offset) {
|
|
26675
|
+
from = predecessor[y].from;
|
|
26676
|
+
fromPredecessor = predecessor[y].type;
|
|
26677
|
+
}
|
|
26678
|
+
else {
|
|
26679
|
+
from = predecessor[y].from + ':' + predecessor[y].offset + predecessor[y].offsetUnit;
|
|
26680
|
+
fromPredecessor = predecessor[y].type;
|
|
26681
|
+
}
|
|
26682
|
+
}
|
|
26683
|
+
else {
|
|
26684
|
+
if (!predecessor[y].offset) {
|
|
26685
|
+
from = from + ',' + predecessor[y].from;
|
|
26686
|
+
fromPredecessor = fromPredecessor + ',' + predecessor[y].type;
|
|
26687
|
+
}
|
|
26688
|
+
else {
|
|
26689
|
+
from = from + ',' + predecessor[y].from + ':' + predecessor[y].offset + predecessor[y].offsetUnit;
|
|
26690
|
+
fromPredecessor = fromPredecessor + ',' + predecessor[y].type;
|
|
26691
|
+
}
|
|
26692
|
+
}
|
|
26693
|
+
}
|
|
26694
|
+
}
|
|
26695
|
+
if (from === -1) {
|
|
26696
|
+
from = null;
|
|
26697
|
+
fromPredecessor = null;
|
|
26698
|
+
}
|
|
26699
|
+
if (to === -1) {
|
|
26700
|
+
to = null;
|
|
26701
|
+
toPredecessor = null;
|
|
26702
|
+
}
|
|
26703
|
+
/* eslint-disable-next-line */
|
|
26704
|
+
collection.push({ from: from, fromPredecessor: fromPredecessor, taskid: taskid, to: to, toPredecessor: toPredecessor, currentIndex: currentIndex, slack: null, enddate: null });
|
|
26705
|
+
collectionTaskId.push(taskid);
|
|
26706
|
+
}
|
|
26707
|
+
const collectionLength = collection.length;
|
|
26708
|
+
let indexEnddate = 0;
|
|
26709
|
+
let num;
|
|
26710
|
+
// find the predecessors connected taskes that does not contains any successor.
|
|
26711
|
+
for (let z = 0; z < collectionLength; z++) {
|
|
26712
|
+
if (!collection[z]['to']) {
|
|
26713
|
+
num = collection[z]['taskid'];
|
|
26714
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
26715
|
+
indexEnddate = modelIds.indexOf(num.toString());
|
|
26716
|
+
}
|
|
26717
|
+
else {
|
|
26718
|
+
indexEnddate = this.resourceCollectionIds.indexOf(num.toString());
|
|
26719
|
+
}
|
|
26720
|
+
const flatData = totalRecords[indexEnddate].ganttProperties;
|
|
26721
|
+
/* eslint-disable-next-line */
|
|
26722
|
+
dateDifference = this.parent.dataOperation.getDuration(flatData.endDate, checkEndDate, 'minute', flatData.isAutoSchedule, flatData.isMilestone);
|
|
26723
|
+
collection[z]['slack'] = dateDifference;
|
|
26724
|
+
collection[z]['fs'] = -1;
|
|
26725
|
+
collection[z]['enddate'] = flatData.endDate;
|
|
26726
|
+
endTask.push({
|
|
26727
|
+
fromdata: collection[z]['from'], todateID: collection[z]['taskid'],
|
|
26728
|
+
fromDataPredecessor: collection[z]['fromPredecessor']
|
|
26729
|
+
});
|
|
26730
|
+
}
|
|
26731
|
+
}
|
|
26732
|
+
for (let k = 0; k < endTask.length; k++) {
|
|
26733
|
+
fromDataObject.push(endTask[k]);
|
|
26734
|
+
this.slackCalculation(fromDataObject, collection, collectionTaskId, checkEndDate, totalRecords, modelIds);
|
|
26735
|
+
}
|
|
26736
|
+
criticalPathIds = this.finalCriticalPath(collection, taskBeyondEnddate, totalRecords, modelIds, checkEndDate);
|
|
26737
|
+
this.criticalPathCollection = criticalPathIds;
|
|
26738
|
+
this.detailPredecessorCollection = collection;
|
|
26739
|
+
this.predecessorCollectionTaskIds = collectionTaskId;
|
|
26740
|
+
}
|
|
26741
|
+
if (isCritical === false && this.parent.flatData.length > 0 && !this.parent.enableMultiTaskbar) {
|
|
26742
|
+
let pathIndex;
|
|
26743
|
+
this.parent.enableCriticalPath = false;
|
|
26744
|
+
for (let z = 0; z < this.criticalPathCollection.length; z++) {
|
|
26745
|
+
pathIndex = modelIds.indexOf(this.criticalPathCollection[z].toString());
|
|
26746
|
+
totalRecords[pathIndex].isCritical = false;
|
|
26747
|
+
}
|
|
26748
|
+
this.criticalPathCollection = [];
|
|
26749
|
+
this.detailPredecessorCollection = [];
|
|
26750
|
+
this.predecessorCollectionTaskIds = [];
|
|
26751
|
+
}
|
|
26752
|
+
}
|
|
26753
|
+
/* eslint-disable-next-line */
|
|
26754
|
+
slackCalculation(fromDataObject, collection, collectionTaskId, checkEndDate, flatRecords, modelRecordIds) {
|
|
26755
|
+
const fromDateArray = fromDataObject[0]['fromdata'].split(',');
|
|
26756
|
+
const fromDataPredecessor = fromDataObject[0]['fromDataPredecessor'].split(',');
|
|
26757
|
+
let fromDateArray1 = [];
|
|
26758
|
+
let fromTaskIdIndex;
|
|
26759
|
+
let indexFromTaskId;
|
|
26760
|
+
let indexToTaskId;
|
|
26761
|
+
let totaskId;
|
|
26762
|
+
let dateDifference;
|
|
26763
|
+
let prevTaskEnddate;
|
|
26764
|
+
let offsetInMillSec;
|
|
26765
|
+
let ffslack;
|
|
26766
|
+
for (let i = 0; i < fromDateArray.length; i++) {
|
|
26767
|
+
fromDateArray1 = fromDateArray[i].split(':');
|
|
26768
|
+
fromTaskIdIndex = collectionTaskId.indexOf(parseInt(fromDateArray1[0], 10));
|
|
26769
|
+
totaskId = collectionTaskId.indexOf(parseInt(fromDataObject[0]['todateID'], 10));
|
|
26770
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
26771
|
+
indexFromTaskId = modelRecordIds.indexOf(fromDateArray1[0].toString());
|
|
26772
|
+
indexToTaskId = modelRecordIds.indexOf(fromDataObject[0]['todateID'].toString());
|
|
26773
|
+
}
|
|
26774
|
+
else {
|
|
26775
|
+
indexFromTaskId = this.resourceCollectionIds.indexOf(fromDateArray1[0].toString());
|
|
26776
|
+
indexToTaskId = this.resourceCollectionIds.indexOf(fromDataObject[0]['todateID'].toString());
|
|
26777
|
+
}
|
|
26778
|
+
const fromIdFlatData = flatRecords[indexFromTaskId].ganttProperties;
|
|
26779
|
+
const toIdFlatData = flatRecords[indexToTaskId].ganttProperties;
|
|
26780
|
+
if (fromDateArray1.length > 1) {
|
|
26781
|
+
if (fromDateArray1[1].indexOf('hour') !== -1) {
|
|
26782
|
+
offsetInMillSec = parseFloat(fromDateArray1[1]) * 60;
|
|
26783
|
+
}
|
|
26784
|
+
else if (fromDateArray1[1].indexOf('day') !== -1) {
|
|
26785
|
+
offsetInMillSec = parseFloat(fromDateArray1[1]) * (this.parent.secondsPerDay / 3600) * 60;
|
|
26786
|
+
}
|
|
26787
|
+
else {
|
|
26788
|
+
offsetInMillSec = parseFloat(fromDateArray1[1]);
|
|
26789
|
+
}
|
|
26790
|
+
}
|
|
26791
|
+
// calculate slack value for the task contains predecessor connection in "finish to start".
|
|
26792
|
+
if (fromDataPredecessor[i] === 'FS') {
|
|
26793
|
+
if (fromIdFlatData.endDate > toIdFlatData.startDate) {
|
|
26794
|
+
/* eslint-disable-next-line */
|
|
26795
|
+
dateDifference = -(this.parent.dataOperation.getDuration(toIdFlatData.startDate, fromIdFlatData.endDate, 'minute', fromIdFlatData.isAutoSchedule, fromIdFlatData.isMilestone));
|
|
26796
|
+
}
|
|
26797
|
+
else {
|
|
26798
|
+
/* eslint-disable-next-line */
|
|
26799
|
+
dateDifference = this.parent.dataOperation.getDuration(fromIdFlatData.endDate, toIdFlatData.startDate, 'minute', fromIdFlatData.isAutoSchedule, fromIdFlatData.isMilestone);
|
|
26800
|
+
}
|
|
26801
|
+
// execute if the slack value is not set initially.
|
|
26802
|
+
if (isNullOrUndefined(collection[fromTaskIdIndex]['slack'])) {
|
|
26803
|
+
// execute if the offset value is not given.
|
|
26804
|
+
if (fromDateArray1.length <= 1) {
|
|
26805
|
+
if (collection[totaskId]['slack'] + dateDifference < 0) {
|
|
26806
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
26807
|
+
}
|
|
26808
|
+
else {
|
|
26809
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
26810
|
+
}
|
|
26811
|
+
}
|
|
26812
|
+
}
|
|
26813
|
+
// execute if the current calculated slack value is less than the previous slack value.
|
|
26814
|
+
else if (collection[fromTaskIdIndex]['slack'] > dateDifference && collection[fromTaskIdIndex]['slack'] !== 0) {
|
|
26815
|
+
// execute if the offset value is not given.
|
|
26816
|
+
if (fromDateArray1.length <= 1) {
|
|
26817
|
+
if (collection[totaskId]['slack'] + dateDifference < 0) {
|
|
26818
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
26819
|
+
}
|
|
26820
|
+
else {
|
|
26821
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
26822
|
+
}
|
|
26823
|
+
}
|
|
26824
|
+
}
|
|
26825
|
+
// execute if the offset value is given.
|
|
26826
|
+
if (fromDateArray1.length > 1) {
|
|
26827
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
26828
|
+
collection[fromTaskIdIndex]['slack'] = collection[fromTaskIdIndex]['slack'] - (offsetInMillSec);
|
|
26829
|
+
if (collection[fromTaskIdIndex]['slack'] < 0) {
|
|
26830
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
26831
|
+
}
|
|
26832
|
+
}
|
|
26833
|
+
collection[fromTaskIdIndex]['fs'] = 1;
|
|
26834
|
+
collection[fromTaskIdIndex]['fsslack'] = collection[fromTaskIdIndex]['slack'];
|
|
26835
|
+
collection[fromTaskIdIndex]['enddate'] = fromIdFlatData.startDate;
|
|
26836
|
+
if (fromIdFlatData.endDate >= checkEndDate && fromIdFlatData.endDate <= checkEndDate) {
|
|
26837
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
26838
|
+
}
|
|
26839
|
+
}
|
|
26840
|
+
// calculate slack value for the task contains predecessor connection in "start to start".
|
|
26841
|
+
if (fromDataPredecessor[i] === 'SS') {
|
|
26842
|
+
// It execute if the task is in auto mode.
|
|
26843
|
+
if (fromIdFlatData.isAutoSchedule) {
|
|
26844
|
+
if (fromIdFlatData.startDate > toIdFlatData.startDate) {
|
|
26845
|
+
/* eslint-disable-next-line */
|
|
26846
|
+
dateDifference = -(this.parent.dataOperation.getDuration(toIdFlatData.endDate, fromIdFlatData.startDate, 'minute', fromIdFlatData.isAutoSchedule, fromIdFlatData.isMilestone));
|
|
26847
|
+
}
|
|
26848
|
+
else {
|
|
26849
|
+
/* eslint-disable-next-line */
|
|
26850
|
+
dateDifference = this.parent.dataOperation.getDuration(fromIdFlatData.startDate, toIdFlatData.startDate, 'minute', fromIdFlatData.isAutoSchedule, fromIdFlatData.isMilestone);
|
|
26851
|
+
}
|
|
26852
|
+
// It execute while the slack value is not set to the corresponding task.
|
|
26853
|
+
if (isNullOrUndefined(collection[fromTaskIdIndex]['slack'])) {
|
|
26854
|
+
if (fromDateArray1.length <= 1) {
|
|
26855
|
+
if (collection[totaskId]['slack'] + dateDifference < 0) {
|
|
26856
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
26857
|
+
}
|
|
26858
|
+
else {
|
|
26859
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
26860
|
+
}
|
|
26861
|
+
}
|
|
26862
|
+
}
|
|
26863
|
+
//It execute while already the slack value is set and it is higher than the datedifference.
|
|
26864
|
+
else if (collection[fromTaskIdIndex]['slack'] > dateDifference && collection[fromTaskIdIndex]['slack'] !== 0) {
|
|
26865
|
+
if (fromDateArray1.length <= 1) {
|
|
26866
|
+
if (collection[totaskId]['slack'] + dateDifference < 0) {
|
|
26867
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
26868
|
+
}
|
|
26869
|
+
else {
|
|
26870
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
26871
|
+
}
|
|
26872
|
+
}
|
|
26873
|
+
}
|
|
26874
|
+
// execute if the offset value is given.
|
|
26875
|
+
if (fromDateArray1.length > 1) {
|
|
26876
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
26877
|
+
collection[fromTaskIdIndex]['slack'] = collection[fromTaskIdIndex]['slack'] - (offsetInMillSec);
|
|
26878
|
+
if (collection[fromTaskIdIndex]['slack'] < 0) {
|
|
26879
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
26880
|
+
}
|
|
26881
|
+
}
|
|
26882
|
+
collection[fromTaskIdIndex]['fs'] = 1;
|
|
26883
|
+
collection[fromTaskIdIndex]['fsslack'] = collection[fromTaskIdIndex]['slack'];
|
|
26884
|
+
collection[fromTaskIdIndex]['enddate'] = fromIdFlatData.startDate;
|
|
26885
|
+
}
|
|
26886
|
+
// It execute if the task is in not an auto mode task.
|
|
26887
|
+
else if (!fromIdFlatData.isAutoSchedule) {
|
|
26888
|
+
dateDifference = this.getSlackDuration(fromIdFlatData.endDate, checkEndDate, 'minute', flatRecords[indexFromTaskId]);
|
|
26889
|
+
if (isNullOrUndefined(collection[fromTaskIdIndex]['slack'])) {
|
|
26890
|
+
collection[fromTaskIdIndex]['slack'] = dateDifference;
|
|
26891
|
+
}
|
|
26892
|
+
else if (collection[fromTaskIdIndex]['slack'] > dateDifference && collection[fromTaskIdIndex]['slack'] !== 0) {
|
|
26893
|
+
collection[fromTaskIdIndex]['slack'] = dateDifference;
|
|
26894
|
+
}
|
|
26895
|
+
}
|
|
26896
|
+
if (fromIdFlatData.endDate >= checkEndDate && fromIdFlatData.endDate <= checkEndDate) {
|
|
26897
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
26898
|
+
}
|
|
26899
|
+
}
|
|
26900
|
+
// calculate slack value for the task contains predecessor connection in "finish to finish".
|
|
26901
|
+
if (fromDataPredecessor[i] === 'FF') {
|
|
26902
|
+
// execute if the previous task is from finish to start or finish to finish state.
|
|
26903
|
+
if (collection[totaskId]['fs'] === 1 || collection[totaskId]['ff'] === 1 || collection[totaskId]['fs'] === -1) {
|
|
26904
|
+
if (collection[totaskId]['fs'] === 1 || collection[totaskId]['ff'] === 1) {
|
|
26905
|
+
prevTaskEnddate = toIdFlatData.endDate;
|
|
26906
|
+
ffslack = collection[totaskId]['slack'];
|
|
26907
|
+
}
|
|
26908
|
+
if (collection[totaskId]['fs'] === -1) {
|
|
26909
|
+
prevTaskEnddate = collection[totaskId]['enddate'];
|
|
26910
|
+
ffslack = collection[totaskId]['slack'];
|
|
26911
|
+
}
|
|
26912
|
+
if (prevTaskEnddate > fromIdFlatData.endDate) {
|
|
26913
|
+
dateDifference = -(this.getSlackDuration(fromIdFlatData.endDate, prevTaskEnddate, 'minute', flatRecords[indexFromTaskId]));
|
|
26914
|
+
}
|
|
26915
|
+
else {
|
|
26916
|
+
dateDifference = this.getSlackDuration(prevTaskEnddate, fromIdFlatData.endDate, 'minute', flatRecords[indexFromTaskId]);
|
|
26917
|
+
}
|
|
26918
|
+
// set the slack value if the slack value is not set initially.
|
|
26919
|
+
if (isNullOrUndefined(collection[fromTaskIdIndex]['slack'])) {
|
|
26920
|
+
// execute if the offset value is not given.
|
|
26921
|
+
if (fromDateArray1.length <= 1) {
|
|
26922
|
+
if (ffslack - dateDifference < 0) {
|
|
26923
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
26924
|
+
}
|
|
26925
|
+
else {
|
|
26926
|
+
collection[fromTaskIdIndex]['slack'] = ffslack - dateDifference;
|
|
26927
|
+
}
|
|
26928
|
+
}
|
|
26929
|
+
}
|
|
26930
|
+
// overright the slack value if the current calculated slack value is less than the previous slack value.
|
|
26931
|
+
else if (collection[fromTaskIdIndex]['slack'] > dateDifference && collection[fromTaskIdIndex]['slack'] !== 0) {
|
|
26932
|
+
// execute if the offset value is not given.
|
|
26933
|
+
if (fromDateArray1.length <= 1) {
|
|
26934
|
+
if (ffslack - dateDifference < 0) {
|
|
26935
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
26936
|
+
}
|
|
26937
|
+
else {
|
|
26938
|
+
collection[fromTaskIdIndex]['slack'] = ffslack - dateDifference;
|
|
26939
|
+
}
|
|
26940
|
+
}
|
|
26941
|
+
}
|
|
26942
|
+
// execute if the offset value is given.
|
|
26943
|
+
if (fromDateArray1.length > 1) {
|
|
26944
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] - dateDifference;
|
|
26945
|
+
collection[fromTaskIdIndex]['slack'] = collection[fromTaskIdIndex]['slack'] - (offsetInMillSec);
|
|
26946
|
+
if (collection[fromTaskIdIndex]['slack'] < 0) {
|
|
26947
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
26948
|
+
}
|
|
26949
|
+
}
|
|
26950
|
+
collection[fromTaskIdIndex]['ff'] = 1;
|
|
26951
|
+
collection[fromTaskIdIndex]['enddate'] = prevTaskEnddate;
|
|
26952
|
+
collection[fromTaskIdIndex]['fsslack'] = ffslack;
|
|
26953
|
+
}
|
|
26954
|
+
if (fromIdFlatData.endDate >= checkEndDate && fromIdFlatData.endDate <= checkEndDate) {
|
|
26955
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
26956
|
+
}
|
|
26957
|
+
}
|
|
26958
|
+
// calculate slack value for the task contains predecessor connection in "start to finish".
|
|
26959
|
+
if (fromDataPredecessor[i] === 'SF') {
|
|
26960
|
+
//It execute if the task is an auto mode task.
|
|
26961
|
+
if (fromIdFlatData.isAutoSchedule) {
|
|
26962
|
+
//execute if the slack value is not set initially.
|
|
26963
|
+
if (isNullOrUndefined(collection[fromTaskIdIndex]['slack'])) {
|
|
26964
|
+
// execute if the offset value is not given.
|
|
26965
|
+
if (fromDateArray1.length <= 1) {
|
|
26966
|
+
// execute if the previous task does no has sucessor.
|
|
26967
|
+
if (isNullOrUndefined(collection[totaskId]['to'])) {
|
|
26968
|
+
dateDifference = this.getSlackDuration(fromIdFlatData.endDate, checkEndDate, 'minute', flatRecords[indexFromTaskId]);
|
|
26969
|
+
collection[fromTaskIdIndex]['slack'] = dateDifference;
|
|
26970
|
+
}
|
|
26971
|
+
// execute if the previous task has sucessor.
|
|
26972
|
+
else if (!isNullOrUndefined(collection[totaskId]['to'])) {
|
|
26973
|
+
if (toIdFlatData.endDate > fromIdFlatData.startDate) {
|
|
26974
|
+
/* eslint-disable-next-line */
|
|
26975
|
+
dateDifference = -(this.parent.dataOperation.getDuration(fromIdFlatData.startDate, toIdFlatData.endDate, 'minute', fromIdFlatData.isAutoSchedule, fromIdFlatData.isMilestone));
|
|
26976
|
+
}
|
|
26977
|
+
else {
|
|
26978
|
+
dateDifference = this.getSlackDuration(toIdFlatData.endDate, fromIdFlatData.startDate, 'minute', flatRecords[indexFromTaskId]);
|
|
26979
|
+
}
|
|
26980
|
+
if (collection[totaskId]['slack'] + dateDifference < 0) {
|
|
26981
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
26982
|
+
}
|
|
26983
|
+
else {
|
|
26984
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
26985
|
+
}
|
|
26986
|
+
}
|
|
26987
|
+
}
|
|
26988
|
+
// execute if the offset value is given.
|
|
26989
|
+
else if (fromDateArray1.length > 1) {
|
|
26990
|
+
if (toIdFlatData.endDate >= fromIdFlatData.endDate) {
|
|
26991
|
+
if (fromIdFlatData.startDate > toIdFlatData.endDate) {
|
|
26992
|
+
/* eslint-disable-next-line */
|
|
26993
|
+
dateDifference = -(this.getSlackDuration(toIdFlatData.endDate, fromIdFlatData.startDate, 'minute', flatRecords[indexFromTaskId]));
|
|
26994
|
+
}
|
|
26995
|
+
else {
|
|
26996
|
+
/* eslint-disable-next-line */
|
|
26997
|
+
dateDifference = this.parent.dataOperation.getDuration(fromIdFlatData.startDate, toIdFlatData.endDate, 'minute', fromIdFlatData.isAutoSchedule, fromIdFlatData.isMilestone);
|
|
26998
|
+
}
|
|
26999
|
+
}
|
|
27000
|
+
else {
|
|
27001
|
+
dateDifference = this.getSlackDuration(fromIdFlatData.endDate, checkEndDate, 'minute', flatRecords[indexFromTaskId]);
|
|
27002
|
+
}
|
|
27003
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
27004
|
+
collection[fromTaskIdIndex]['slack'] = collection[fromTaskIdIndex]['slack'] - (offsetInMillSec);
|
|
27005
|
+
if (collection[fromTaskIdIndex]['slack'] < 0) {
|
|
27006
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27007
|
+
}
|
|
27008
|
+
}
|
|
27009
|
+
collection[fromTaskIdIndex]['fs'] = 1;
|
|
27010
|
+
collection[fromTaskIdIndex]['fsslack'] = collection[fromTaskIdIndex]['slack'];
|
|
27011
|
+
collection[fromTaskIdIndex]['enddate'] = fromIdFlatData.startDate;
|
|
27012
|
+
}
|
|
27013
|
+
else {
|
|
27014
|
+
if (fromDateArray1.length <= 1) {
|
|
27015
|
+
if (isNullOrUndefined(collection[totaskId]['to'])) {
|
|
27016
|
+
/* eslint-disable-next-line */
|
|
27017
|
+
dateDifference = this.getSlackDuration(fromIdFlatData.endDate, checkEndDate, 'minute', flatRecords[indexFromTaskId]);
|
|
27018
|
+
}
|
|
27019
|
+
else if (!isNullOrUndefined(collection[totaskId]['to'])) {
|
|
27020
|
+
if (toIdFlatData.endDate > fromIdFlatData.startDate) {
|
|
27021
|
+
// eslint-disable-next-line
|
|
27022
|
+
dateDifference = -(this.parent.dataOperation.getDuration(fromIdFlatData.startDate, toIdFlatData.endDate, 'minute', fromIdFlatData.isAutoSchedule, fromIdFlatData.isMilestone));
|
|
27023
|
+
}
|
|
27024
|
+
else {
|
|
27025
|
+
dateDifference = this.getSlackDuration(toIdFlatData.endDate, fromIdFlatData.startDate, 'minute', flatRecords[indexFromTaskId]);
|
|
27026
|
+
}
|
|
27027
|
+
}
|
|
27028
|
+
// execute if the current calculated slack value is less than the previous slack value.
|
|
27029
|
+
if (collection[fromTaskIdIndex]['slack'] > dateDifference && collection[fromTaskIdIndex]['slack'] !== 0) {
|
|
27030
|
+
if (isNullOrUndefined(collection[totaskId]['to'])) {
|
|
27031
|
+
collection[fromTaskIdIndex]['slack'] = dateDifference;
|
|
27032
|
+
}
|
|
27033
|
+
else if (!isNullOrUndefined(collection[totaskId]['to'])) {
|
|
27034
|
+
if (collection[totaskId]['slack'] + dateDifference < 0) {
|
|
27035
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27036
|
+
}
|
|
27037
|
+
else {
|
|
27038
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
27039
|
+
}
|
|
27040
|
+
}
|
|
27041
|
+
}
|
|
27042
|
+
}
|
|
27043
|
+
else if (fromDateArray1.length > 1) {
|
|
27044
|
+
if (toIdFlatData.endDate > fromIdFlatData.endDate) {
|
|
27045
|
+
if (fromIdFlatData.startDate > toIdFlatData.endDate) {
|
|
27046
|
+
/* eslint-disable-next-line */
|
|
27047
|
+
dateDifference = -(this.getSlackDuration(toIdFlatData.endDate, fromIdFlatData.startDate, 'minute', flatRecords[indexFromTaskId]));
|
|
27048
|
+
}
|
|
27049
|
+
else {
|
|
27050
|
+
// eslint-disable-next-line
|
|
27051
|
+
dateDifference = this.parent.dataOperation.getDuration(fromIdFlatData.startDate, toIdFlatData.endDate, 'minute', fromIdFlatData.isAutoSchedule, fromIdFlatData.isMilestone);
|
|
27052
|
+
}
|
|
27053
|
+
}
|
|
27054
|
+
else {
|
|
27055
|
+
/* eslint-disable-next-line */
|
|
27056
|
+
dateDifference = this.getSlackDuration(fromIdFlatData.endDate, checkEndDate, 'minute', flatRecords[indexFromTaskId]);
|
|
27057
|
+
}
|
|
27058
|
+
// execute if the current calculated slack value is less than the previous slack value.
|
|
27059
|
+
if (collection[fromTaskIdIndex]['slack'] > dateDifference && collection[fromTaskIdIndex]['slack'] !== 0) {
|
|
27060
|
+
collection[fromTaskIdIndex]['slack'] = collection[totaskId]['slack'] + dateDifference;
|
|
27061
|
+
collection[fromTaskIdIndex]['slack'] = collection[fromTaskIdIndex]['slack'] - (offsetInMillSec);
|
|
27062
|
+
if (collection[fromTaskIdIndex]['slack'] < 0) {
|
|
27063
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27064
|
+
}
|
|
27065
|
+
}
|
|
27066
|
+
}
|
|
27067
|
+
collection[fromTaskIdIndex]['fs'] = 1;
|
|
27068
|
+
collection[fromTaskIdIndex]['fsslack'] = collection[fromTaskIdIndex]['slack'];
|
|
27069
|
+
collection[fromTaskIdIndex]['enddate'] = fromIdFlatData.startDate;
|
|
27070
|
+
}
|
|
27071
|
+
}
|
|
27072
|
+
//It execute if the task is an auto mode task.
|
|
27073
|
+
else if (!fromIdFlatData.isAutoSchedule) {
|
|
27074
|
+
dateDifference = this.getSlackDuration(fromIdFlatData.endDate, checkEndDate, 'minute', flatRecords[indexFromTaskId]);
|
|
27075
|
+
if (isNullOrUndefined(collection[fromTaskIdIndex]['slack'])) {
|
|
27076
|
+
collection[fromTaskIdIndex]['slack'] = dateDifference;
|
|
27077
|
+
}
|
|
27078
|
+
else if (collection[fromTaskIdIndex]['slack'] > dateDifference && collection[fromTaskIdIndex]['slack'] !== 0) {
|
|
27079
|
+
collection[fromTaskIdIndex]['slack'] = dateDifference;
|
|
27080
|
+
}
|
|
27081
|
+
}
|
|
27082
|
+
if (fromIdFlatData.endDate >= checkEndDate && fromIdFlatData.endDate <= checkEndDate) {
|
|
27083
|
+
collection[fromTaskIdIndex]['slack'] = 0;
|
|
27084
|
+
}
|
|
27085
|
+
}
|
|
27086
|
+
if (collection[fromTaskIdIndex]['from']) {
|
|
27087
|
+
fromDataObject.push({
|
|
27088
|
+
fromdata: collection[fromTaskIdIndex]['from'], todateID: collection[fromTaskIdIndex]['taskid'],
|
|
27089
|
+
fromDataPredecessor: collection[fromTaskIdIndex]['fromPredecessor']
|
|
27090
|
+
});
|
|
27091
|
+
}
|
|
27092
|
+
}
|
|
27093
|
+
if (fromDataObject) {
|
|
27094
|
+
fromDataObject.splice(0, 1);
|
|
27095
|
+
if (fromDataObject.length > 0) {
|
|
27096
|
+
this.slackCalculation(fromDataObject, collection, collectionTaskId, checkEndDate, flatRecords, modelRecordIds);
|
|
27097
|
+
}
|
|
27098
|
+
}
|
|
27099
|
+
}
|
|
27100
|
+
getSlackDuration(sDate, eDate, durationUnit, record) {
|
|
27101
|
+
const startDate = this.parent.dateValidationModule.checkStartDate(new Date(sDate));
|
|
27102
|
+
const endDate = this.parent.dateValidationModule.checkEndDate(new Date(eDate));
|
|
27103
|
+
if (this.parent.dataOperation['getTimeDifference'](startDate, endDate, true) <= 0) {
|
|
27104
|
+
return 0;
|
|
27105
|
+
}
|
|
27106
|
+
else {
|
|
27107
|
+
return this.parent.dataOperation.getDuration(startDate, endDate, durationUnit, record.ganttProperties.isAutoSchedule, true);
|
|
27108
|
+
}
|
|
27109
|
+
}
|
|
27110
|
+
/* eslint-disable-next-line */
|
|
27111
|
+
finalCriticalPath(collection, taskBeyondEnddate, flatRecords, modelRecordIds, checkEndDate) {
|
|
27112
|
+
let criticalPathIds = [];
|
|
27113
|
+
let index;
|
|
27114
|
+
for (let x = collection.length - 1; x >= 0; x--) {
|
|
27115
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
27116
|
+
index = modelRecordIds.indexOf(collection[x]['taskid'].toString());
|
|
27117
|
+
}
|
|
27118
|
+
else {
|
|
27119
|
+
index = this.resourceCollectionIds.indexOf(collection[x]['taskid'].toString());
|
|
27120
|
+
}
|
|
27121
|
+
const predecessorLength = flatRecords[index].ganttProperties.predecessor;
|
|
27122
|
+
const noSlackValue = 0 + ' ' + flatRecords[index].ganttProperties.durationUnit;
|
|
27123
|
+
for (let i = 0; i < predecessorLength.length; i++) {
|
|
27124
|
+
let toID;
|
|
27125
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
27126
|
+
toID = this.parent.ids.indexOf(predecessorLength[i].to);
|
|
27127
|
+
}
|
|
27128
|
+
else {
|
|
27129
|
+
toID = this.resourceCollectionIds.indexOf(predecessorLength[i].to);
|
|
27130
|
+
}
|
|
27131
|
+
let dateDifference;
|
|
27132
|
+
const currentData = flatRecords[index].ganttProperties;
|
|
27133
|
+
if (predecessorLength[i].type === 'FS') {
|
|
27134
|
+
/* eslint-disable-next-line */
|
|
27135
|
+
dateDifference = this.parent.dataOperation.getDuration(currentData.endDate, flatRecords[toID].ganttProperties.startDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
27136
|
+
if (dateDifference === 0 && index !== toID && flatRecords[index].slack !== noSlackValue) {
|
|
27137
|
+
flatRecords[index].slack = flatRecords[toID].slack;
|
|
27138
|
+
flatRecords[index].ganttProperties.slack = flatRecords[toID].slack;
|
|
27139
|
+
}
|
|
27140
|
+
else if (dateDifference !== 0 && index !== toID && flatRecords[toID].isCritical) {
|
|
27141
|
+
flatRecords[index].slack = dateDifference + ' ' + flatRecords[index].ganttProperties.durationUnit;
|
|
27142
|
+
flatRecords[index].ganttProperties.slack = dateDifference + ' ' + flatRecords[index].ganttProperties.durationUnit;
|
|
27143
|
+
}
|
|
27144
|
+
}
|
|
27145
|
+
else if (predecessorLength[i].type === 'SF') {
|
|
27146
|
+
/* eslint-disable-next-line */
|
|
27147
|
+
dateDifference = this.parent.dataOperation.getDuration(currentData.startDate, flatRecords[toID].ganttProperties.endDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
27148
|
+
}
|
|
27149
|
+
else if (predecessorLength[i].type === 'SS') {
|
|
27150
|
+
/* eslint-disable-next-line */
|
|
27151
|
+
dateDifference = this.parent.dataOperation.getDuration(currentData.startDate, flatRecords[toID].ganttProperties.startDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
27152
|
+
}
|
|
27153
|
+
else {
|
|
27154
|
+
/* eslint-disable-next-line */
|
|
27155
|
+
dateDifference = this.parent.dataOperation.getDuration(currentData.endDate, flatRecords[toID].ganttProperties.endDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
27156
|
+
}
|
|
27157
|
+
if (parseInt(predecessorLength[i].from, 10) === flatRecords[index][this.parent.taskFields.id] &&
|
|
27158
|
+
flatRecords[toID].slack === noSlackValue && dateDifference <= 0) {
|
|
27159
|
+
flatRecords[index].slack = noSlackValue;
|
|
27160
|
+
flatRecords[index].ganttProperties.slack = noSlackValue;
|
|
27161
|
+
}
|
|
27162
|
+
}
|
|
27163
|
+
if (flatRecords[index].slack === noSlackValue) {
|
|
27164
|
+
if (flatRecords[index].ganttProperties.progress < 100) {
|
|
27165
|
+
flatRecords[index].isCritical = true;
|
|
27166
|
+
flatRecords[index].ganttProperties.isCritical = true;
|
|
27167
|
+
this.criticalTasks.push(flatRecords[index]);
|
|
27168
|
+
criticalPathIds.push(collection[x]['taskid']);
|
|
27169
|
+
}
|
|
27170
|
+
}
|
|
27171
|
+
}
|
|
27172
|
+
if (taskBeyondEnddate.length > 0) {
|
|
27173
|
+
for (let i = 0; i < taskBeyondEnddate.length; i++) {
|
|
27174
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
27175
|
+
index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
|
|
27176
|
+
}
|
|
27177
|
+
else {
|
|
27178
|
+
index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
|
|
27179
|
+
}
|
|
27180
|
+
if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
|
|
27181
|
+
this.criticalTasks.push(flatRecords[index]);
|
|
27182
|
+
criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
|
|
27183
|
+
}
|
|
27184
|
+
}
|
|
27185
|
+
}
|
|
27186
|
+
return criticalPathIds;
|
|
27187
|
+
}
|
|
27188
|
+
/* eslint-disable-next-line */
|
|
27189
|
+
criticalConnectorLine(criticalPathIds, collection, condition, collectionTaskId) {
|
|
27190
|
+
const ganttChartElement = this.parent.ganttChartModule.chartElement;
|
|
27191
|
+
removeClass(ganttChartElement.querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
|
|
27192
|
+
removeClass(ganttChartElement.querySelectorAll('.e-gantt-child-progressbar-inner-div'), criticalChildProgressBarInnerDiv);
|
|
27193
|
+
removeClass(ganttChartElement.querySelectorAll('.e-milestone-top'), criticalMilestoneTop);
|
|
27194
|
+
removeClass(ganttChartElement.querySelectorAll('.e-milestone-bottom'), criticalMilestoneBottom);
|
|
27195
|
+
for (let i = 0; i < criticalPathIds.length; i++) {
|
|
27196
|
+
let criticalData;
|
|
27197
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
27198
|
+
criticalData = this.parent.flatData[this.parent.ids.indexOf(criticalPathIds[i].toString())];
|
|
27199
|
+
}
|
|
27200
|
+
else {
|
|
27201
|
+
criticalData = this.parent.flatData[this.resourceCollectionIds.indexOf(criticalPathIds[i].toString())];
|
|
27202
|
+
}
|
|
27203
|
+
const index = this.parent.currentViewData.indexOf(criticalData);
|
|
27204
|
+
const element = this.parent.getRowByIndex(index);
|
|
27205
|
+
let taskClass;
|
|
27206
|
+
const columnFields = this.parent.taskFields;
|
|
27207
|
+
/* eslint-disable-next-line */
|
|
27208
|
+
if (this.parent.allowUnscheduledTasks && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
|
|
27209
|
+
taskClass = criticalUnscheduledTask;
|
|
27210
|
+
}
|
|
27211
|
+
else {
|
|
27212
|
+
taskClass = criticalChildProgressBarInnerDiv;
|
|
27213
|
+
}
|
|
27214
|
+
if (element) {
|
|
27215
|
+
if (element.getElementsByClassName('e-milestone-top')[0]) {
|
|
27216
|
+
addClass(element.querySelectorAll('.e-milestone-top'), criticalMilestoneTop);
|
|
27217
|
+
}
|
|
27218
|
+
if (element.getElementsByClassName('e-milestone-bottom')[0]) {
|
|
27219
|
+
addClass(element.querySelectorAll('.e-milestone-bottom'), criticalMilestoneBottom);
|
|
27220
|
+
}
|
|
27221
|
+
if (element.getElementsByClassName('e-gantt-child-taskbar-inner-div').length > 0) {
|
|
27222
|
+
addClass(element.querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
|
|
27223
|
+
}
|
|
27224
|
+
if (element.getElementsByClassName('e-gantt-child-progressbar-inner-div').length > 0) {
|
|
27225
|
+
addClass(element.querySelectorAll('.e-gantt-child-progressbar-inner-div'), taskClass);
|
|
27226
|
+
}
|
|
27227
|
+
}
|
|
27228
|
+
}
|
|
27229
|
+
removeClass(this.parent.element.querySelectorAll('.e-line'), criticalConnectorLine);
|
|
27230
|
+
removeClass(this.parent.element.querySelectorAll('.e-connector-line-right-arrow'), criticalConnectorLineRightArrow);
|
|
27231
|
+
removeClass(this.parent.element.querySelectorAll('.e-connector-line-left-arrow'), criticalConnectorLineLeftArrow);
|
|
27232
|
+
if (collection.length !== 0) {
|
|
27233
|
+
let index = 0;
|
|
27234
|
+
let currentdata;
|
|
27235
|
+
let checking = [];
|
|
27236
|
+
let checkint;
|
|
27237
|
+
for (let i = 0; i < this.criticalPathCollection.length; i++) {
|
|
27238
|
+
index = collectionTaskId.indexOf(this.criticalPathCollection[i]);
|
|
27239
|
+
currentdata = collection[index];
|
|
27240
|
+
if (index !== -1 && currentdata['to']) {
|
|
27241
|
+
checking = currentdata['to'].split(',');
|
|
27242
|
+
for (let j = 0; j < checking.length; j++) {
|
|
27243
|
+
checkint = parseInt(checking[j], 10);
|
|
27244
|
+
if (criticalPathIds.indexOf(checkint) !== -1) {
|
|
27245
|
+
const lineElement = this.parent.element.querySelectorAll('#ConnectorLineparent' +
|
|
27246
|
+
currentdata['taskid'] + 'child' + checkint);
|
|
27247
|
+
if (lineElement.length > 0) {
|
|
27248
|
+
addClass(this.parent.element.querySelectorAll('#ConnectorLineparent' + currentdata['taskid'] + 'child' +
|
|
27249
|
+
checkint)[0].querySelectorAll('.e-line'), criticalConnectorLine);
|
|
27250
|
+
addClass(this.parent.element.querySelectorAll('#ConnectorLineparent' + currentdata['taskid'] + 'child' +
|
|
27251
|
+
checkint)[0].querySelectorAll('.e-connector-line-right-arrow'), criticalConnectorLineRightArrow);
|
|
27252
|
+
addClass(this.parent.element.querySelectorAll('#ConnectorLineparent' + currentdata['taskid'] + 'child' +
|
|
27253
|
+
checkint)[0].querySelectorAll('.e-connector-line-left-arrow'), criticalConnectorLineLeftArrow);
|
|
27254
|
+
}
|
|
27255
|
+
}
|
|
27256
|
+
}
|
|
27257
|
+
}
|
|
27258
|
+
}
|
|
27259
|
+
}
|
|
27260
|
+
}
|
|
27261
|
+
getModuleName() {
|
|
27262
|
+
return 'criticalPath';
|
|
27263
|
+
}
|
|
27264
|
+
/**
|
|
27265
|
+
* Destroys the Critical Path of Gantt.
|
|
27266
|
+
*
|
|
27267
|
+
* @returns {void} .
|
|
27268
|
+
* @private
|
|
27269
|
+
*/
|
|
27270
|
+
destroy() {
|
|
27271
|
+
if (!this.parent.enableCriticalPath && this.parent.criticalPathModule) {
|
|
27272
|
+
this.parent.criticalPathModule = undefined;
|
|
27273
|
+
}
|
|
27274
|
+
}
|
|
27275
|
+
}
|
|
27276
|
+
|
|
26264
27277
|
// eslint-disable-next-line
|
|
26265
27278
|
/**
|
|
26266
27279
|
* The ContextMenu module is used to handle the context menu items & sub-menu items.
|
|
@@ -26489,9 +27502,8 @@ class ContextMenu$2 {
|
|
|
26489
27502
|
getClickedDate(element) {
|
|
26490
27503
|
// context menu click position
|
|
26491
27504
|
const ganttElementPosition = this.parent.getOffsetRect(this.parent.element);
|
|
26492
|
-
const ganttLeft = ganttElementPosition.left - this.parent.element.offsetLeft;
|
|
26493
27505
|
// task left position
|
|
26494
|
-
const pageLeft =
|
|
27506
|
+
const pageLeft = ganttElementPosition.left + this.parent.ganttChartModule.chartElement.offsetLeft +
|
|
26495
27507
|
this.rowData.ganttProperties.left - this.parent.ganttChartModule.scrollElement.scrollLeft;
|
|
26496
27508
|
// difference from task start date to current click position.
|
|
26497
27509
|
const currentTaskDifference = this.clickedPosition - pageLeft;
|
|
@@ -26677,7 +27689,7 @@ class ContextMenu$2 {
|
|
|
26677
27689
|
break;
|
|
26678
27690
|
case 'Indent':
|
|
26679
27691
|
{
|
|
26680
|
-
if (!this.parent.allowSelection) {
|
|
27692
|
+
if (!this.parent.allowSelection || !this.parent.editModule || !this.parent.editSettings) {
|
|
26681
27693
|
this.hideItems.push(item.text);
|
|
26682
27694
|
}
|
|
26683
27695
|
else {
|
|
@@ -26694,7 +27706,7 @@ class ContextMenu$2 {
|
|
|
26694
27706
|
}
|
|
26695
27707
|
case 'Outdent':
|
|
26696
27708
|
{
|
|
26697
|
-
if (!this.parent.allowSelection) {
|
|
27709
|
+
if (!this.parent.allowSelection || !this.parent.editModule || !this.parent.editSettings) {
|
|
26698
27710
|
this.hideItems.push(item.text);
|
|
26699
27711
|
}
|
|
26700
27712
|
else {
|
|
@@ -27483,6 +28495,7 @@ class RowDD$1 {
|
|
|
27483
28495
|
const proxy = this.parent;
|
|
27484
28496
|
let tempDataSource;
|
|
27485
28497
|
let idx;
|
|
28498
|
+
const ganttFields = this.parent.taskFields;
|
|
27486
28499
|
if (this.parent.dataSource instanceof DataManager) {
|
|
27487
28500
|
tempDataSource = getValue('dataOperation.dataArray', this.parent);
|
|
27488
28501
|
}
|
|
@@ -27491,7 +28504,12 @@ class RowDD$1 {
|
|
|
27491
28504
|
}
|
|
27492
28505
|
if (tempDataSource.length > 0 && (!isNullOrUndefined(droppedRecord) && !droppedRecord.parentItem)) {
|
|
27493
28506
|
for (let i = 0; i < Object.keys(tempDataSource).length; i++) {
|
|
27494
|
-
if (
|
|
28507
|
+
if (!isNullOrUndefined(droppedRecord.taskData[ganttFields.child]) &&
|
|
28508
|
+
tempDataSource[i][ganttFields.child] === droppedRecord.taskData[ganttFields.child]) {
|
|
28509
|
+
idx = i;
|
|
28510
|
+
}
|
|
28511
|
+
else if (isNullOrUndefined(droppedRecord.taskData[ganttFields.child]) &&
|
|
28512
|
+
droppedRecord.taskData[ganttFields.id] === tempDataSource[i][ganttFields.id]) {
|
|
27495
28513
|
idx = i;
|
|
27496
28514
|
}
|
|
27497
28515
|
}
|
|
@@ -27928,6 +28946,10 @@ class PdfGanttTheme {
|
|
|
27928
28946
|
//chart side theme
|
|
27929
28947
|
ganttStyle.taskbar.taskColor = new PdfColor(49, 122, 185);
|
|
27930
28948
|
ganttStyle.taskbar.progressColor = new PdfColor(33, 82, 125);
|
|
28949
|
+
ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
|
|
28950
|
+
ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
|
|
28951
|
+
ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
|
|
28952
|
+
ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
|
|
27931
28953
|
ganttStyle.taskbar.parentTaskColor = new PdfColor(119, 119, 119);
|
|
27932
28954
|
ganttStyle.taskbar.parentProgressColor = new PdfColor(85, 85, 85);
|
|
27933
28955
|
ganttStyle.taskbar.taskBorderColor = new PdfColor(33, 82, 125);
|
|
@@ -27944,6 +28966,10 @@ class PdfGanttTheme {
|
|
|
27944
28966
|
//chart side theme
|
|
27945
28967
|
ganttStyle.taskbar.taskColor = new PdfColor(0, 123, 255);
|
|
27946
28968
|
ganttStyle.taskbar.progressColor = new PdfColor(0, 86, 179);
|
|
28969
|
+
ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
|
|
28970
|
+
ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
|
|
28971
|
+
ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
|
|
28972
|
+
ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
|
|
27947
28973
|
ganttStyle.taskbar.parentTaskColor = new PdfColor(108, 117, 125);
|
|
27948
28974
|
ganttStyle.taskbar.parentProgressColor = new PdfColor(73, 80, 87);
|
|
27949
28975
|
ganttStyle.taskbar.taskBorderColor = new PdfColor(0, 86, 179);
|
|
@@ -27962,6 +28988,10 @@ class PdfGanttTheme {
|
|
|
27962
28988
|
//chart side theme
|
|
27963
28989
|
ganttStyle.taskbar.taskColor = new PdfColor(0, 120, 214);
|
|
27964
28990
|
ganttStyle.taskbar.progressColor = new PdfColor(0, 91, 163);
|
|
28991
|
+
ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
|
|
28992
|
+
ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
|
|
28993
|
+
ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
|
|
28994
|
+
ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
|
|
27965
28995
|
ganttStyle.taskbar.parentTaskColor = new PdfColor(118, 118, 118);
|
|
27966
28996
|
ganttStyle.taskbar.parentProgressColor = new PdfColor(80, 80, 80);
|
|
27967
28997
|
ganttStyle.taskbar.taskBorderColor = new PdfColor(0, 91, 163);
|
|
@@ -27978,6 +29008,10 @@ class PdfGanttTheme {
|
|
|
27978
29008
|
//chart side theme
|
|
27979
29009
|
ganttStyle.taskbar.taskColor = new PdfColor(88, 105, 197);
|
|
27980
29010
|
ganttStyle.taskbar.progressColor = new PdfColor(63, 81, 181);
|
|
29011
|
+
ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
|
|
29012
|
+
ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
|
|
29013
|
+
ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
|
|
29014
|
+
ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
|
|
27981
29015
|
ganttStyle.taskbar.parentTaskColor = new PdfColor(132, 132, 132);
|
|
27982
29016
|
ganttStyle.taskbar.parentProgressColor = new PdfColor(97, 97, 97);
|
|
27983
29017
|
ganttStyle.taskbar.taskBorderColor = new PdfColor(63, 81, 181);
|
|
@@ -30088,6 +31122,12 @@ class ExportHelper {
|
|
|
30088
31122
|
predecessor.milestoneParent = data.milestoneParent;
|
|
30089
31123
|
predecessor.milestoneChild = data.milestoneChild;
|
|
30090
31124
|
predecessor.lineWidth = this.parent.connectorLineWidth > 5 ? pixelToPoint(5) : pixelToPoint(this.parent.connectorLineWidth);
|
|
31125
|
+
if (data.isCritical) {
|
|
31126
|
+
predecessor.connectorLineColor = this.ganttStyle.criticalConnectorLineColor;
|
|
31127
|
+
}
|
|
31128
|
+
else {
|
|
31129
|
+
predecessor.connectorLineColor = this.ganttStyle.connectorLineColor;
|
|
31130
|
+
}
|
|
30091
31131
|
predecessor.connectorLineColor = this.ganttStyle.connectorLineColor;
|
|
30092
31132
|
this.gantt.predecessorCollection.push(predecessor);
|
|
30093
31133
|
});
|
|
@@ -30209,9 +31249,16 @@ class ExportHelper {
|
|
|
30209
31249
|
taskbar.progressColor = new PdfColor(this.ganttStyle.taskbar.parentProgressColor);
|
|
30210
31250
|
}
|
|
30211
31251
|
else {
|
|
30212
|
-
|
|
30213
|
-
|
|
30214
|
-
|
|
31252
|
+
if (data.isCritical) {
|
|
31253
|
+
taskbar.taskColor = new PdfColor(this.ganttStyle.taskbar.criticalTaskColor);
|
|
31254
|
+
taskbar.progressColor = new PdfColor(this.ganttStyle.taskbar.criticalProgressColor);
|
|
31255
|
+
taskbar.taskBorderColor = new PdfColor(this.ganttStyle.taskbar.criticalTaskBorderColor);
|
|
31256
|
+
}
|
|
31257
|
+
else {
|
|
31258
|
+
taskbar.taskColor = new PdfColor(this.ganttStyle.taskbar.taskColor);
|
|
31259
|
+
taskbar.progressColor = new PdfColor(this.ganttStyle.taskbar.progressColor);
|
|
31260
|
+
taskbar.taskBorderColor = new PdfColor(this.ganttStyle.taskbar.taskBorderColor);
|
|
31261
|
+
}
|
|
30215
31262
|
}
|
|
30216
31263
|
taskbar.gridLineColor = new PdfColor(this.ganttStyle.chartGridLineColor);
|
|
30217
31264
|
this.gantt.taskbarCollection.push(taskbar);
|
|
@@ -31958,5 +33005,5 @@ class VirtualScroll$1 {
|
|
|
31958
33005
|
* Gantt index file
|
|
31959
33006
|
*/
|
|
31960
33007
|
|
|
31961
|
-
export { Gantt, PdfHorizontalOverflowType, parentsUntil$1 as parentsUntil, isScheduledTask, isCountRequired, getSwapKey, isRemoteData, getTaskData, updateDates, formatString, getIndex, pixelToPoint, pointToPixel, getUid$1 as getUid, load, rowDataBound, queryCellInfo, toolbarClick, keyPressed, Edit$2 as Edit, Reorder$1 as Reorder, Resize$1 as Resize, Filter$1 as Filter, Sort$1 as Sort, Dependency, Selection$1 as Selection, Toolbar$3 as Toolbar, DayMarkers, ContextMenu$2 as ContextMenu, ExcelExport$1 as ExcelExport, ColumnMenu$1 as ColumnMenu, RowDD$1 as RowDD, PdfExport, VirtualScroll$1 as VirtualScroll, Column, DayWorkingTime, AddDialogFieldSettings, EditDialogFieldSettings, EditSettings, EventMarker, FilterSettings, SearchSettings, Holiday, LabelSettings, SelectionSettings, SplitterSettings, TaskFields, TimelineTierSettings, TimelineSettings, TooltipSettings, SortDescriptor, SortSettings, ResourceFields };
|
|
33008
|
+
export { Gantt, PdfHorizontalOverflowType, parentsUntil$1 as parentsUntil, isScheduledTask, isCountRequired, getSwapKey, isRemoteData, getTaskData, updateDates, formatString, getIndex, pixelToPoint, pointToPixel, getUid$1 as getUid, load, rowDataBound, queryCellInfo, toolbarClick, keyPressed, Edit$2 as Edit, Reorder$1 as Reorder, Resize$1 as Resize, Filter$1 as Filter, Sort$1 as Sort, Dependency, Selection$1 as Selection, Toolbar$3 as Toolbar, DayMarkers, CriticalPath, ContextMenu$2 as ContextMenu, ExcelExport$1 as ExcelExport, ColumnMenu$1 as ColumnMenu, RowDD$1 as RowDD, PdfExport, VirtualScroll$1 as VirtualScroll, Column, DayWorkingTime, AddDialogFieldSettings, EditDialogFieldSettings, EditSettings, EventMarker, FilterSettings, SearchSettings, Holiday, LabelSettings, SelectionSettings, SplitterSettings, TaskFields, TimelineTierSettings, TimelineSettings, TooltipSettings, SortDescriptor, SortSettings, ResourceFields };
|
|
31962
33009
|
//# sourceMappingURL=ej2-gantt.es2015.js.map
|