Open circuit protection from grid cell

This commit is contained in:
2026-07-31 10:02:11 +02:00
parent 54874f9fcb
commit bd8dd09f79
2 changed files with 27 additions and 11 deletions
+14
View File
@@ -1052,6 +1052,20 @@ a.kpi:hover {
cursor: text;
}
.tree-grid .cell-protection-trigger {
color: var(--color-primary);
cursor: pointer;
font-weight: 600;
transition:
background-color 0.12s ease,
box-shadow 0.12s ease;
}
.tree-grid .cell-protection-trigger:hover {
background: #eaf6f0;
box-shadow: inset 0 0 0 1px var(--color-signal);
}
.tree-grid .device-drag-handle {
cursor: grab;
}
+13 -11
View File
@@ -4210,10 +4210,15 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str
row.circuit &&
(duplicateEquipmentIdentifierCircuitIds.has(row.circuit.id) || hasDraftIdentifierConflict)
);
const isProtectionTrigger = Boolean(
column.key === "protectionSummary" &&
row.circuit &&
row.rowType !== "deviceRow"
);
return (
<td
key={column.key}
className={`${column.numeric ? "num" : ""} ${cell.editable ? "cell-editable" : ""} ${isSelected ? "cell-selected" : ""} ${hasIdentifierConflict ? "cell-invalid" : ""} ${
className={`${column.numeric ? "num" : ""} ${cell.editable ? "cell-editable" : ""} ${isProtectionTrigger ? "cell-protection-trigger" : ""} ${isSelected ? "cell-selected" : ""} ${hasIdentifierConflict ? "cell-invalid" : ""} ${
Boolean(row.device) && column.key === "displayName" && (row.rowType === "deviceRow" || row.rowType === "circuitCompact")
? "device-drag-handle"
: ""
@@ -4231,7 +4236,9 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str
: ""
}`}
title={
column.key === "equipmentIdentifier" &&
isProtectionTrigger
? "Schutzgerät bearbeiten"
: column.key === "equipmentIdentifier" &&
row.circuit &&
(row.rowType === "circuitCompact" ||
row.rowType === "circuitSummary" ||
@@ -4306,6 +4313,10 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str
if (isGridEditorControlTarget(event.target)) {
return;
}
if (isProtectionTrigger) {
setProtectionEditorCircuit(row.circuit!);
return;
}
if (cell.editable) {
handleRowSelectionClick(row, column.key, {
ctrlKey: event.ctrlKey,
@@ -4431,15 +4442,6 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str
>
{row.circuit && row.rowType !== "deviceRow" ? (
<>
<button
type="button"
tabIndex={-1}
onClick={() =>
setProtectionEditorCircuit(row.circuit!)
}
>
Schutzgerät
</button>
<button
type="button"
tabIndex={-1}