@outbuild-company/schedule-core 1.6.0 → 1.6.1
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
CHANGED
|
@@ -10481,9 +10481,13 @@ async function createActivityCore(action, deps, opts = {}) {
|
|
|
10481
10481
|
const initialTouched = /* @__PURE__ */ new Set([newId]);
|
|
10482
10482
|
if (parent) initialTouched.add(parent.id);
|
|
10483
10483
|
const parentWasLeaf = parent !== null && adapter.getChildren(parent.id).length === 0;
|
|
10484
|
+
const parentCustomId = parentWasLeaf ? parent?.customId : null;
|
|
10484
10485
|
const beforeSnap = opts.skipBeforeSnap ? /* @__PURE__ */ new Map() : await snapshotActivities(adapter, initialTouched);
|
|
10485
10486
|
adapter.addActivity(newActivity);
|
|
10486
10487
|
applyParentMutations(action, newId, parent, adapter, parentWasLeaf);
|
|
10488
|
+
if (parentCustomId) {
|
|
10489
|
+
deps.customIdTracker.releaseCustomId(parentCustomId);
|
|
10490
|
+
}
|
|
10487
10491
|
recomputeHhCascadeForActivity(newId, adapter);
|
|
10488
10492
|
recomputeUsedCostCascadeForActivity(newId, adapter);
|
|
10489
10493
|
recomputeCostCascadeForActivity(newId, adapter);
|