Add external row quantity foundation

This commit is contained in:
2026-08-02 18:26:22 +02:00
parent bc2bc7ece5
commit dac19b093c
30 changed files with 2750 additions and 22 deletions
@@ -82,6 +82,14 @@ export class CircuitDeviceRowProjectCommandRepository
change.value,
])
) as CircuitDeviceRowPatchInput;
const targetQuantity = patch.quantity ?? current.quantity;
const targetManualQuantity =
patch.manualQuantity ?? current.manualQuantity;
if (targetManualQuantity > targetQuantity) {
throw new Error(
"Device-row manual quantity must not exceed total quantity."
);
}
if (
input.source === "user" &&
patch.phaseType !== undefined &&