set_value doesn't work for child tables like portal_users. Use
updateResource (PUT /api/resource/Customer) which handles it correctly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When the user revisits a completed intake (intake_data_validated=true),
shows a success screen with Go to Portal and Revise buttons instead of
the blank form. Revise adds ?revise=1 to bypass the check.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
batch_id was missing from the SELECT, so order_data.batch_id was always
None. This meant the batch email skip in _request_entity_intake never
triggered, causing duplicate intake emails for every batch order.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Yellow banner on each step: "We've pre-filled this from your FCC records.
Please review carefully and correct any information that is inaccurate."
- Only shows when accessed via token/FRN (post-payment intake)
- CORES address: filter by company name suffix (LLC/Inc/Corp) instead of
requiring a number — addresses like "PO Box 123" now work
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CategoryStep script runs on ALL pages using the Wizard component.
It tried to find #pw-wizard (its inner quiz div) and called
querySelectorAll on it — null on CPNI/RMD/etc pages, crashing the
entire script bundle. This prevented FRN auto-fill, officer
suggestions, and all other intake functionality.
Guard: if #pw-wizard doesn't exist, skip all CategoryStep logic.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entity cache has no RA/officer data yet. Instead, fetch the FCC lookup
(quick mode) and offer RMD contact name + address and CORES principal
address as clickable suggestions to auto-fill Officer 1.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Removed "How many officers" dropdown — all 3 always visible
- Officers 2 and 3 marked as (optional) in legend
- Only Officer 1 validated (name, title, street, city required)
- Blank optional officers skipped in saved data
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- OfficerStep searches entity_cache for matching corporations when loaded
- Shows clickable suggestions with RA name and address to auto-fill Officer 1
- Pre-fills contact_name/email/phone from entity data (helps data-only filers)
- Corp search endpoint: state param now optional (searches all states)
- Corp search returns registered_agent and principal_address fields
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- CPNI: requires either clean compliance checkbox OR issues section opened
- STIR/SHAKEN: requires selecting implementation status before advancing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Entity structure (LLC/Corp/etc) is now required
- EIN must be provided and match XX-XXXXXXX format
- Full address (street, city, state, ZIP) required
- Email validation format checked
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Wizard "Finish" button now submits intake data to the API
- New PUT /api/v1/compliance-orders/:id/intake endpoint saves intake data,
updates entity, re-dispatches worker, and unpauses batch siblings
- Shows success screen with portal link after submission
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Changed <style> to <style is:global> so CSS applies to dynamically
created step chips (Astro scoped styles don't match JS-created elements)
- After async pre-fill from order data completes, re-renders the active
step so EntityStep reads the populated state
- Removes payment step when token/order param is present
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Immediate scroll before the FCC lookup starts, so the user sees
the loading spinner even when the search results list is long.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Batch orders: checkout API already sends combined intake email, so worker
handlers no longer send their own (was causing 2-3 duplicate emails)
- When accessed via ?token= or ?order= (post-payment), the "payment" step
is removed from the intake wizard since payment is already complete
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The handler was returning the acceptance letter as an artifact, which
triggered the instant-delivery email to the client before the admin
placed the wholesale order with Northwest. Now uploads to MinIO but
returns empty artifacts. Admin todo includes the MinIO path to send
the letter after confirming the NW order.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously required both has_account && returning (logged in before).
Now shows portal link whenever has_account is true.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Batch invoice creation now calculates actual total from line items
- Fixed JS syntax error: `className = "..." style="..."` was invalid JS
(style= outside string literal caused Unexpected identifier 'style')
- Portal menu: set hide_standard_menu=1 to remove duplicate sidebar items
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The replace_all for orange button styling put `style="..."` after the
className assignment as bare JS, causing `Unexpected identifier 'style'`
which killed the entire enhancement script (no toggles, no CTA).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The always-rebuild approach caused the CTA to disappear when the observer
fired a second time. Reverted to only rebuild on FRN change.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Always rebuild CTA when observer fires (removes stale CTA first)
- Check both label and full card text for service detection
- Add dedup guards on service list
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. XSS: error messages use textContent by default, innerHTML only
for controlled HTML (CORES link) via allowHtml flag
2. XSS: name search errors built with DOM API, not innerHTML
3. Race condition: concurrent FRN lookups cancel prior request
via AbortController tracking
4. Null safety: DOM element guards with error logging
5. Null safety: check.detail uses || "" fallback, \n → <br>
6. Quote form: auto-resets after 3 seconds on successful submit
7. Pricing: discount uses Math.round(total*15)/100 for cent precision
8. Future-proofing: parseFloat for prices instead of parseInt
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
FCC Compliance Check:
- FRN validation: shows "must be 10 digits" with digit count
- Auto-strips non-digits and pads to 10
- 30-second timeout with friendly message
- "Not found in any FCC database" with link to CORES
- Network error guidance
- FRN display uses overflow-wrap for mobile
- Error box uses innerHTML for clickable links
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CORES scraper sometimes returns empty address depending on server IP.
Now falls back to Headquarters Address from the FCC 499 filer detail
page, which is more reliable.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Compliance orders portal page moved to ERPNext/Frappe at:
portal.performancewest.net/compliance-orders
Includes USAC delegation confirmation via Frappe API.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- GET /api/v1/compliance-orders/my-orders?email= returns all orders
grouped by batch, with USAC delegation status
- /account/orders page shows order history with:
- Entity name, FRN, batch ID, date, payment status
- Itemized services with pricing
- USAC delegation callout with confirmation button
- Auth-gated (requires login)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Intake email now has "I've completed the delegation →" button
instead of "reply to this email"
- Button links to order success page with action=usac_delegation
- New API: POST /api/v1/compliance-orders/:id/usac-delegation
Records confirmation timestamp in intake_data and logs it
- Removed "reply to this email" from intake email
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Step 1: "Did ENTITY provide and bill for telecom services?"
- Yes → red, filing required for each missed year
- No → Step 2 follow-up
Step 2: "Does ENTITY plan to provide telecom services going forward?"
- Yes, keep active → yellow, zero-revenue 499-A filings needed
- No, cancel → yellow, catch-up filings + USAC cancellation
Fixes: white-on-red button visibility, removes confusing 3-way
choice, uses inline styles for button colors.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
RMD: "Does WYOMING FIBER PHONE INC provide any voice services?"
499-A: "Did WYOMING FIBER PHONE INC bill customers for voice or data..."
BDC: "Does WYOMING FIBER PHONE INC provide broadband internet access?"
Also applies entity name to response messages.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When 499-A shows as past due, asks:
- "Yes — I need to file" → keeps red, notes each year priced separately
- "No — I had no telecom revenue" → yellow, explains zero-revenue
filings still required for each year with active filer ID
- "I want to cancel my 499 registration" → yellow, explains catch-up
filings must be completed first, offers to handle cancellation
All options have "Change answer" undo buttons.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- RMD "not found" now asks "Do you provide any voice services?" with
Yes/No buttons. Clicking No turns it green (data-only, not applicable).
Includes "Change answer" undo button.
- DC Agent checkbox hides and unchecks when Form 499-A is unchecked,
reappears when 499-A is re-checked.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds financial_connections with balances permission and prefetch
to Stripe Checkout sessions when payment_method is ACH. This uses
Plaid to verify the customer's bank account balance before accepting
payment, reducing ACH return risk.
- permissions: ["payment_method", "balances"]
- prefetch: ["balances"]
- verification_method: "instant"
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>