feat: organize posts and bills in settings

This commit is contained in:
Lucas Winther committed 2026-09-30 00:35:45 +02:00
1 parent 6de115843b
commit 725c836788
5 files changed
+157 -31

No files matched your search

+2 -18
View File
@@ -8,7 +8,6 @@ import {
addRecurringCost,
addRecurringCostWithPost,
endRecurringCost,
moveRecurringCost,
restoreRecurringCost,
setRecurringCostEndedFrom,
updateRecurringCost,
@@ -213,6 +212,7 @@ export function RecurringSection() {
title="Recurring costs"
hint="Bills that repeat. Each one projects forward as EXPECTED spending and is confirmed from the month view when the money actually moves — expected never touches a post's real balance. Anchoring decides where the next charge is measured from: the calendar, or the date the last one actually charged. Use the second for a bill that can charge early, like a phone plan that recharges when its data runs out."
>
<p className="mb-3 text-xs"><a className="underline underline-offset-2" href="#budget-folders">Move and reorder bills in Budget folders</a></p>
{error && <p role="alert" className="mb-3 text-sm text-destructive">Could not save: {error}</p>}
{ordered.length === 0 ? (
<p className="text-sm text-budget-ink-muted">
@@ -233,7 +233,7 @@ export function RecurringSection() {
</tr>
</thead>
<tbody>
{ordered.map((cost, index) => (<Fragment key={cost.id}>
{ordered.map((cost) => (<Fragment key={cost.id}>
<tr
data-bill-id={cost.id}
className={`border-b last:border-0 ${cost.archived ? "opacity-50" : ""}`}
@@ -325,22 +325,6 @@ export function RecurringSection() {
setEditingId(cost.id);
setEditSelection({ splitMode: cost.splitMode, splits: cost.splits.map(split => ({ ...split })) });
}}>Edit</Button>
<Button
size="xs"
variant="ghost"
disabled={index === 0}
onClick={() => mutate((draft) => moveRecurringCost(draft, cost.id, -1))}
>
up
</Button>
<Button
size="xs"
variant="ghost"
disabled={index === ordered.length - 1}
onClick={() => mutate((draft) => moveRecurringCost(draft, cost.id, 1))}
>
down
</Button>
<Button
size="xs"
variant="ghost"