feat: remove confirmation popup from status badge toggle (v0.24.3)

Clicking status badges (Late, Due Soon, Upcoming, Missed) now instantly
toggles paid/unpaid. Removed AlertDialog from TrackerPage.jsx — no more
confirmation dialog blocking the action.
This commit is contained in:
null 2026-05-10 17:56:23 -05:00
parent 6d42453e07
commit 86148a101f
5 changed files with 10 additions and 43 deletions

View File

@ -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.2 **Current Version:** v0.24.3
## How to Use This Document ## How to Use This Document

View File

@ -1,5 +1,10 @@
# Bill Tracker — Changelog # Bill Tracker — Changelog
## v0.24.3
### Changed
- **Status badge toggle is instant** — removed the AlertDialog confirmation popup. Clicking Late/Due Soon/Upcoming/Missed badges now toggles paid/unpaid directly.
## v0.24.2 ## v0.24.2
### Fixed ### Fixed

View File

@ -1,10 +1,10 @@
export const APP_VERSION = '0.24.2'; export const APP_VERSION = '0.24.3';
export const APP_NAME = 'BillTracker'; export const APP_NAME = 'BillTracker';
export const RELEASE_NOTES = { export const RELEASE_NOTES = {
version: '0.24.2', version: '0.24.3',
date: '2026-05-10', date: '2026-05-10',
highlights: [ highlights: [
{ 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.' }, { icon: '🖱️', title: 'Instant Status Toggle', desc: 'Clicking status badges (Late, Due Soon, Upcoming, Missed) now toggles paid/unpaid directly — no more confirmation popup.' },
], ],
}; };

View File

@ -14,16 +14,6 @@ import {
import { import {
Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter, Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter,
} from '@/components/ui/dialog'; } from '@/components/ui/dialog';
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from '@/components/ui/alert-dialog';
import { import {
Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Select, SelectTrigger, SelectValue, SelectContent, SelectItem,
} from '@/components/ui/select'; } from '@/components/ui/select';
@ -795,7 +785,6 @@ function Row({ row, year, month, refresh, index, onEditBill }) {
const [editPayment, setEditPayment] = useState(null); const [editPayment, setEditPayment] = useState(null);
const [showMbs, setShowMbs] = useState(false); const [showMbs, setShowMbs] = useState(false);
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [confirmOpen, setConfirmOpen] = useState(false);
// Effective amount threshold for this bill this month: // Effective amount threshold for this bill this month:
// actual_amount (if set by monthly override) takes priority over the template expected_amount. // actual_amount (if set by monthly override) takes priority over the template expected_amount.
@ -843,7 +832,6 @@ function Row({ row, year, month, refresh, index, onEditBill }) {
toast.error(err.message || 'Failed to toggle payment status'); toast.error(err.message || 'Failed to toggle payment status');
} finally { } finally {
setLoading?.(false); setLoading?.(false);
setConfirmOpen(false);
} }
} }
@ -943,16 +931,6 @@ function Row({ row, year, month, refresh, index, onEditBill }) {
clickable clickable
onClick={() => { onClick={() => {
if (effectiveStatus === 'skipped') return; if (effectiveStatus === 'skipped') return;
const isPaid = effectiveStatus === 'paid' || effectiveStatus === 'autodraft';
// Show confirmation dialog for toggling Unpaid -> Paid
if (!isPaid) {
setConfirmOpen(true);
return;
}
// For mark unpaid, proceed directly
handleTogglePaid(); handleTogglePaid();
}} }}
loading={loading} loading={loading}
@ -1032,22 +1010,6 @@ function Row({ row, year, month, refresh, index, onEditBill }) {
)} )}
{/* Payment toggle confirmation dialog */} {/* Payment toggle confirmation dialog */}
<AlertDialog open={confirmOpen} onOpenChange={setConfirmOpen}>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Mark "{row.name}" as paid?</AlertDialogTitle>
<AlertDialogDescription>
This will record a payment for this bill. You can edit the payment later.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction onClick={handleTogglePaid}>
Confirm Payment
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</> </>
); );
} }

View File

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