Skip to content

feat: Add work order PDF download and preview (Story 12.2)#188

Merged
daveharmswebdev merged 2 commits intomainfrom
feature/12-2-work-order-pdf-download-and-preview
Feb 6, 2026
Merged

feat: Add work order PDF download and preview (Story 12.2)#188
daveharmswebdev merged 2 commits intomainfrom
feature/12-2-work-order-pdf-download-and-preview

Conversation

@daveharmswebdev
Copy link
Owner

Summary

  • Add "Preview PDF" and "Download PDF" buttons to work order detail page alongside Edit/Delete
  • Create WorkOrderPdfPreviewDialogComponent with zoom controls (50-200%), print, download, and close
  • Add generateWorkOrderPdf() method to WorkOrderService with Content-Disposition filename extraction
  • Error handling with snackbar messages and retry capability
  • Memory management: blob URL revocation and iframe cleanup in ngOnDestroy()

Test plan

  • All 2300 frontend unit tests pass (27 new tests added)
  • All 522 backend unit tests pass (no regressions)
  • Verify "Download PDF" button downloads PDF with correct filename
  • Verify "Preview PDF" opens dialog with zoom, print, download, close controls
  • Verify error snackbar appears when PDF generation fails
  • Verify mobile responsive layout (buttons wrap at <600px)

🤖 Generated with Claude Code

daveharmswebdev and others added 2 commits February 6, 2026 10:17
Add PDF download and preview functionality to the work order detail page,
covering FR50 (Download) and FR51 (Preview).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix subscription leaks in onDownloadPdf() and loadPdf() by storing
subscriptions and cleaning up in ngOnDestroy(). Add null guards for
response.body instead of non-null assertions. Strengthen filename
extraction tests to verify actual filename usage. Remove unused imports.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@daveharmswebdev daveharmswebdev merged commit 45c94ea into main Feb 6, 2026
7 checks passed
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