Skip to content

feat: add invoice pdf download on purchase lists#1022

Open
tomrndom wants to merge 3 commits into
masterfrom
feature/invoice-purchases-pdf
Open

feat: add invoice pdf download on purchase lists#1022
tomrndom wants to merge 3 commits into
masterfrom
feature/invoice-purchases-pdf

Conversation

@tomrndom

@tomrndom tomrndom commented Jul 24, 2026

Copy link
Copy Markdown

ref: https://app.clickup.com/t/9014802374/86bb31qvd

Signed-off-by: Tomás Castillo tcastilloboireau@gmail.com

Summary by CodeRabbit

  • New Features
    • Added invoice PDF downloads for sponsor purchase orders.
    • Invoices now include summit-specific details and branding.
    • Added accessible download action labels.
  • Bug Fixes
    • Improved sponsor order retrieval to support selecting a specific sponsor.
    • Shows user-facing errors when invoice generation fails.
    • Prevents duplicate invoice downloads while a request is in progress.
  • Chores / Tests
    • Updated the UI core dependency version.
    • Improved test mocks and added summit context to test state.

tomrndom added 2 commits July 24, 2026 17:18
Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 78697ff0-5b49-4ff8-987e-eeee3610ae37

📥 Commits

Reviewing files that changed from the base of the PR and between 202cea9 and 2af4f37.

📒 Files selected for processing (2)
  • package.json
  • src/pages/sponsors/sponsor-page/tabs/sponsor-purchases-tab/__tests__/sponsor-purchases-list.test.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

📝 Walkthrough

Walkthrough

Sponsor purchase views now support invoice PDF downloads. They retrieve sponsor orders with optional sponsor identifiers, generate PDFs using summit data, prevent duplicate requests, display translated errors, and expose accessible download actions.

Changes

Sponsor invoice downloads

Layer / File(s) Summary
Sponsor order lookup contract
src/actions/sponsor-purchases-actions.js
getSponsorOrder accepts an optional sponsorId and uses the resolved identifier in the purchase-order API endpoint.
Purchase list invoice flow
src/pages/sponsors/show-purchase-list-page/index.js, src/i18n/en.json
The purchase list fetches orders and generates invoice PDFs using summit data and a logo, with loading protection, translated errors, and an accessible download action.
Sponsor purchases tab invoice flow
src/pages/sponsors/sponsor-page/tabs/sponsor-purchases-tab/index.js, src/pages/sponsors/sponsor-page/tabs/sponsor-purchases-tab/__tests__/*, package.json
The sponsor purchases tab adds guarded invoice generation, summit-state wiring, translated errors, accessible download behavior, test state and mocks, and supporting Jest/dependency configuration.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SponsorPurchaseView
  participant getSponsorOrder
  participant generateInvoicePDF
  SponsorPurchaseView->>getSponsorOrder: Fetch selected sponsor order
  getSponsorOrder-->>SponsorPurchaseView: Return order data
  SponsorPurchaseView->>generateInvoicePDF: Generate invoice with summit data and logo
  generateInvoicePDF-->>SponsorPurchaseView: Download invoice PDF
Loading

Possibly related PRs

Suggested reviewers: santipalenque, smarcet

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: adding invoice PDF downloads on purchase lists.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/invoice-purchases-pdf

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

package.json

Parsing error: Missing semicolon. (2:8)


Comment @coderabbitai help to get the list of available commands.

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
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.

1 participant