Skip to content

feat: add invoice PDF export#99

Open
newmattock wants to merge 3 commits into
Invoice-Liquidity-Network:mainfrom
newmattock:feat/invoice-pdf-export
Open

feat: add invoice PDF export#99
newmattock wants to merge 3 commits into
Invoice-Liquidity-Network:mainfrom
newmattock:feat/invoice-pdf-export

Conversation

@newmattock
Copy link
Copy Markdown

Fixes #21

Summary

  • add a client-side Download PDF button to the invoice detail/settlement page
  • generate ILN-branded invoice PDFs with invoice ID, submitter, payer, amount, token, discount rate, due date, current status, invoice URL, and QR code
  • save PDFs with the required ILN-Invoice-[ID].pdf filename
  • add PDF serialization helpers plus focused coverage for helper rows, PDF generation, and the pay invoice page button
  • include narrow current-main build fixes for governance Vetoed status/deferred refresh and typed federation home-domain access

Validation

  • npm test -- src/utils/tests/invoicePdf.test.ts src/components/tests/InvoicePdfDownloadButton.test.tsx app/pay/[id]/tests/PayInvoice.test.tsx --reporter verbose
  • npx eslint src/utils/invoicePdf.ts src/utils/tests/invoicePdf.test.ts src/components/InvoicePdfDownloadButton.tsx src/components/tests/InvoicePdfDownloadButton.test.tsx app/pay/[id]/page.tsx app/pay/[id]/tests/PayInvoice.test.tsx app/governance/page.tsx src/utils/federation.ts vitest.config.ts
  • npm run build
  • git diff --check
  • local smoke: HEAD /pay/1 returned HTTP 200 on port 3020
  • in-app browser smoke: /pay/1 exposed invoice page content and Download PDF buttons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add invoice PDF export functionality

1 participant