@outbuild-company/schedule-core 1.15.2 → 1.15.3
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.cjs
CHANGED
|
@@ -5461,8 +5461,8 @@ function buildCalendarPatch(activity, newCalendarId, ctx) {
|
|
|
5461
5461
|
};
|
|
5462
5462
|
const newCalendar = ctx.calendars.getCalendar(newCalendarId);
|
|
5463
5463
|
if (newCalendar) {
|
|
5464
|
-
const calendarStart = newCalendar.getClosestWorkTime({
|
|
5465
|
-
date:
|
|
5464
|
+
const calendarStart = newCalendar.isWorkTime(activity.startDate, "hour") ? activity.startDate : newCalendar.getClosestWorkTime({
|
|
5465
|
+
date: activity.startDate,
|
|
5466
5466
|
direction: "future",
|
|
5467
5467
|
unit: "hour"
|
|
5468
5468
|
});
|
|
@@ -5479,11 +5479,6 @@ function buildCalendarPatch(activity, newCalendarId, ctx) {
|
|
|
5479
5479
|
}
|
|
5480
5480
|
return fields;
|
|
5481
5481
|
}
|
|
5482
|
-
function startOfUtcDay2(date2) {
|
|
5483
|
-
return new Date(
|
|
5484
|
-
Date.UTC(date2.getUTCFullYear(), date2.getUTCMonth(), date2.getUTCDate())
|
|
5485
|
-
);
|
|
5486
|
-
}
|
|
5487
5482
|
|
|
5488
5483
|
// src/generators/custom-id/constants.ts
|
|
5489
5484
|
var DEFAULT_SUFFIX_INCREMENT = "10";
|
|
@@ -10279,13 +10274,13 @@ var legacy_default = CriticalPath;
|
|
|
10279
10274
|
|
|
10280
10275
|
// src/critical-path/gantt-adapter.ts
|
|
10281
10276
|
var isFinishConstraint = (type) => type === CONSTRAINT_TYPE.FNET || type === CONSTRAINT_TYPE.FNLT || type === CONSTRAINT_TYPE.MFO;
|
|
10282
|
-
var
|
|
10277
|
+
var startOfUtcDay2 = (date2) => new Date(
|
|
10283
10278
|
Date.UTC(date2.getUTCFullYear(), date2.getUTCMonth(), date2.getUTCDate())
|
|
10284
10279
|
);
|
|
10285
10280
|
function constraintDateForCriticalPath(activity, state) {
|
|
10286
10281
|
const raw = activity.constraintDate;
|
|
10287
10282
|
if (!raw || !isFinishConstraint(activity.constraintType)) return raw;
|
|
10288
|
-
const midnight =
|
|
10283
|
+
const midnight = startOfUtcDay2(raw);
|
|
10289
10284
|
if (raw.getTime() !== midnight.getTime()) return raw;
|
|
10290
10285
|
const firstWork = state.getClosestWorkTime({
|
|
10291
10286
|
date: midnight,
|