All first todos completed
This commit is contained in:
@@ -10,6 +10,8 @@ export interface ConsumerWithCalculatedValues {
|
||||
projectId: string;
|
||||
distributionBoardId?: string | null;
|
||||
circuitListId?: string | null;
|
||||
projectDeviceId?: string | null;
|
||||
isLinkedToDevice?: boolean;
|
||||
roomId?: string | null;
|
||||
roomNumber?: string;
|
||||
roomName?: string;
|
||||
@@ -73,6 +75,7 @@ export interface RoomDto {
|
||||
export interface GlobalDeviceDto {
|
||||
id: string;
|
||||
name: string;
|
||||
displayName: string;
|
||||
category: string | null;
|
||||
quantity: number;
|
||||
installedPowerPerUnitKw: number;
|
||||
@@ -87,6 +90,7 @@ export interface ProjectDeviceDto {
|
||||
id: string;
|
||||
projectId: string;
|
||||
name: string;
|
||||
displayName: string;
|
||||
category: string | null;
|
||||
quantity: number;
|
||||
installedPowerPerUnitKw: number;
|
||||
@@ -101,6 +105,8 @@ export interface CreateConsumerInput {
|
||||
projectId: string;
|
||||
distributionBoardId?: string;
|
||||
circuitListId?: string;
|
||||
projectDeviceId?: string;
|
||||
isLinkedToDevice?: boolean;
|
||||
roomId?: string;
|
||||
circuitNumber?: string;
|
||||
description?: string;
|
||||
@@ -139,6 +145,7 @@ export interface CreateRoomInput {
|
||||
|
||||
export interface CreateGlobalDeviceInput {
|
||||
name: string;
|
||||
displayName: string;
|
||||
category?: string;
|
||||
quantity: number;
|
||||
installedPowerPerUnitKw: number;
|
||||
@@ -151,6 +158,7 @@ export interface CreateGlobalDeviceInput {
|
||||
|
||||
export interface CreateProjectDeviceInput {
|
||||
name: string;
|
||||
displayName: string;
|
||||
category?: string;
|
||||
quantity: number;
|
||||
installedPowerPerUnitKw: number;
|
||||
|
||||
@@ -143,6 +143,12 @@ export function deleteGlobalDevice(globalDeviceId: string) {
|
||||
return request<void>(`/api/global-devices/${globalDeviceId}`, { method: "DELETE" });
|
||||
}
|
||||
|
||||
export function copyProjectDeviceToGlobal(projectId: string, projectDeviceId: string) {
|
||||
return request<GlobalDeviceDto>(`/api/global-devices/import-project/${projectId}/${projectDeviceId}`, {
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
export function listProjectDevices(projectId: string) {
|
||||
return request<ProjectDeviceDto[]>(`/api/project-devices/projects/${projectId}`);
|
||||
}
|
||||
@@ -170,3 +176,9 @@ export function deleteProjectDevice(projectId: string, projectDeviceId: string)
|
||||
method: "DELETE",
|
||||
});
|
||||
}
|
||||
|
||||
export function copyGlobalDeviceToProject(projectId: string, globalDeviceId: string) {
|
||||
return request<ProjectDeviceDto>(`/api/project-devices/projects/${projectId}/import-global/${globalDeviceId}`, {
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user