Closed rodrigopavezi closed 2 months ago
The changes involve updates to the package.json
file, introducing new dependencies for enhanced functionality, particularly in PDF rendering and data handling. The RequestPage
component has been modified to include new utility functions for payment references, improved actor information handling, and a PDF export feature. Additionally, a customizable dialog component and a separator component have been added, along with a custom hook for PDF export. The utility functions for payment and transaction handling have been expanded.
Files | Change Summary |
---|---|
package.json |
Added new dependencies: @radix-ui/react-separator , @react-pdf/renderer , react-pdf-html , @requestnetwork/... , file-saver , json-edit-react , and @types/file-saver . |
src/app/request/[id]/page.tsx |
Updated RequestPage with new payment reference functions, added ActorInfoSection , integrated useExportPDF , and changed layout to a table format. |
src/components/ui/dialog.tsx |
Introduced a customizable dialog component using Radix UI Dialog primitives, including subcomponents for structure. |
src/components/ui/separator.tsx |
Implemented a customizable separator component using Radix UI's Separator primitive for visual layout enhancement. |
src/lib/hooks/use-export-pdf.tsx |
Added useExportPDF hook for generating and exporting PDF invoices from invoice data. |
src/lib/utils.ts |
Renamed calculatePaymentReference to calculateShortPaymentReference , added calculateLongPaymentReference , and introduced new functions for transaction handling. |
sequenceDiagram
participant User
participant RequestPage
participant useExportPDF
participant PDFRenderer
User->>RequestPage: Request details
RequestPage->>useExportPDF: Trigger PDF export
useExportPDF->>PDFRenderer: Generate PDF from invoice data
PDFRenderer-->>useExportPDF: Return PDF file
useExportPDF-->>RequestPage: Provide downloadable PDF
RequestPage-->>User: Offer PDF download
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@rodrigopavezi Can you add a screenshot of the resulting Request Details page and PDF file export? That would help me approve this more quickly.
Created new issue to track PDF Export Improvement: https://github.com/RequestNetwork/request-scan/issues/25
@MantisClone I reused that html. Only remove logo. I can try adding logo or placeholder image for it.
Changes:
Summary by CodeRabbit
New Features
Bug Fixes
Chores