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