gantt-task-react-powern 0.6.25 → 0.6.26
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/dist/index.js +43 -43
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +43 -43
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -4645,8 +4645,6 @@ function computeCriticalPath(taskID, taskMap) {
|
|
|
4645
4645
|
taskMap[taskID].paths = [];
|
|
4646
4646
|
|
|
4647
4647
|
for (var j = 0; j < dependents.length; j++) {
|
|
4648
|
-
var _taskMap$dependents$j, _taskMap$dependents$j2, _taskMap$dependents$j3, _taskMap$dependents$j4;
|
|
4649
|
-
|
|
4650
4648
|
var depStart = taskMap[dependents[j]].task.start.getTime();
|
|
4651
4649
|
var depEnd = taskMap[dependents[j]].task.end.getTime();
|
|
4652
4650
|
var depDuration = depEnd - depStart;
|
|
@@ -4654,7 +4652,7 @@ function computeCriticalPath(taskID, taskMap) {
|
|
|
4654
4652
|
var endWeek = Math.floor((depEnd / 86400000 + 4) / 7);
|
|
4655
4653
|
var offTime = 0;
|
|
4656
4654
|
|
|
4657
|
-
if (
|
|
4655
|
+
if (taskMap[dependents[j]].task.calendar.off_days && taskMap[dependents[j]].task.calendar.off_days.length) {
|
|
4658
4656
|
for (var d = 0; d < taskMap[dependents[j]].task.calendar.off_days.length || 0; d++) {
|
|
4659
4657
|
for (var w = startWeek; w <= endWeek; w++) {
|
|
4660
4658
|
var dayOfTheWeek = taskMap[dependents[j]].task.calendar.off_days[d];
|
|
@@ -4667,7 +4665,7 @@ function computeCriticalPath(taskID, taskMap) {
|
|
|
4667
4665
|
}
|
|
4668
4666
|
}
|
|
4669
4667
|
|
|
4670
|
-
if (
|
|
4668
|
+
if (taskMap[dependents[j]].task.calendar.holidays && taskMap[dependents[j]].task.calendar.holidays.length) {
|
|
4671
4669
|
for (var h = 0; h < taskMap[dependents[j]].task.calendar.holidays.length || 0; h++) {
|
|
4672
4670
|
var holiday = taskMap[dependents[j]].task.calendar.holidays[h];
|
|
4673
4671
|
|
|
@@ -4680,49 +4678,51 @@ function computeCriticalPath(taskID, taskMap) {
|
|
|
4680
4678
|
var overlap = Math.max(taskMap[taskID].end - depStart, 0);
|
|
4681
4679
|
var paths = taskMap[dependents[j]].paths;
|
|
4682
4680
|
|
|
4683
|
-
|
|
4684
|
-
var
|
|
4681
|
+
if (paths && paths.length) {
|
|
4682
|
+
for (var k = 0; k < paths.length; k++) {
|
|
4683
|
+
var totalDuration = taskMap[taskID].end - taskMap[taskID].start - overlap - offTime + paths[k].duration;
|
|
4685
4684
|
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4685
|
+
if (taskMap[taskID].paths.length < 2) {
|
|
4686
|
+
taskMap[taskID].paths.push({
|
|
4687
|
+
duration: totalDuration,
|
|
4688
|
+
task: dependents[j],
|
|
4689
|
+
parent: taskID,
|
|
4690
|
+
visited: false
|
|
4691
|
+
});
|
|
4692
|
+
} else if (totalDuration > taskMap[taskID].paths[0].duration) {
|
|
4693
|
+
taskMap[taskID].paths[0].duration = totalDuration;
|
|
4694
|
+
taskMap[taskID].paths[0].task = dependents[j];
|
|
4695
|
+
taskMap[taskID].paths[0].parent = taskID;
|
|
4696
|
+
taskMap[taskID].paths[0].visited = false;
|
|
4697
|
+
} else if (totalDuration > taskMap[taskID].paths[1].duration) {
|
|
4698
|
+
taskMap[taskID].paths[1].duration = totalDuration;
|
|
4699
|
+
taskMap[taskID].paths[1].task = dependents[j];
|
|
4700
|
+
taskMap[taskID].paths[1].parent = taskID;
|
|
4701
|
+
taskMap[taskID].paths[1].visited = false;
|
|
4702
|
+
}
|
|
4703
4703
|
}
|
|
4704
|
-
}
|
|
4705
4704
|
|
|
4706
|
-
|
|
4707
|
-
|
|
4705
|
+
if (paths.length === 0) {
|
|
4706
|
+
var immediateChildDuration = taskMap[taskID].end - taskMap[taskID].start + depDuration - overlap - offTime;
|
|
4708
4707
|
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4708
|
+
if (taskMap[taskID].paths.length < 2) {
|
|
4709
|
+
taskMap[taskID].paths.push({
|
|
4710
|
+
duration: immediateChildDuration,
|
|
4711
|
+
task: dependents[j],
|
|
4712
|
+
parent: taskID,
|
|
4713
|
+
visited: false
|
|
4714
|
+
});
|
|
4715
|
+
} else if (immediateChildDuration > taskMap[taskID].paths[0].duration) {
|
|
4716
|
+
taskMap[taskID].paths[0].duration = immediateChildDuration;
|
|
4717
|
+
taskMap[taskID].paths[0].task = dependents[j];
|
|
4718
|
+
taskMap[taskID].paths[0].parent = taskID;
|
|
4719
|
+
taskMap[taskID].paths[0].visited = false;
|
|
4720
|
+
} else if (immediateChildDuration > taskMap[taskID].paths[1].duration) {
|
|
4721
|
+
taskMap[taskID].paths[1].duration = immediateChildDuration;
|
|
4722
|
+
taskMap[taskID].paths[1].task = dependents[j];
|
|
4723
|
+
taskMap[taskID].paths[1].parent = taskID;
|
|
4724
|
+
taskMap[taskID].paths[1].visited = false;
|
|
4725
|
+
}
|
|
4726
4726
|
}
|
|
4727
4727
|
}
|
|
4728
4728
|
}
|