Changeset f023e5d

Timestamp:
02/22/26 22:58:21 (11 days ago)
Author:
Vasilaki Tocili <vasilakigorgi@…>
Branches:
nextjs
Children:
f5f1d89
Parents:
e2234a0
Message:

feat: implemented History Page

Implemented HistoryPage with search, filter, tag pills and pagination:

  • Rewrote getHistoryTransactions and getHistoryTransactionPages in lib/queries.ts with:
    • A unified query param that searches transaction names, account names and tag names via ILIKE
    • page + OFFSET support (10 items per page via HISTORY_ITEMS_PER_PAGE)
    • New getHistoryTransactionPages() count query for total pages
    • tags?: string[] intersection filter — transaction must have ALL selected tags (subquery COUNT match)
  • New client components (following the Next.js search & pagination pattern):
    • search.tsx — debounced search input writing ?query= to URL, improved visibility (bg-white/15, placeholder text-white/50)
    • account-filter.tsx — compact WalletIcon button with custom floating dropdown writing ?accountId= to URL; turns blue when a filter is active
    • tag-filter.tsx — horizontally scrollable, multi-selectable tag pills writing ?tags=tag1,tag2 to URL; selecting multiple tags filters to transactions that have all of them (intersection)
    • pagination.tsx — page nav using generatePagination from utils
    • transaction-list.tsx — renders transactions with formatMKD, formatDateToLocal, tag pills and colored amounts; normalises postgres.js array output to handle both parsed arrays and raw PG literal strings
  • app/(app)/history/page.tsx — server component that reads searchParams (query, accountId, tags, page), fetches all data in parallel (getHistoryTransactions, getHistoryTransactionPages, getUserTransactionAccounts, getUserTagsForHistory), and composes all client components

and colored amounts

  • app/(app)/history/page.tsx/history/page.tsx, server component that reads searchParams, fetches data in parallel, and composes all the client components
(No files)

Note: See TracChangeset for help on using the changeset viewer.