new features

This commit is contained in:
Matthias Hochmeister
2026-03-23 14:01:39 +01:00
parent d2dc64d54a
commit 3326156b15
35 changed files with 1341 additions and 257 deletions

View File

@@ -131,8 +131,8 @@ export const eventsApi = {
},
/** Hard-delete an event permanently */
deleteEvent(id: string): Promise<void> {
return api.post(`/api/events/${id}/delete`).then(() => undefined);
deleteEvent(id: string, mode: 'all' | 'single' | 'future' = 'all'): Promise<void> {
return api.post(`/api/events/${id}/delete`, { mode }).then(() => undefined);
},
// -------------------------------------------------------------------------

View File

@@ -100,4 +100,17 @@ export const vehiclesApi = {
});
return response.data as Blob;
},
async getStatusHistory(id: string): Promise<{ alter_status: string; neuer_status: string; bemerkung?: string; geaendert_von_name?: string; erstellt_am: string }[]> {
return unwrap(api.get(`/api/vehicles/${id}/status-history`));
},
async uploadWartungFile(wartungId: number, file: File): Promise<any> {
const formData = new FormData();
formData.append('datei', file);
const r = await api.post(`/api/vehicles/wartung/${wartungId}/upload`, formData, {
headers: { 'Content-Type': 'multipart/form-data' },
});
return r.data.data;
},
};