Persist Revit CSV configuration
This commit is contained in:
parent
da689af518
commit
219da5ec3b
22 changed files with 2508 additions and 27 deletions
|
|
@ -19,6 +19,7 @@ import { floors } from "../schema/floors.js";
|
|||
import { projectDevices } from "../schema/project-devices.js";
|
||||
import { projects } from "../schema/projects.js";
|
||||
import { rooms } from "../schema/rooms.js";
|
||||
import { externalCsvConfigurations } from "../schema/external-csv-configurations.js";
|
||||
|
||||
export interface PersistedProjectStateSnapshot {
|
||||
currentRevision: number;
|
||||
|
|
@ -59,6 +60,11 @@ export function readProjectStateSnapshot(
|
|||
.where(eq(distributionBoards.projectId, projectId))
|
||||
.orderBy(asc(distributionBoards.name), asc(distributionBoards.id))
|
||||
.all();
|
||||
const externalCsvConfiguration = database
|
||||
.select()
|
||||
.from(externalCsvConfigurations)
|
||||
.where(eq(externalCsvConfigurations.projectId, projectId))
|
||||
.get() ?? null;
|
||||
const listRows = database
|
||||
.select()
|
||||
.from(circuitLists)
|
||||
|
|
@ -241,6 +247,7 @@ export function readProjectStateSnapshot(
|
|||
project.enabledDistributionBoardSupplyTypes,
|
||||
},
|
||||
distributionBoards: boardRows,
|
||||
externalCsvConfiguration,
|
||||
circuitLists: listRows,
|
||||
circuitSections: sectionRows,
|
||||
distributionBoardComponents: componentRows,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue