feat(frontend): add invoice dashboard with status filtering and reminders (Closes #602) - #941
Open
waterWang wants to merge 1 commit into
Open
feat(frontend): add invoice dashboard with status filtering and reminders (Closes #602)#941waterWang wants to merge 1 commit into
waterWang wants to merge 1 commit into
Conversation
…ders Closes FinChippay#602 Signed-off-by: waterWang <water.wang@users.noreply.github.com>
Contributor
|
PLEASE FIX CONFLICTS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds the invoice dashboard (issue #602) on top of the existing invoice components
(
InvoiceCard/InvoiceDetail/InvoiceModal), which previously had no list page, nopersistence, and no reminders:
lib/invoices.ts— full localStorage-backed invoice store (same pattern aslib/paymentLinks.ts):loadInvoices()/saveInvoices()with SSR guard + corrupt-data fallbackcreateInvoice()— generates id, sequentialINV-00001numbering, defaultdraftstatusupdateInvoiceStatus()/deleteInvoice()— persisted mutationssendInvoiceReminder()—mailto:hand-off (works with any mail client, no server infra) + recordslastReminderAtsummarizeInvoices()— per-status + grand totals, with an "outstanding" (sent + overdue) figuregenerateInvoicePDF()— jsPDF invoice PDF (same stack as existing receipts)pages/invoices.tsx— the/invoicesdashboard (previously a "coming soon" placeholder):InvoiceModal; "View Details" →InvoiceDetailoverlay?invoice=<id>(shareable detail URLs)mailto:+ toast confirmationcomponents/Navbar.tsx— adds the Invoices nav linkinvoices.*keys +nav.invoicesadded to all 7 locale files (en/es/fr/pt/ja/ar/he)invoices-lib.test.ts) + 7 component tests for the page(
InvoicesPage.test.tsx): empty state, list + summary, status filtering, deep-link detail,open-detail-on-click, reminder flow, filtered empty state
InvoicesPage.stories.tsx(default populated list, empty state)Verification
NODE_ENV=test npx jest __tests__/invoices-lib.test.ts __tests__/InvoicesPage.test.tsx→ 18/18 passtsc --noEmit— only pre-existinglib/sdk-instance.tserrors (TS1127/TS1160, introduced byPR#918 on main, unrelated to this change)
Closes #602
Signed-off-by: waterWang water.wang@users.noreply.github.com