forked from jappel/leistungsbilanz-ts
Add Revit CSV project dialog
This commit is contained in:
parent
caa6caf99f
commit
a9d6301753
8 changed files with 386 additions and 4 deletions
|
|
@ -26,7 +26,10 @@ import type {
|
|||
ProjectDto,
|
||||
RoomDto,
|
||||
CircuitTreeResponseDto,
|
||||
ExternalCsvConfigurationSnapshotDto,
|
||||
ExternalCsvPreviewDto,
|
||||
} from "../types";
|
||||
import type { ExternalCsvConfiguration } from "../../external-model/csv/external-csv-contracts";
|
||||
import type { ProjectDeviceSyncField } from "../../shared/constants/project-device-sync-fields";
|
||||
import {
|
||||
createCircuitUpdateProjectCommand,
|
||||
|
|
@ -334,6 +337,39 @@ export function updateDistributionBoard(
|
|||
);
|
||||
}
|
||||
|
||||
export function getExternalCsvConfiguration(projectId: string) {
|
||||
return request<{ configuration: ExternalCsvConfigurationSnapshotDto | null }>(
|
||||
`/api/projects/${projectId}/external-csv/configuration`
|
||||
);
|
||||
}
|
||||
|
||||
export function updateExternalCsvConfiguration(
|
||||
projectId: string,
|
||||
expectedRevision: number,
|
||||
configuration: ExternalCsvConfiguration
|
||||
) {
|
||||
return request<
|
||||
ProjectCommandResultDto & { configuration: ExternalCsvConfigurationSnapshotDto }
|
||||
>(`/api/projects/${projectId}/external-csv/configuration`, {
|
||||
method: "PUT",
|
||||
body: JSON.stringify({ expectedRevision, configuration }),
|
||||
});
|
||||
}
|
||||
|
||||
export function previewExternalCsv(
|
||||
projectId: string,
|
||||
fileName: string,
|
||||
contentBase64: string
|
||||
) {
|
||||
return request<ExternalCsvPreviewDto>(
|
||||
`/api/projects/${projectId}/external-csv/preview`,
|
||||
{
|
||||
method: "POST",
|
||||
body: JSON.stringify({ fileName, contentBase64 }),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function copyDistributionBoard(
|
||||
projectId: string,
|
||||
distributionBoardId: string,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue