Bills soft-delete and are retained 30 days, but the only way back was the transient "Undo" toast — dismiss it and a bill deleted an hour ago was unrecoverable from the UI (even though the API and retention kept it). - GET /api/bills/deleted lists soft-deleted bills still inside the recovery window, newest first, with days_left (declared before /:id). User-scoped. - BillsPage shows a "Recently deleted (N)" button when any exist, opening a dialog to restore each one; restoring refreshes the active list too. - The list fetch is non-blocking (never blanks the page); restore is try/catch + toast; dialog has empty and per-row busy states. Tests: tests/billsDeletedRoute.test.js (window filter, ordering, days_left, money serialization, user isolation). Server 116 pass; client 46; build clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| components | ||
| contexts | ||
| hooks | ||
| lib | ||
| pages | ||
| public/img | ||
| App.jsx | ||
| api.js | ||
| index.css | ||
| main.jsx | ||