diff options
| author | Joe Carstairs <me@joeac.net> | 2024-12-12 08:26:53 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2024-12-12 08:26:53 +0000 |
| commit | 8a30bcbdf9264d235bf93da3df8e170cfde53d02 (patch) | |
| tree | 5f9b6fe956c72b89a89cc936ab86ec1bffc271f5 /gui/src/types/budgetMap.ts | |
| parent | 51711fb42a44b452cdf1b4fd6a716d0251f23dda (diff) | |
Removes web GUI
Diffstat (limited to 'gui/src/types/budgetMap.ts')
| -rw-r--r-- | gui/src/types/budgetMap.ts | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/gui/src/types/budgetMap.ts b/gui/src/types/budgetMap.ts deleted file mode 100644 index 5fa09f2..0000000 --- a/gui/src/types/budgetMap.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Budget, newBudgetFromDto } from "./budget"; -import { Category } from "./category"; - -type BudgetMap<T extends { id: any }> = { - [id in T["id"]]: Budget | null; -}; - -function newCategoryBudgetMapFromDto(dto: unknown): BudgetMap<Category> { - return Object.fromEntries( - (dto as { category_id: number; budget: unknown }[]).map( - ({ category_id, budget }) => [category_id, newBudgetFromDto(budget)], - ), - ); -} - -export { type BudgetMap, newCategoryBudgetMapFromDto as newBudgetMapFromDto }; |
