Add savings chat analysis feature

This commit is contained in:
Matthias
2026-06-15 18:26:25 +02:00
parent d65e7681ac
commit 4869402d45
26 changed files with 2789 additions and 163 deletions

View File

@@ -0,0 +1,17 @@
export type CategoryBreakdownItem = {
name: string;
amount: number;
color: string;
block?: "wiederkehrend" | "variabel";
};
export type CategoryPieItem = CategoryBreakdownItem & {
chartAmount: number;
};
export function toCategoryPieData(data: CategoryBreakdownItem[]): CategoryPieItem[] {
return data.map((item) => ({
...item,
chartAmount: Math.abs(item.amount),
}));
}