Prepare circuits for future sizing

This commit is contained in:
2026-07-22 20:53:04 +02:00
parent 6c45c97ffd
commit 5dc3ab90be
17 changed files with 111 additions and 1 deletions
@@ -104,6 +104,7 @@ interface CircuitSnapshot {
rcdAssignment?: string;
terminalDesignation?: string;
voltage?: number;
controlRequirement?: string;
status?: string;
isReserve: boolean;
remark?: string;
@@ -938,7 +939,7 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str
const payload: Record<string, unknown> = {};
if (key === "protectionSummary" || key === "cableSummary") {
payload.remark = draft.trim() === "" ? undefined : draft;
} else if (["protectionRatedCurrent", "cableLength"].includes(key)) {
} else if (["protectionRatedCurrent", "cableLength", "voltage"].includes(key)) {
payload[key] = parseNumeric(key, draft);
} else if (key === "isReserve") {
const normalized = draft.trim().toLowerCase();
@@ -1510,6 +1511,7 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str
rcdAssignment: found.rcdAssignment ?? undefined,
terminalDesignation: found.terminalDesignation ?? undefined,
voltage: found.voltage ?? undefined,
controlRequirement: found.controlRequirement ?? undefined,
status: found.status ?? undefined,
isReserve: found.isReserve,
remark: found.remark ?? undefined,
@@ -1534,6 +1536,7 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str
rcdAssignment: snapshot.rcdAssignment,
terminalDesignation: snapshot.terminalDesignation,
voltage: snapshot.voltage,
controlRequirement: snapshot.controlRequirement,
status: snapshot.status,
isReserve: snapshot.isReserve,
remark: snapshot.remark,