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