new features

This commit is contained in:
Matthias Hochmeister
2026-03-23 16:09:42 +01:00
parent e9a9478aac
commit 8c66492b27
40 changed files with 2016 additions and 117 deletions

View File

@@ -9,6 +9,7 @@ import type {
UpdateFahrzeugPayload,
UpdateStatusPayload,
CreateWartungslogPayload,
UpdateWartungslogPayload,
StatusUpdateResponse,
} from '../types/vehicle.types';
@@ -94,6 +95,17 @@ export const vehiclesApi = {
return response.data.data;
},
async updateWartungslog(vehicleId: string, wartungId: string, payload: UpdateWartungslogPayload): Promise<FahrzeugWartungslog> {
const response = await api.patch<{ success: boolean; data: FahrzeugWartungslog }>(
`/api/vehicles/${vehicleId}/wartung/${wartungId}`,
payload
);
if (response.data?.data === undefined || response.data?.data === null) {
throw new Error('Invalid API response');
}
return response.data.data;
},
async exportAlerts(): Promise<Blob> {
const response = await api.get('/api/vehicles/alerts/export', {
responseType: 'blob',