Compact single-board feeder circuit rows
This commit is contained in:
parent
ade21fe386
commit
9165b8238c
11 changed files with 181 additions and 14 deletions
|
|
@ -1766,7 +1766,7 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str
|
|||
const currentDisplay =
|
||||
mode === "replaceWithTypedChar" && cell.cellKey !== "phaseType"
|
||||
? typedChar ?? ""
|
||||
: String(visibleCell.value ?? "");
|
||||
: String(visibleCell.editValue ?? visibleCell.value ?? "");
|
||||
focusTokenRef.current += 1;
|
||||
setEditingCell({
|
||||
...cell,
|
||||
|
|
@ -4077,7 +4077,9 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str
|
|||
key={row.rowKey}
|
||||
className={`${
|
||||
row.rowType === "circuitSummary"
|
||||
? "summary-row"
|
||||
? row.downstreamBoardLoad
|
||||
? "feeder-circuit-row"
|
||||
: "summary-row"
|
||||
: row.rowType === "deviceRow"
|
||||
? "device-row"
|
||||
: row.rowType === "downstreamBoardLoad"
|
||||
|
|
@ -4708,11 +4710,19 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str
|
|||
tabIndex={-1}
|
||||
/>
|
||||
<IconButton
|
||||
disabled={isSaving}
|
||||
disabled={
|
||||
isSaving ||
|
||||
(row.circuit.downstreamBoardLoads?.length ?? 0) > 0
|
||||
}
|
||||
icon={Trash2}
|
||||
label="Stromkreis löschen"
|
||||
onClick={() => void handleDeleteCircuit(row.circuit!.id)}
|
||||
tabIndex={-1}
|
||||
title={
|
||||
(row.circuit.downstreamBoardLoads?.length ?? 0) > 0
|
||||
? "Speist eine Unterverteilung – zuerst deren Einspeisung ändern"
|
||||
: undefined
|
||||
}
|
||||
variant="danger"
|
||||
/>
|
||||
</>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue