Support #10372
openPCA Phase 1 automation, application PDF & document data extraction
100%
Subtasks
Related issues
Updated by Ramu Kodali about 1 month ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Today I worked mainly on the Projects module. In the Installation stage, "Assign Job" now opens the job-creation form in a modal on the same page (for both Panel Installation and Electrical Wiring) instead of navigating away, and the assigned-team name refreshes immediately after assigning. In the COI stage, the uploaded COI document now flows into SREC Part 2's "Completion of Inspection" slot, with an explicit "Add from COI" action for older projects so existing documents are never duplicated. The biggest piece was PCA Phase 1: the Form Application PDF is now generated in the backend (PDFKit) section by section, styled exactly like the on-screen form — section cards, three-column field grid, green/amber auto-fill tinting, project header and page footers — for all four utilities (JCP&L, PECO, ACE, PSE&G), and Preview/Download now print the values currently on screen rather than the last saved draft. I also added several auto-fill sources for the Phase 1 forms: a PVWatts Calculator link plus PDF upload that extracts Azimuth, Tilt, Shading Factor and System Losses into Array Information; plan-set extraction extended to fill Application Type (kWAC), AC Rating kVA, AC Rated Voltage, DC Circuit Voltage and Intended Phase Connection; facility Latitude/Longitude resolved from the project address (using coordinates already stored on the project where available); and PECO's Project Contacts filled from the company admin's name, phone and email. Along the way I fixed a PDF page-duplication bug, made the PVWatts parser fall back through layout-aware extraction and OCR for PDFs that plain text extraction can't read, and worked around the Google Geocoding API not being enabled on our key by falling back to the Places API. All changes are type-checked and covered by unit tests where applicable.