gantt-task-react-powern 0.6.26 → 0.6.27
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 +16 -14
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +16 -14
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -4652,25 +4652,27 @@ function computeCriticalPath(taskID, taskMap) {
|
|
|
4652
4652
|
var endWeek = Math.floor((depEnd / 86400000 + 4) / 7);
|
|
4653
4653
|
var offTime = 0;
|
|
4654
4654
|
|
|
4655
|
-
if (taskMap[dependents[j]].task.calendar
|
|
4656
|
-
|
|
4657
|
-
for (var
|
|
4658
|
-
var
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4655
|
+
if (taskMap[dependents[j]].task.calendar) {
|
|
4656
|
+
if (taskMap[dependents[j]].task.calendar.off_days && taskMap[dependents[j]].task.calendar.off_days.length) {
|
|
4657
|
+
for (var d = 0; d < taskMap[dependents[j]].task.calendar.off_days.length || 0; d++) {
|
|
4658
|
+
for (var w = startWeek; w <= endWeek; w++) {
|
|
4659
|
+
var dayOfTheWeek = taskMap[dependents[j]].task.calendar.off_days[d];
|
|
4660
|
+
var offDay = 86400000 * (7 * w - 4 + dayOfTheWeek);
|
|
4661
|
+
|
|
4662
|
+
if (offDay >= depStart && offDay <= depEnd && (offDay > taskMap[taskID].end || taskMap[taskID].task.calendar.off_days.includes(dayOfTheWeek))) {
|
|
4663
|
+
offTime += 86400000;
|
|
4664
|
+
}
|
|
4663
4665
|
}
|
|
4664
4666
|
}
|
|
4665
4667
|
}
|
|
4666
|
-
}
|
|
4667
4668
|
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4669
|
+
if (taskMap[dependents[j]].task.calendar.holidays && taskMap[dependents[j]].task.calendar.holidays.length) {
|
|
4670
|
+
for (var h = 0; h < taskMap[dependents[j]].task.calendar.holidays.length || 0; h++) {
|
|
4671
|
+
var holiday = taskMap[dependents[j]].task.calendar.holidays[h];
|
|
4671
4672
|
|
|
4672
|
-
|
|
4673
|
-
|
|
4673
|
+
if (holiday >= depStart && holiday <= depEnd) {
|
|
4674
|
+
offTime += 86400000;
|
|
4675
|
+
}
|
|
4674
4676
|
}
|
|
4675
4677
|
}
|
|
4676
4678
|
}
|