Budgets: the first list shows every spending category, each with an X to remove it
It only showed categories you spend $10+ a month on. Now every spending category is listed, biggest first, so nothing is hidden. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fb8e5425c3
commit
3af9e7b306
1 file changed
+3
-2
@@ -91,8 +91,9 @@ export function BudgetEditor({ basis, cats: all, initial, year, range, today, in
|
|||||||
apply({ [c.id]: c.suggested }, c.suggested ? `Added ${c.label} · ${money0(c.suggested)}` : undefined);
|
apply({ [c.id]: c.suggested }, c.suggested ? `Added ${c.label} · ${money0(c.suggested)}` : undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fills main categories that have no budget yet; amounts you set stay.
|
// The first-time list: every spending category with no budget yet, biggest first, so nothing is hidden and the X
|
||||||
const suggestion = cats.filter((c) => c.main && !(c.id in budgets)).sort((a, b) => b.suggested - a.suggested);
|
// on each row takes off what you don't want. Amounts you set stay.
|
||||||
|
const suggestion = cats.filter((c) => !(c.id in budgets)).sort((a, b) => b.suggested - a.suggested || a.label.localeCompare(b.label));
|
||||||
// The Suggest sheet: budgets well off from real spending, plus main categories with none yet.
|
// The Suggest sheet: budgets well off from real spending, plus main categories with none yet.
|
||||||
const retuned = retune(cats, budgets);
|
const retuned = retune(cats, budgets);
|
||||||
// Saves exactly what the suggestion list shows after any edits.
|
// Saves exactly what the suggestion list shows after any edits.
|
||||||
|
|||||||
Reference in new issue
Block a user