mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-05 02:14:05 +00:00
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:
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -46,6 +46,8 @@ export const COST_CATEGORIES = [
|
||||
'fees',
|
||||
'health',
|
||||
'tips',
|
||||
'fuel',
|
||||
'parkings',
|
||||
'other',
|
||||
] as const;
|
||||
export type CostCategory = (typeof COST_CATEGORIES)[number];
|
||||
|
||||
Reference in New Issue
Block a user