forked from jappel/leistungsbilanz-ts
Remove project device mirror fields
This commit is contained in:
parent
3fbf3ac622
commit
30d6f1a2e1
10 changed files with 1588 additions and 20 deletions
|
|
@ -37,12 +37,7 @@ export class ProjectDeviceRepository {
|
|||
simultaneityFactor: input.simultaneityFactor,
|
||||
cosPhi: input.cosPhi ?? null,
|
||||
remark: input.remark ?? null,
|
||||
installedPowerPerUnitKw: input.powerPerUnit,
|
||||
demandFactor: input.simultaneityFactor,
|
||||
voltageV: input.voltageV ?? null,
|
||||
phaseCount: input.phaseType === "three_phase" ? 3 : 1,
|
||||
powerFactor: input.cosPhi ?? null,
|
||||
note: input.remark ?? null,
|
||||
});
|
||||
const created = await this.findById(projectId, id);
|
||||
if (!created) {
|
||||
|
|
@ -77,12 +72,7 @@ export class ProjectDeviceRepository {
|
|||
simultaneityFactor: input.simultaneityFactor,
|
||||
cosPhi: input.cosPhi ?? null,
|
||||
remark: input.remark ?? null,
|
||||
installedPowerPerUnitKw: input.powerPerUnit,
|
||||
demandFactor: input.simultaneityFactor,
|
||||
voltageV: input.voltageV ?? null,
|
||||
phaseCount: input.phaseType === "three_phase" ? 3 : 1,
|
||||
powerFactor: input.cosPhi ?? null,
|
||||
note: input.remark ?? null,
|
||||
})
|
||||
.where(
|
||||
and(eq(projectDevices.id, projectDeviceId), eq(projectDevices.projectId, projectId))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue