Continuing from the earlier auto-population work, I fixed a set of defects across the customer, quotation and project modules. In the customer portal login, accounts sharing an email could never be selected — the account picker was built but wired to a response field the backend never sends, so the "we found more than one account" message was being printed as an error on the OTP screen with no way to choose. I rewired the frontend to the backend's actual flow (selection happens after the code is verified, using a single-use ticket), so the customer now sees the account list and can continue, with a clean fallback if that ticket expires. In customer edit, the electricity bill section wasn't appearing at all: the edit page never loaded the customer's documents, which also meant every save silently wiped the uploaded bill — and with it the utility company that drives the quotation and PCA auto-population. That's fixed, along with the company dropdown staying blank for older bills, which now resolves the company from the file itself and writes it back permanently on the next save. I also fixed a date bug affecting every project stage: picking today was saving as yesterday, because the shared date picker converted local midnight to UTC. Dates are now anchored so they read correctly in both India and US timezones.
On document handling, uploaded project documents are now named PRJ-2026-120_<Document Name> — applied across 14 upload points in 12 stage components, and also at display time so documents uploaded before this change read the same way without re-uploading. This covers the documents list, the download button, the folder-wise "Download all" in Project Activity, and Site Assessment's Power Bill and Design Proposal, which previously showed raw storage keys like 1786020770197-Abdul_Mate… and had no preview or download option at all. Preview now opens in a dialog on the same page rather than a new tab, so no unsaved form data is lost. In quotation create/edit, the bill section now matches the customer form: if the bill was missed at customer creation, staff can select the utility company and upload it directly from the quotation, and it saves to the customer's profile so everything downstream starts working for that customer.
Along the way the type checker surfaced two real data defects I corrected — the customer address zip code was being read from a field name that doesn't exist, and Customer.documents was typed as a list of strings when the API returns objects. The frontend build is currently clean with no type errors.