Bug
Clicking the PDF download button while creating a new quote or invoice crashes because html2canvas tries to render a ref that doesn't have valid document data yet.
On edit pages, the html2canvas approach is also unreliable — the server-side PDF API (/api/pdf/quote/{id}) already exists and produces better results.
Fix
- New quote/invoice pages: Disable download buttons with "Available after saving" tooltip
- Edit pages: Use server-side PDF API instead of html2canvas
- Remove ~500 lines of dead html2canvas/jsPDF code (hidden A4 render divs, imports, state)
Files affected
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
Port of orekoapp/oreko-pro#11.
Bug
Clicking the PDF download button while creating a new quote or invoice crashes because
html2canvastries to render a ref that doesn't have valid document data yet.On edit pages, the html2canvas approach is also unreliable — the server-side PDF API (
/api/pdf/quote/{id}) already exists and produces better results.Fix
Files affected
apps/web/app/(dashboard)/invoices/new/new-invoice-form.tsxapps/web/app/(dashboard)/quotes/[id]/edit/edit-quote-form.tsxapps/web/app/(dashboard)/quotes/new/new-quote-form.tsxPort of orekoapp/oreko-pro#11.