Skip to content

fix: PDF download crash during quote/invoice creation#62

Open
darshgupta-wisdm wants to merge 1 commit intomainfrom
fix/pdf-download-crash
Open

fix: PDF download crash during quote/invoice creation#62
darshgupta-wisdm wants to merge 1 commit intomainfrom
fix/pdf-download-crash

Conversation

@darshgupta-wisdm
Copy link
Copy Markdown
Collaborator

Summary

  • Disable PDF download buttons on new quote/invoice pages with "Available after saving" message
  • On edit pages, use server-side PDF API (/api/pdf/quote/{id}) instead of broken html2canvas
  • Remove ~500 lines of dead code (hidden A4 render divs, html2canvas/jsPDF imports)

Fixes #61
Port of orekoapp/oreko-pro#11.

Files changed

  • apps/web/app/(dashboard)/invoices/new/new-invoice-form.tsx
  • apps/web/app/(dashboard)/quotes/[id]/edit/edit-quote-form.tsx
  • apps/web/app/(dashboard)/quotes/new/new-quote-form.tsx

Test plan

  • Create new quote → download buttons should be disabled with tooltip
  • Create new invoice → download buttons should be disabled with tooltip
  • Edit existing quote → PDF download opens server-side PDF in new tab
  • No html2canvas/jsPDF imports remain

🤖 Generated with Claude Code

Disable download buttons on new quote/invoice pages (not yet saved).
On edit pages, use server-side PDF API instead of broken html2canvas.
Remove ~500 lines of dead html2canvas code (hidden A4 render divs).

Fixes #61
Port of orekoapp/oreko-pro#11.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.

fix: PDF download crashes during quote/invoice creation

1 participant