new features
This commit is contained in:
@@ -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