gantt-task-react-powern 0.6.27 → 0.6.28
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 +11 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +11 -3
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1115,13 +1115,21 @@ function toDateString(date) {
|
|
|
1115
1115
|
}
|
|
1116
1116
|
|
|
1117
1117
|
function isHoliday(date, cal) {
|
|
1118
|
-
|
|
1118
|
+
if (cal.holidays && cal.holidays.length > 0) {
|
|
1119
|
+
return cal.holidays.includes(toDateString(date));
|
|
1120
|
+
} else {
|
|
1121
|
+
return false;
|
|
1122
|
+
}
|
|
1119
1123
|
}
|
|
1120
1124
|
function isOffDay(date, cal) {
|
|
1121
|
-
|
|
1125
|
+
if (cal.off_days && cal.off_days.length > 0) {
|
|
1126
|
+
return cal.off_days.includes(date.getDay()) || isHoliday(date, cal);
|
|
1127
|
+
} else {
|
|
1128
|
+
return false;
|
|
1129
|
+
}
|
|
1122
1130
|
}
|
|
1123
1131
|
function getShiftsForDay(date, cal) {
|
|
1124
|
-
if (isOffDay(date, cal)) return [];
|
|
1132
|
+
if (isOffDay(date, cal) || !cal.shifts) return [];
|
|
1125
1133
|
return cal.shifts.map(function (_ref) {
|
|
1126
1134
|
var s = _ref[0],
|
|
1127
1135
|
e = _ref[1];
|