Open circuit protection from grid cell
This commit is contained in:
@@ -1052,6 +1052,20 @@ a.kpi:hover {
|
|||||||
cursor: text;
|
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 {
|
.tree-grid .device-drag-handle {
|
||||||
cursor: grab;
|
cursor: grab;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4210,10 +4210,15 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str
|
|||||||
row.circuit &&
|
row.circuit &&
|
||||||
(duplicateEquipmentIdentifierCircuitIds.has(row.circuit.id) || hasDraftIdentifierConflict)
|
(duplicateEquipmentIdentifierCircuitIds.has(row.circuit.id) || hasDraftIdentifierConflict)
|
||||||
);
|
);
|
||||||
|
const isProtectionTrigger = Boolean(
|
||||||
|
column.key === "protectionSummary" &&
|
||||||
|
row.circuit &&
|
||||||
|
row.rowType !== "deviceRow"
|
||||||
|
);
|
||||||
return (
|
return (
|
||||||
<td
|
<td
|
||||||
key={column.key}
|
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")
|
Boolean(row.device) && column.key === "displayName" && (row.rowType === "deviceRow" || row.rowType === "circuitCompact")
|
||||||
? "device-drag-handle"
|
? "device-drag-handle"
|
||||||
: ""
|
: ""
|
||||||
@@ -4231,7 +4236,9 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str
|
|||||||
: ""
|
: ""
|
||||||
}`}
|
}`}
|
||||||
title={
|
title={
|
||||||
column.key === "equipmentIdentifier" &&
|
isProtectionTrigger
|
||||||
|
? "Schutzgerät bearbeiten"
|
||||||
|
: column.key === "equipmentIdentifier" &&
|
||||||
row.circuit &&
|
row.circuit &&
|
||||||
(row.rowType === "circuitCompact" ||
|
(row.rowType === "circuitCompact" ||
|
||||||
row.rowType === "circuitSummary" ||
|
row.rowType === "circuitSummary" ||
|
||||||
@@ -4306,6 +4313,10 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str
|
|||||||
if (isGridEditorControlTarget(event.target)) {
|
if (isGridEditorControlTarget(event.target)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (isProtectionTrigger) {
|
||||||
|
setProtectionEditorCircuit(row.circuit!);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (cell.editable) {
|
if (cell.editable) {
|
||||||
handleRowSelectionClick(row, column.key, {
|
handleRowSelectionClick(row, column.key, {
|
||||||
ctrlKey: event.ctrlKey,
|
ctrlKey: event.ctrlKey,
|
||||||
@@ -4431,15 +4442,6 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str
|
|||||||
>
|
>
|
||||||
{row.circuit && row.rowType !== "deviceRow" ? (
|
{row.circuit && row.rowType !== "deviceRow" ? (
|
||||||
<>
|
<>
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
tabIndex={-1}
|
|
||||||
onClick={() =>
|
|
||||||
setProtectionEditorCircuit(row.circuit!)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Schutzgerät
|
|
||||||
</button>
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
|
|||||||
Reference in New Issue
Block a user