new-site/scripts
justin f6419759e6 portal: converge all compliance orders on the single ERPNext portal
Root cause of customers being unable to log in: ERPNext (portal.performancewest.net)
is the intended single portal and already surfaces compliance/trucking orders
(performancewest_erpnext/www/orders.py reads compliance_orders by email). But
only the Stripe checkout path provisioned the ERPNext Website User up-front
(findOrCreateCustomer). PayPal / crypto / remediation-pipeline orders go straight
to handlePaymentComplete, which created NO portal user and never set
portal_user_created -> no login + no set-password invite (exactly what happened
to the Paul Wilson / Compound Technologies PayPal order).

- handlePaymentComplete: add ensureCompliancePortalUser() in the shared
  post-payment path so EVERY paid compliance order (any payment method) gets an
  ERPNext portal account + the set-password invite. Idempotent.
- Guard against placeholder emails (synthetic@/pipeline.com etc): skip portal
  provisioning and the set-password invite for non-deliverable addresses.
- compliance-orders API: validate email format AND reject placeholder addresses
  at order creation (was: presence-only, so synthetic@pipeline.com passed).
- delivery_worker: never email a set-password invite to a placeholder address.

Note: the legacy PG-customers login (api/routes/portal-auth.ts, /account/*) is
CRTC/formation-era and only backfills canada_crtc_orders/orders, never
compliance_orders. ERPNext is now the consistent portal for compliance.
2026-06-02 22:44:34 -05:00
..
document_gen DOT D&A binder: remove Performance West and National Drug Screening from vendor directory 2026-06-02 22:02:07 -05:00
formation fix Iowa: remove wrong Socrata dataset (was liquor stores), mark SOS as WAF-blocked 2026-05-30 19:28:41 -05:00
templates Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
tests DOT D&A: instant PDF compliance-program binder (49) 2026-06-02 19:28:58 -05:00
workers portal: converge all compliance orders on the single ERPNext portal 2026-06-02 22:44:34 -05:00
_email_exclusions.py campaigns: exclude full Yahoo/Verizon-Media domain family from cold email 2026-06-02 12:14:43 -05:00
alert.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
backup-db.sh Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
bounce-watcher.sh Fix bounce watcher: pass campaign_uuid to Listmonk webhook 2026-05-29 15:32:48 -05:00
build_trucking_campaigns.py intake: cold ?dot= visitors can finish + correct per-state CTA links 2026-06-02 12:56:03 -05:00
campaign_template.html Add shared DOCX style module + campaign tools 2026-05-04 08:52:07 -05:00
create_agent_jaykordic.cjs Add referral/discount code to FCC carrier page + REF-JAYK05 agent 2026-06-02 14:31:22 -05:00
create_deficiency_report_campaign.py Pivot CRTC offering on FCC carrier page for A-Z wholesale carriers 2026-06-02 13:26:39 -05:00
create_deficiency_source_campaigns.py feat(campaigns): create 6 Listmonk source templates for deficiency segments 2026-06-02 03:56:12 -05:00
create_state_campaigns.py Lower trucking compliance pricing across product + marketing surfaces 2026-06-02 10:45:07 -05:00
deploy-dev.sh Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
deploy-go-live.sh Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
deploy.sh Use --no-cache in deploy to prevent stale Docker builds 2026-04-27 07:57:14 -05:00
Dockerfile Fix Dockerfile: use JSON array syntax for filenames with spaces 2026-05-30 13:07:26 -05:00
gap_tracker.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
generate_all_permutations.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
generate_all_templates.py Fix flagged items: CRTC email submission, BITS todo, selector docs, stale plans 2026-05-04 11:33:45 -05:00
listmonk-bounce-sync.py UPL-proof document templates + reliable bounce sync 2026-05-21 15:06:29 -05:00
methodology_campaign.py Wire createCommission() into compliance batch checkout 2026-05-11 11:00:38 -05:00
ollama_client.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
populate_deficiency_list.py Add shared DOCX style module + campaign tools 2026-05-04 08:52:07 -05:00
populate_new_carrier_startup_campaign.py campaigns: exclude full Yahoo/Verizon-Media domain family from cold email 2026-06-02 12:14:43 -05:00
product_facts.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
recon_gckey.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
reddit-monitor.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
requirements.txt add fax filing pipeline: VitalPBX sender, attestation cover page with digital signature, compliance checker pending filing override 2026-05-30 18:32:01 -05:00
send_test_campaigns.py Add shared DOCX style module + campaign tools 2026-05-04 08:52:07 -05:00
setup_erpnext_payments.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
setup_trucking_campaigns.py Lower trucking compliance pricing across product + marketing surfaces 2026-06-02 10:45:07 -05:00