From 6d42453e0724faa7bec611f283414eab8cb802b9 Mon Sep 17 00:00:00 2001 From: null Date: Sun, 10 May 2026 17:28:26 -0500 Subject: [PATCH] fix: status badge toggle-paid using wrong property name (v0.24.2) handleTogglePaid() was using row.bill_id instead of row.id, causing the API call to fail with an undefined bill ID. Clicking status badges (Late, Due Soon, Upcoming, Missed) now correctly toggles paid/unpaid. --- FUTURE.md | 2 +- HISTORY.md | 5 +++++ client/lib/version.js | 6 +++--- client/pages/TrackerPage.jsx | 2 +- package.json | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/FUTURE.md b/FUTURE.md index 3c4582a..77105a1 100644 --- a/FUTURE.md +++ b/FUTURE.md @@ -3,7 +3,7 @@ **This document tracks potential future enhancements for Bill Tracker.** **Last Updated:** 2026-05-10 -**Current Version:** v0.24.1 +**Current Version:** v0.24.2 ## How to Use This Document diff --git a/HISTORY.md b/HISTORY.md index deb1406..68bffb8 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,10 @@ # Bill Tracker — Changelog +## v0.24.2 + +### Fixed +- **StatusBadge toggle-paid broken** — `handleTogglePaid()` was using `row.bill_id` instead of `row.id`, causing the API call to fail with an undefined bill ID. Clicking Late/Due Soon/Upcoming/Missed badges now correctly toggles paid/unpaid status. + ## v0.24.1 ### Added diff --git a/client/lib/version.js b/client/lib/version.js index 380ca32..8b3a1aa 100644 --- a/client/lib/version.js +++ b/client/lib/version.js @@ -1,10 +1,10 @@ -export const APP_VERSION = '0.24.1'; +export const APP_VERSION = '0.24.2'; export const APP_NAME = 'BillTracker'; export const RELEASE_NOTES = { - version: '0.24.1', + version: '0.24.2', date: '2026-05-10', highlights: [ - { icon: '⚠️', title: 'Export Privacy Warning', desc: 'Added visible warning that exports may contain sensitive account metadata. Updated "What\'s included" list to show new export fields (monthly starting amounts, history ranges).' }, + { icon: '🐛', title: 'StatusBadge Toggle Fix', desc: 'Fixed clicking status badges (Late, Due Soon, etc.) to toggle paid/unpaid — was passing wrong property name to API.' }, ], }; \ No newline at end of file diff --git a/client/pages/TrackerPage.jsx b/client/pages/TrackerPage.jsx index 9ed8d1d..7a1833a 100644 --- a/client/pages/TrackerPage.jsx +++ b/client/pages/TrackerPage.jsx @@ -833,7 +833,7 @@ function Row({ row, year, month, refresh, index, onEditBill }) { async function handleTogglePaid() { setLoading?.(true); try { - const result = await api.togglePaid(row.bill_id, { + const result = await api.togglePaid(row.id, { amount: isPaid ? undefined : threshold, paid_date: new Date().toISOString().slice(0, 10), }); diff --git a/package.json b/package.json index 1e8384e..63e0db6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bill-tracker", - "version": "0.24.1", + "version": "0.24.2", "description": "Monthly bill tracking system", "main": "server.js", "scripts": {