@outbuild-company/schedule-core 1.17.1 → 1.17.2
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/README.md +6 -0
- package/dist/cdn/schedule-core.global.js +1 -1
- package/dist/cdn/schedule-core.global.js.map +1 -1
- package/dist/index.cjs +9 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5024,6 +5024,7 @@ var POST_PROCESSOR = {
|
|
|
5024
5024
|
|
|
5025
5025
|
// src/columns/shared/error-codes.ts
|
|
5026
5026
|
var VALIDATION_REASON = {
|
|
5027
|
+
UNCHANGED: "unchanged",
|
|
5027
5028
|
NEGATIVE_DURATION: "negative_duration"};
|
|
5028
5029
|
var EDIT_DENIAL_REASON = {
|
|
5029
5030
|
COMPLETED: "completed",
|
|
@@ -5497,14 +5498,6 @@ var startDatePipeline = {
|
|
|
5497
5498
|
if (isCompletedActivity(activity)) {
|
|
5498
5499
|
return cannotEdit("completed", "cant_edit_completed_activity");
|
|
5499
5500
|
}
|
|
5500
|
-
if (!isValidDate(edit.newValue)) return canEdit();
|
|
5501
|
-
if (isSameDay(activity.startDate, edit.newValue)) return canEdit();
|
|
5502
|
-
if (edit.newValue.getTime() > activity.startDate.getTime()) {
|
|
5503
|
-
return cannotEdit(
|
|
5504
|
-
"sir_start_after_progress",
|
|
5505
|
-
"sir_cant_move_start_after_progress"
|
|
5506
|
-
);
|
|
5507
|
-
}
|
|
5508
5501
|
return canEdit();
|
|
5509
5502
|
},
|
|
5510
5503
|
parseInput(rawValue, _activity, _ctx) {
|
|
@@ -15990,6 +15983,7 @@ function mergeBeforeSnapshots(beforeSnap, ids, deps) {
|
|
|
15990
15983
|
|
|
15991
15984
|
// src/dispatch/handlers/bulk-edit.ts
|
|
15992
15985
|
var CUSTOM_ID_COLUMN = COLUMN.CUSTOM_ID;
|
|
15986
|
+
var SIR_APPLY_EVENT_SOURCE2 = "sir-apply";
|
|
15993
15987
|
async function dispatchBulkEdit(action, options, deps) {
|
|
15994
15988
|
const { adapter, scheduler, sector } = deps;
|
|
15995
15989
|
const editsIncludeDuration = action.edits.some(
|
|
@@ -16013,6 +16007,13 @@ async function dispatchBulkEdit(action, options, deps) {
|
|
|
16013
16007
|
for (const edit of action.edits) {
|
|
16014
16008
|
const outcome = applyOneEdit2(edit, deps, action.eventSource);
|
|
16015
16009
|
verdicts.push(outcome.verdict);
|
|
16010
|
+
if (action.eventSource === SIR_APPLY_EVENT_SOURCE2 && !outcome.verdict.ok && outcome.verdict.reason !== VALIDATION_REASON.UNCHANGED) {
|
|
16011
|
+
return {
|
|
16012
|
+
ok: false,
|
|
16013
|
+
reason: outcome.verdict.reason ?? REJECTION_REASON.INVALID,
|
|
16014
|
+
...outcome.verdict.alertKey ? { alertKey: outcome.verdict.alertKey } : {}
|
|
16015
|
+
};
|
|
16016
|
+
}
|
|
16016
16017
|
if (!outcome.verdict.ok || !outcome.changes) continue;
|
|
16017
16018
|
const constraintWarning = toConstraintWarning(
|
|
16018
16019
|
edit.activityId,
|