perf(planning): reject impossible mandatory moves before copying
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
433a8b0ade
commit
c6610cd633
3 files changed
+104
No files matched your search
@@ -1514,6 +1514,8 @@ function assignDateToBalance(
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
// Reject impossible mandatory moves before copying; validate complete patterns later.
|
||||
if (!mandatoryRelocationDate(date, balance, ruleIds, context)) return null;
|
||||
// Existing placements stay read-only; this assignment owns only its new placement.
|
||||
const result = cloneState(state, new Map(state.placements));
|
||||
const target = result.balances.find((item) => item.id === balanceId)!;
|
||||
|
||||
Reference in new issue
Block a user