BillTracker/client/pages
null a15f00c568 refactor(client): single source of truth for money formatting (IMP-CODE-01)
The client had ~15 hand-rolled currency formatters (local `fmt`/`money`/
`fmtFull`/`fmtDollars`/…) plus a canonical `fmt` in lib/utils used at ~190
sites — same rules copy-pasted, with inconsistent handling of negatives,
whole-dollar, cents vs dollars, and blank input.

Add client/lib/money.js as the one implementation:
  - formatUSD(dollars)      — "$1,234.56" (whole/dash options)
  - formatUSDWhole(dollars) — "$1,235"
  - formatCentsUSD(cents)   — from integer cents; signed "+/-" and dash options
Inputs are coerced so null/''/NaN never render as "$NaN", and -0 is
normalized so it never shows as "-$0.00".

lib/utils.fmt now delegates to formatUSD (byte-identical — the existing
utils.test.js fmt suite is the regression guard), and the 15 local
formatters delegate to money.js. No display currency formatting remains
outside money.js; the /100 conversions left behind are calculations
(form prefill), not display.

Tests: client/lib/money.test.js (13). Full client suite 46 pass; build clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 12:46:22 -05:00
..
AboutPage.jsx chore(cleanup): remove legacy/public HTML files, retire /legacy route, update docs and About page 2026-06-11 23:50:27 -05:00
AdminPage.jsx fix(admin): admin/profile routes and services 2026-06-07 21:18:02 -05:00
AnalyticsPage.jsx refactor(client): single source of truth for money formatting (IMP-CODE-01) 2026-07-03 12:46:22 -05:00
BankTransactionsPage.jsx feat(banking): bank transactions page with merchant/store matching, transaction matching refactor, bank sync improvements (batch 0.40.0) 2026-06-14 15:15:31 -05:00
BillsPage.jsx fix(qa): seed demo data amounts, bill amount validation, negative USD format, a11y aria-labels, Playwright E2E setup (batch 0.41.0 QA) 2026-07-02 20:36:09 -05:00
CalendarPage.jsx fix(ui): calendar settings improvements 2026-06-07 16:52:50 -05:00
CategoriesPage.jsx fix(qa): resolve a11y nested-interactive on Categories & Snowball rows 2026-07-02 21:02:15 -05:00
DataPage.jsx feat: admin UX cleanup, bills page reordering, subscriptions page cadence sort + in-place edits, summary polish 2026-06-06 23:53:53 -05:00
HealthPage.jsx style: global readability/theme pass 2026-05-28 23:18:14 -05:00
LoginPage.jsx feat: TOTP 2FA for login & profile setup flow 2026-06-04 04:10:14 -05:00
NotFoundPage.jsx feat: merge pipeline workflow into bill-tracker (batch v0.36.0) 2026-06-03 20:28:37 -05:00
PayoffPage.jsx refactor(client): single source of truth for money formatting (IMP-CODE-01) 2026-07-03 12:46:22 -05:00
PrivacyPage.jsx v0.28.0 2026-05-15 22:45:38 -05:00
ProfilePage.jsx feat(settings): auto-save preferences with live save status (batch 0.39.0) 2026-06-12 02:08:42 -05:00
ReleaseNotesPage.jsx v0.28.0 2026-05-15 22:45:38 -05:00
RoadmapPage.jsx feat: framer-motion page transitions and UI polish 2026-06-07 15:14:09 -05:00
SettingsPage.jsx feat(settings): auto-save preferences with live save status (batch 0.39.0) 2026-06-12 02:08:42 -05:00
SnowballPage.jsx refactor(client): single source of truth for money formatting (IMP-CODE-01) 2026-07-03 12:46:22 -05:00
SpendingPage.jsx refactor(client): single source of truth for money formatting (IMP-CODE-01) 2026-07-03 12:46:22 -05:00
StatusPage.jsx fix(qa): version check is opt-out-able (QA-B16-01) 2026-07-03 10:05:37 -05:00
SubscriptionCatalogPage.jsx feat: dedicated subscription catalog page, evidence badges, price display in recommendations 2026-06-06 20:44:54 -05:00
SubscriptionsPage.jsx refactor(client): single source of truth for money formatting (IMP-CODE-01) 2026-07-03 12:46:22 -05:00
SummaryPage.jsx feat: framer-motion page transitions and UI polish 2026-06-07 15:14:09 -05:00
TrackerPage.jsx fix(qa): seed demo data amounts, bill amount validation, negative USD format, a11y aria-labels, Playwright E2E setup (batch 0.41.0 QA) 2026-07-02 20:36:09 -05:00