Task: added pagination to records page, removed initial onboarding income from activity chart
Some checks failed
Deploy / deploy (push) Failing after 23s
Security Tests / security-non-db (push) Successful in 20s
Security Tests / security-db (push) Successful in 26s

This commit is contained in:
2026-03-25 22:36:10 -05:00
parent ad82e914fc
commit 1bd550b428
9 changed files with 117 additions and 20 deletions

View File

@@ -294,9 +294,6 @@ export default function IncomePage() {
const payload: CreateIncomeInput = {
amountCents,
};
if (debugNowISO) {
payload.occurredAtISO = debugNowISO;
}
const trimmedNote = notes.trim();
if (trimmedNote) {

View File

@@ -74,6 +74,7 @@ const defaultSchedule = (): AutoPaySchedule => ({
});
const DEFAULT_SAVINGS_PERCENT = 20;
const MIN_SAVINGS_PERCENT = DEFAULT_SAVINGS_PERCENT;
const ONBOARDING_SEED_NOTE_MARKER = "[onboarding-seed]";
const normalizeCategoryName = (value: string) => value.trim().toLowerCase();
const normalizePercentValue = (value: unknown) => {
const parsed =
@@ -476,7 +477,10 @@ export default function OnboardingPage() {
});
} else {
// Use regular income allocation for regular income
await apiPost("/income", { amountCents: budgetCents });
await apiPost("/income", {
amountCents: budgetCents,
note: `Initial budget setup ${ONBOARDING_SEED_NOTE_MARKER}`,
});
}
}

View File

@@ -15,7 +15,7 @@ export default function TransactionsPage() {
const [catFilter, setCatFilter] = useState<string>("all");
const [dateFilter, setDateFilter] = useState<"month" | "30" | "all">("month");
const [page, setPage] = useState(1);
const limit = 100;
const limit = 10;
// Get current date in user's timezone
const todayStr = getTodayInTimezone(userTimezone);
@@ -53,14 +53,16 @@ export default function TransactionsPage() {
const total = txQuery.data?.total ?? 0;
const catOptions = useMemo(() => {
if (transactions.length === 0) return [];
const buckets = new Map<string, string>();
transactions.forEach((t) => {
if (t.categoryId && t.categoryName) buckets.set(t.categoryId, t.categoryName);
if (t.planId && t.planName) buckets.set(t.planId, t.planName);
});
return Array.from(buckets.entries()).map(([id, name]) => ({ id, name }));
}, [transactions]);
const categoryOptions = (dashboard?.variableCategories ?? []).map((c) => ({
id: c.id,
name: c.name,
}));
const planOptions = (dashboard?.fixedPlans ?? []).map((p) => ({
id: p.id,
name: p.name,
}));
return [...categoryOptions, ...planOptions];
}, [dashboard?.variableCategories, dashboard?.fixedPlans]);
@@ -74,7 +76,7 @@ export default function TransactionsPage() {
<div className="flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center">
<input
className="input w-full sm:w-56"
placeholder="Search..."
placeholder="Search category, note, amount, or date..."
value={search}
onChange={(e) => {
setSearch(e.target.value);