Vamsidhar - Fix PDF generation button on Weekly Project Summary page#4552
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Ganesh112001
left a comment
There was a problem hiding this comment.
I tested PR #4552 and verified that the PDF generation button on the Weekly Project Summary page works perfectly. After navigating to /bmdashboard/totalconstructionsummary, I clicked the "Share PDF" button which correctly shows a loading state with spinner and "Generating PDF..." text. The button is properly disabled during generation to prevent multiple simultaneous requests. PDF generates and downloads successfully with a dynamic filename including project filter and date range. The downloaded PDF contains correct Weekly Project Summary data. The button is visible and functional in dark mode with proper styling. Everything works as intended and is ready for merge!

|
This feature works as intended and the code is great |
shashank-madan
left a comment
There was a problem hiding this comment.
Implementation works as expected when all dropdowns are previously opened. Generating pdf occurs before loading has completed and might miss some data.
See attached video.
Total.Construction.Summary.-.Google.Chrome.2026-01-31.18-33-21.mp4
…ct-summary Resolve merge conflicts (package.json, vitest, PurchaseForm, WeeklyProjectSummary, UserTableData tests, yarn.lock). Align Weekly Project Summary header controls and fix Share PDF button flex-shrink overlap with filters. Made-with: Cursor
edf5591
Made-with: Cursor
|
|
Thank you all, merging! |










Description
Fixed the Share PDF button on the Weekly Project Summary page that was not generating or downloading PDFs. The button was clickable but provided no feedback, error messages, or functionality. This PR implements full PDF generation functionality with proper loading states, error handling, and user feedback.
Fixes # (Priority: Medium) Share PDF Button Not Generating or Downloading PDF on Weekly Project Summary Page
Or Implements # (WBS)
Related PRS (if any):
Previous PR - 3728
…
Main changes explained:
Updated Files:
src/components/BMDashboard/WeeklyProjectSummary/WeeklyProjectSummary.jsxisGeneratingPDFstate to manage loading state during PDF generationcontainerRefusinguseRefto reliably find the container element (fixes CSS module class name resolution issue)projectFilteranddateRangeFilterselectors from Redux storetoast.loading()withtoast.info()for compatibility with current react-toastify versionsrc/components/BMDashboard/WeeklyProjectSummary/WeeklyProjectSummaryHeader.jsxisGeneratingPDFprop to control button disabled statesrc/components/BMDashboard/WeeklyProjectSummary/WeeklyProjectSummary.module.css.spinner)…
How to test:
npm installto ensure all dependencies are installednpm run startweekly-project-summary-{projectName}-{dateRange}.pdfScreenshots or videos of changes: