Create clean release database baseline

This commit is contained in:
Julian Appel 2026-07-31 14:07:26 +02:00
parent 5bee3cb103
commit 734a2bcfc4
129 changed files with 2121 additions and 30607 deletions

View file

@ -30,10 +30,8 @@ import {
formatPhaseTypeLabel,
formatValue,
getCircuitSectionLabel,
getLegacyProjectColumnLayoutStorageKey,
getProjectColumnLayoutStorageKey,
isGridEditorControlTarget,
migrateLegacyColumnLayout,
normalizeColumnOrder,
parseStoredColumnLayout,
} from "../utils/circuit-grid-model";
@ -191,9 +189,6 @@ type CircuitReorderDropIntent =
| { kind: "after-circuit"; sectionId: string; targetCircuitId: string; valid: boolean }
| { kind: "section-end"; sectionId: string; valid: boolean };
const LEGACY_COLUMN_LAYOUT_STORAGE_KEY =
"circuitTreeEditor.columnLayout.v1";
function normalizeUiError(err: unknown): string {
const message = err instanceof Error ? err.message : "Der Vorgang ist fehlgeschlagen.";
try {
@ -379,25 +374,11 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str
const currentLayout = parseStoredColumnLayout(
localStorage.getItem(getProjectColumnLayoutStorageKey(projectId))
);
const legacyLayout =
parseStoredColumnLayout(
localStorage.getItem(
getLegacyProjectColumnLayoutStorageKey(projectId)
)
) ??
parseStoredColumnLayout(
localStorage.getItem(LEGACY_COLUMN_LAYOUT_STORAGE_KEY)
);
const parsed =
currentLayout ??
(legacyLayout
? migrateLegacyColumnLayout(legacyLayout)
: null);
if (!parsed) {
if (!currentLayout) {
return;
}
setColumnOrder(parsed.order);
setVisibleColumnKeys(parsed.visible);
setColumnOrder(currentLayout.order);
setVisibleColumnKeys(currentLayout.visible);
} catch {
// ignore invalid local storage and use defaults
} finally {

View file

@ -114,11 +114,11 @@ function SectionRows(props: { section: CircuitTreeResponseDto["sections"][number
<td className="text-end">
{formatValue(circuit.circuitTotalPower, "circuitTotalPower")}
</td>
<td>{circuit.protectionType ?? "-"}</td>
<td>{circuit.protectionDevice?.type ?? "-"}</td>
<td className="text-end">
{formatValue(circuit.protectionRatedCurrent, "protectionRatedCurrent")}
{formatValue(circuit.protectionDevice?.ratedCurrentA, "protectionRatedCurrent")}
</td>
<td>{circuit.protectionCharacteristic ?? "-"}</td>
<td>{circuit.protectionDevice?.tripCharacteristic ?? circuit.protectionDevice?.fuseUtilizationCategory ?? "-"}</td>
<td>{circuit.cableType ?? "-"}</td>
<td>{circuit.cableCrossSection ?? "-"}</td>
<td className="text-end">{formatValue(circuit.cableLength, "cableLength")}</td>
@ -147,11 +147,11 @@ function SectionRows(props: { section: CircuitTreeResponseDto["sections"][number
</td>
<td className="text-end">{formatValue(row.cosPhi, "cosPhi")}</td>
<td className="text-end">{formatValue(row.rowTotalPower, "rowTotalPower")}</td>
<td>{circuit.protectionType ?? "-"}</td>
<td>{circuit.protectionDevice?.type ?? "-"}</td>
<td className="text-end">
{formatValue(circuit.protectionRatedCurrent, "protectionRatedCurrent")}
{formatValue(circuit.protectionDevice?.ratedCurrentA, "protectionRatedCurrent")}
</td>
<td>{circuit.protectionCharacteristic ?? "-"}</td>
<td>{circuit.protectionDevice?.tripCharacteristic ?? circuit.protectionDevice?.fuseUtilizationCategory ?? "-"}</td>
<td>{circuit.cableType ?? "-"}</td>
<td>{circuit.cableCrossSection ?? "-"}</td>
<td className="text-end">{formatValue(circuit.cableLength, "cableLength")}</td>
@ -169,11 +169,11 @@ function SectionRows(props: { section: CircuitTreeResponseDto["sections"][number
<td className="text-end">
{formatValue(circuit.circuitTotalPower, "circuitTotalPower")}
</td>
<td>{circuit.protectionType ?? "-"}</td>
<td>{circuit.protectionDevice?.type ?? "-"}</td>
<td className="text-end">
{formatValue(circuit.protectionRatedCurrent, "protectionRatedCurrent")}
{formatValue(circuit.protectionDevice?.ratedCurrentA, "protectionRatedCurrent")}
</td>
<td>{circuit.protectionCharacteristic ?? "-"}</td>
<td>{circuit.protectionDevice?.tripCharacteristic ?? circuit.protectionDevice?.fuseUtilizationCategory ?? "-"}</td>
<td>{circuit.cableType ?? "-"}</td>
<td>{circuit.cableCrossSection ?? "-"}</td>
<td className="text-end">{formatValue(circuit.cableLength, "cableLength")}</td>