feat: add account hierarchy, budget types (GWG/Anlagen/Instandhaltung), and Buchhaltung UI overhaul with collapsible tree, pending badge, and konto detail page
This commit is contained in:
@@ -5,6 +5,13 @@ export type TransaktionStatus = 'entwurf' | 'gebucht' | 'freigegeben' | 'stornie
|
||||
export type FreigabeStatus = 'ausstehend' | 'genehmigt' | 'abgelehnt';
|
||||
export type WiederkehrendIntervall = 'monatlich' | 'quartalsweise' | 'halbjaehrlich' | 'jaehrlich';
|
||||
export type PlanungStatus = 'entwurf' | 'aktiv' | 'abgeschlossen';
|
||||
export type AusgabenTyp = 'gwg' | 'anlagen' | 'instandhaltung';
|
||||
|
||||
export const AUSGABEN_TYP_LABELS: Record<AusgabenTyp, string> = {
|
||||
gwg: 'GWG',
|
||||
anlagen: 'Anlagen',
|
||||
instandhaltung: 'Instandhaltung',
|
||||
};
|
||||
|
||||
// Label maps
|
||||
export const TRANSAKTION_STATUS_LABELS: Record<TransaktionStatus, string> = {
|
||||
@@ -79,7 +86,10 @@ export interface Konto {
|
||||
konto_typ_id: number | null;
|
||||
kontonummer: string;
|
||||
bezeichnung: string;
|
||||
budget_betrag: number;
|
||||
parent_id: number | null;
|
||||
budget_gwg: number;
|
||||
budget_anlagen: number;
|
||||
budget_instandhaltung: number;
|
||||
notizen: string | null;
|
||||
aktiv: boolean;
|
||||
erstellt_von: string | null;
|
||||
@@ -88,6 +98,15 @@ export interface Konto {
|
||||
// Joined fields
|
||||
konto_typ_bezeichnung?: string;
|
||||
konto_typ_art?: KontoArt;
|
||||
parent_bezeichnung?: string;
|
||||
}
|
||||
|
||||
export interface KontoTreeNode extends Konto {
|
||||
spent_gwg: number;
|
||||
spent_anlagen: number;
|
||||
spent_instandhaltung: number;
|
||||
einnahmen_betrag: number;
|
||||
children: KontoTreeNode[];
|
||||
}
|
||||
|
||||
export interface KontoBudgetInfo extends Konto {
|
||||
@@ -113,6 +132,8 @@ export interface Transaktion {
|
||||
beleg_nr: string | null;
|
||||
status: TransaktionStatus;
|
||||
bestellung_id: number | null;
|
||||
ausgaben_typ: AusgabenTyp | null;
|
||||
wiederkehrend_id: number | null;
|
||||
erstellt_von: string | null;
|
||||
gebucht_von: string | null;
|
||||
erstellt_am: string;
|
||||
@@ -200,7 +221,10 @@ export interface KontoFormData {
|
||||
konto_typ_id?: number;
|
||||
kontonummer: string;
|
||||
bezeichnung: string;
|
||||
budget_betrag?: number;
|
||||
budget_gwg: number;
|
||||
budget_anlagen: number;
|
||||
budget_instandhaltung: number;
|
||||
parent_id?: number | null;
|
||||
notizen?: string;
|
||||
}
|
||||
|
||||
@@ -216,6 +240,7 @@ export interface TransaktionFormData {
|
||||
verwendungszweck?: string;
|
||||
beleg_nr?: string;
|
||||
bestellung_id?: number | null;
|
||||
ausgaben_typ?: AusgabenTyp | null;
|
||||
}
|
||||
|
||||
// Filter type for transaction list
|
||||
@@ -241,3 +266,9 @@ export interface WiederkehrendFormData {
|
||||
naechste_ausfuehrung: string;
|
||||
aktiv?: boolean;
|
||||
}
|
||||
|
||||
export interface KontoDetailResponse {
|
||||
konto: Konto;
|
||||
children: KontoTreeNode[];
|
||||
transaktionen: Transaktion[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user