forked from jappel/leistungsbilanz-ts
Create clean release database baseline
This commit is contained in:
parent
5bee3cb103
commit
734a2bcfc4
129 changed files with 2121 additions and 30607 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue