feat: show budget folders on month page

This commit is contained in:
Lucas Winther
2026-09-30 00:50:42 +02:00
parent e715160235
commit d3c14857fc
5 changed files with 143 additions and 21 deletions
+7 -1
View File
@@ -25,6 +25,12 @@ const d = createSeedDataset("2026-01", FALLBACK_FX_RATES);
const [games, food, social] = d.posts as [typeof d.posts[0], typeof d.posts[0], typeof d.posts[0]];
const rent = actions.addPost(d, "Rent", "DKK");
const transport = actions.addPost(d, "Transport", "DKK");
const housing = actions.addBudgetFolder(d, "Housing", null);
const utilities = actions.addBudgetFolder(d, "Small bills", housing.id);
rent.folderId = housing.id;
const smallBills = actions.addPost(d, "Household bills", "DKK");
smallBills.folderId = utilities.id;
for (const name of ["Internet", "Phone"]) actions.addRecurringCost(d, { name, folderId: utilities.id, archived: false, amount: { amount: name === "Internet" ? 249 : 129, currency: "DKK" }, startDate: "2026-09", recurrence: { kind: "everyNMonths", n: 1 }, anchoring: "calendar", splitMode: "percent", splits: [{ postId: smallBills.id, value: 100, absorbsRemainder: true }] });
const savings = actions.addPost(d, "Savings", "DKK");
for (let m = 1; m <= 9; m++) {
@@ -58,7 +64,7 @@ const wowSub = actions.addRecurringCost(d, {
});
actions.addRecurringCost(d, {
name: "Rent",
folderId: null,
folderId: housing.id,
archived: false,
amount: { amount: 8200, currency: "DKK" },
startDate: "2026-06",