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:
parent
ba888c1c6f
commit
6d42453e07
|
|
@ -3,7 +3,7 @@
|
||||||
**This document tracks potential future enhancements for Bill Tracker.**
|
**This document tracks potential future enhancements for Bill Tracker.**
|
||||||
|
|
||||||
**Last Updated:** 2026-05-10
|
**Last Updated:** 2026-05-10
|
||||||
**Current Version:** v0.24.1
|
**Current Version:** v0.24.2
|
||||||
|
|
||||||
## How to Use This Document
|
## How to Use This Document
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
# Bill Tracker — Changelog
|
# 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
|
## v0.24.1
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
||||||
|
|
@ -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 APP_NAME = 'BillTracker';
|
||||||
|
|
||||||
export const RELEASE_NOTES = {
|
export const RELEASE_NOTES = {
|
||||||
version: '0.24.1',
|
version: '0.24.2',
|
||||||
date: '2026-05-10',
|
date: '2026-05-10',
|
||||||
highlights: [
|
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.' },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
@ -833,7 +833,7 @@ function Row({ row, year, month, refresh, index, onEditBill }) {
|
||||||
async function handleTogglePaid() {
|
async function handleTogglePaid() {
|
||||||
setLoading?.(true);
|
setLoading?.(true);
|
||||||
try {
|
try {
|
||||||
const result = await api.togglePaid(row.bill_id, {
|
const result = await api.togglePaid(row.id, {
|
||||||
amount: isPaid ? undefined : threshold,
|
amount: isPaid ? undefined : threshold,
|
||||||
paid_date: new Date().toISOString().slice(0, 10),
|
paid_date: new Date().toISOString().slice(0, 10),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bill-tracker",
|
"name": "bill-tracker",
|
||||||
"version": "0.24.1",
|
"version": "0.24.2",
|
||||||
"description": "Monthly bill tracking system",
|
"description": "Monthly bill tracking system",
|
||||||
"main": "server.js",
|
"main": "server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue