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.
This commit is contained in:
null 2026-05-10 17:28:26 -05:00
parent ba888c1c6f
commit 6d42453e07
5 changed files with 11 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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.' },
],
};

View File

@ -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),
});

View File

@ -1,6 +1,6 @@
{
"name": "bill-tracker",
"version": "0.24.1",
"version": "0.24.2",
"description": "Monthly bill tracking system",
"main": "server.js",
"scripts": {