Add external row quantity foundation

This commit is contained in:
Julian Appel 2026-08-02 18:26:22 +02:00
parent bc2bc7ece5
commit dac19b093c
30 changed files with 2750 additions and 22 deletions

View file

@ -61,6 +61,7 @@ export function toCircuitDeviceRowSnapshot(
roomNumberSnapshot: row.roomNumberSnapshot,
roomNameSnapshot: row.roomNameSnapshot,
quantity: row.quantity,
manualQuantity: row.manualQuantity,
powerPerUnit: row.powerPerUnit,
simultaneityFactor: row.simultaneityFactor,
cosPhi: row.cosPhi,
@ -68,3 +69,10 @@ export function toCircuitDeviceRowSnapshot(
overriddenFields: row.overriddenFields,
};
}
export function toCircuitDeviceRowInsertValues(row: CircuitDeviceRowSnapshot) {
return {
...row,
manualQuantity: row.manualQuantity ?? row.quantity,
};
}