Keep single-device circuit names equal to their device row
A circuit with exactly one device row and no fed distribution board is shown as that row, so its own name was hidden and could drift (e.g. "Neuer Stromkreis" in the print view). Commands that create or leave such a circuit, rename its row or unlink its downstream board now set the circuit name to the row name and store the change as optional circuitDisplayNames, so Undo restores an overwritten free name exactly. Migration 0016 aligns existing data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
58cec53713
commit
01312b89fe
21 changed files with 4330 additions and 111 deletions
|
|
@ -224,7 +224,8 @@ export async function assignExternalObjectsToNewCircuit(req: Request, res: Respo
|
|||
circuitListId: sectionLocation.tree.circuitListId,
|
||||
sectionId,
|
||||
equipmentIdentifier: await circuitNumberingService.getNextIdentifier(sectionId),
|
||||
displayName: null,
|
||||
// The single external row is shown compactly, so the circuit carries its name.
|
||||
displayName: row.displayName,
|
||||
sortOrder: Math.max(0, ...sectionLocation.section.circuits.map((entry) => entry.sortOrder)) + 10,
|
||||
cableType: null, cableCrossSection: null, cableLength: null, rcdAssignment: null,
|
||||
terminalDesignation: null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue