forked from jappel/leistungsbilanz-ts
Add per-project socket limit and Revit socket device-type flag
- Project setting maxSocketsPerCircuit (migration 0018, project.update-settings schema 4, snapshot schema 11); older command and snapshot versions keep or upgrade the value to null. - Revit configuration schema 2 marks device types as socket; version 1 stays readable and derives the flag from socketCount family rules. - Settings dialog field and device-type card on the Revit page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
85cbdbf8e0
commit
e48042bde3
35 changed files with 3781 additions and 41 deletions
|
|
@ -44,7 +44,7 @@ export function RevitInitialImportWizard({ projectId, expectedRevision, initialC
|
|||
if (!file) return;
|
||||
const deviceTypeId = createClientId();
|
||||
const next = structuredClone(configuration);
|
||||
next.deviceTypes.push({ id: deviceTypeId, name: familyAndType, category, defaults: { powerPerUnitW: null, simultaneityFactor: 1, cosPhi: null, costGroup: null } });
|
||||
next.deviceTypes.push({ id: deviceTypeId, name: familyAndType, category, defaults: { powerPerUnitW: null, simultaneityFactor: 1, cosPhi: null, costGroup: null }, ...(next.schemaVersion === 2 ? { isSocket: quantityRule === "socketCount" } : {}) });
|
||||
next.familyTypeRules.push({ id: createClientId(), exactFamilyAndType: familyAndType, deviceTypeId, quantityRule });
|
||||
setConfiguration(next);
|
||||
await loadPlan(file, next);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue