Rewrite frontend, added rooms, voltage selection per project, startet with todos

This commit is contained in:
2026-05-01 17:07:56 +02:00
parent 81d47ce16f
commit 65819900b1
49 changed files with 3695 additions and 394 deletions
+118
View File
@@ -1,14 +1,34 @@
export interface ProjectDto {
id: string;
name: string;
singlePhaseVoltageV: number;
threePhaseVoltageV: number;
}
export interface ConsumerWithCalculatedValues {
id: string;
projectId: string;
distributionBoardId?: string | null;
circuitListId?: string | null;
roomId?: string | null;
roomNumber?: string;
roomName?: string;
floorId?: string;
floorName?: string;
circuitNumber?: string;
description?: string;
name: string;
category?: string;
deviceType?: string;
phaseType?: string;
tradeOrCostGroup?: string;
group?: string;
protectionType?: string;
protectionRatedCurrent?: number;
protectionCharacteristic?: string;
cableType?: string;
cableCrossSection?: string;
comment?: string;
quantity: number;
installedPowerPerUnitKw: number;
demandFactor: number;
@@ -18,6 +38,7 @@ export interface ConsumerWithCalculatedValues {
note?: string;
installedPowerKw: number;
demandPowerKw: number;
effectiveVoltageV?: number;
currentA?: number;
}
@@ -27,11 +48,74 @@ export interface DistributionBoardDto {
name: string;
}
export interface CircuitListDto {
id: string;
projectId: string;
distributionBoardId: string;
name: string;
}
export interface FloorDto {
id: string;
projectId: string;
name: string;
sortOrder: number;
}
export interface RoomDto {
id: string;
projectId: string;
floorId: string | null;
roomNumber: string;
roomName: string;
}
export interface GlobalDeviceDto {
id: string;
name: string;
category: string | null;
quantity: number;
installedPowerPerUnitKw: number;
demandFactor: number;
voltageV: number | null;
phaseCount: 1 | 3 | null;
powerFactor: number | null;
note: string | null;
}
export interface ProjectDeviceDto {
id: string;
projectId: string;
name: string;
category: string | null;
quantity: number;
installedPowerPerUnitKw: number;
demandFactor: number;
voltageV: number | null;
phaseCount: 1 | 3 | null;
powerFactor: number | null;
note: string | null;
}
export interface CreateConsumerInput {
projectId: string;
distributionBoardId?: string;
circuitListId?: string;
roomId?: string;
circuitNumber?: string;
description?: string;
name: string;
category?: string;
deviceType?: string;
phaseType?: string;
tradeOrCostGroup?: string;
group?: string;
protectionType?: string;
protectionRatedCurrent?: number;
protectionCharacteristic?: string;
cableType?: string;
cableCrossSection?: string;
comment?: string;
quantity: number;
installedPowerPerUnitKw: number;
demandFactor: number;
@@ -42,3 +126,37 @@ export interface CreateConsumerInput {
}
export interface UpdateConsumerInput extends CreateConsumerInput {}
export interface CreateFloorInput {
name: string;
}
export interface CreateRoomInput {
floorId?: string;
roomNumber: string;
roomName: string;
}
export interface CreateGlobalDeviceInput {
name: string;
category?: string;
quantity: number;
installedPowerPerUnitKw: number;
demandFactor: number;
voltageV?: number;
phaseCount?: 1 | 3;
powerFactor?: number;
note?: string;
}
export interface CreateProjectDeviceInput {
name: string;
category?: string;
quantity: number;
installedPowerPerUnitKw: number;
demandFactor: number;
voltageV?: number;
phaseCount?: 1 | 3;
powerFactor?: number;
note?: string;
}