feat(budget): add "Fuel" and "Parking" expense categories

- Adds two new fixed budget categories: fuel ("Fuel") and parkings
  ("Parking"), alongside the existing set (Accommodation, Food & drink,
  Groceries, Transport, Flights, Activities, Sightseeing, Shopping,
  Fees & tickets, Health, Tips, Other).
- Icon/color metadata added for both (Fuel and ParkingCircle from
  lucide-react), plus legacy free-text aliases (gas/petrol->fuel,
  parking->parkings) for existing/imported expense rows.
- Label strings added for all 23 supported locales.
- Adds test coverage for the new categories and legacy alias mapping.
This commit is contained in:
MikeDabrowski
2026-08-08 22:43:19 +02:00
committed by Maurice
parent 875f87b885
commit 999236f944
27 changed files with 95 additions and 1 deletions
+8
View File
@@ -3,6 +3,7 @@ import {
budgetUpdateMembersRequestSchema,
budgetToggleMemberPaidRequestSchema,
budgetReorderItemsRequestSchema,
COST_CATEGORIES,
} from './budget.schema';
import { describe, it, expect } from 'vitest';
@@ -41,3 +42,10 @@ describe('budgetReorderItemsRequestSchema', () => {
expect(budgetReorderItemsRequestSchema.safeParse({ orderedIds: ['a'] }).success).toBe(false);
});
});
describe('COST_CATEGORIES', () => {
it('includes fuel and parkings alongside the existing fixed categories', () => {
expect(COST_CATEGORIES).toContain('fuel');
expect(COST_CATEGORIES).toContain('parkings');
});
});
+2
View File
@@ -46,6 +46,8 @@ export const COST_CATEGORIES = [
'fees',
'health',
'tips',
'fuel',
'parkings',
'other',
] as const;
export type CostCategory = (typeof COST_CATEGORIES)[number];