feat(buchhaltung): recurring job, budget alerts, audit endpoint, konto-typen CRUD

This commit is contained in:
Matthias Hochmeister
2026-03-30 15:04:06 +02:00
parent bbbfc8eaaa
commit d833b3c224
7 changed files with 306 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ import type {
Freigabe,
Kategorie,
ErstattungFormData, ErstattungLinks,
BuchhaltungAudit,
} from '../types/buchhaltung.types';
export const buchhaltungApi = {
@@ -38,6 +39,17 @@ export const buchhaltungApi = {
const r = await api.get('/api/buchhaltung/konto-typen');
return r.data.data;
},
createKontoTyp: async (data: { bezeichnung: string; art: string; sort_order?: number }): Promise<KontoTyp> => {
const r = await api.post('/api/buchhaltung/konto-typen', data);
return r.data.data;
},
updateKontoTyp: async (id: number, data: Partial<{ bezeichnung: string; art: string; sort_order: number }>): Promise<KontoTyp> => {
const r = await api.patch(`/api/buchhaltung/konto-typen/${id}`, data);
return r.data.data;
},
deleteKontoTyp: async (id: number): Promise<void> => {
await api.delete(`/api/buchhaltung/konto-typen/${id}`);
},
// ── Bankkonten ───────────────────────────────────────────────────────────────
getBankkonten: async (): Promise<Bankkonto[]> => {
@@ -207,4 +219,10 @@ export const buchhaltungApi = {
const r = await api.get(`/api/buchhaltung/transaktionen/${transaktionId}/erstattung-links`);
return r.data.data;
},
// ── Audit ─────────────────────────────────────────────────────────────────
getAudit: async (transaktionId: number): Promise<BuchhaltungAudit[]> => {
const r = await api.get(`/api/buchhaltung/audit/${transaktionId}`);
return r.data.data;
},
};