Replace Revit CSV backend with Linear XLSX
This commit is contained in:
parent
52d3b1a270
commit
1cfeb06ec7
65 changed files with 4764 additions and 3717 deletions
|
|
@ -51,7 +51,7 @@ export function assertExternalObjectsCompatibleWithRow(input: {
|
|||
const roomIdByMappingId = new Map(mappings.map((mapping) => [mapping.id, mapping.roomId]));
|
||||
const markers = new Set(
|
||||
input.allLinkedObjects.map((object) =>
|
||||
object.acceptedSourceValues.selectionMarker.trim()
|
||||
scalarText(object.acceptedSourceValues.selectionMarker).trim()
|
||||
)
|
||||
);
|
||||
if (markers.size > 1) {
|
||||
|
|
@ -118,13 +118,17 @@ function matchesRowPlanningValues(
|
|||
row.category === planning.category &&
|
||||
row.connectionKind === planning.connectionKind &&
|
||||
(planning.powerPerUnitW === null || row.powerPerUnit === planning.powerPerUnitW / 1000) &&
|
||||
row.simultaneityFactor === planning.simultaneityFactor &&
|
||||
row.simultaneityFactor === (planning.simultaneityFactor ?? 1) &&
|
||||
row.cosPhi === planning.cosPhi &&
|
||||
row.costGroup === planning.costGroup &&
|
||||
row.remark === planning.remark
|
||||
);
|
||||
}
|
||||
|
||||
function scalarText(value: string | number | boolean | null) {
|
||||
return value === null ? "" : String(value);
|
||||
}
|
||||
|
||||
function canonicalJson(value: unknown): string {
|
||||
if (Array.isArray(value)) return `[${value.map(canonicalJson).join(",")}]`;
|
||||
if (value !== null && typeof value === "object") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue