new features
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user