From 9bcd27db800050eb3b8df6a9ae1c607f12902b71 Mon Sep 17 00:00:00 2001 From: justin Date: Sat, 6 Jun 2026 01:52:22 -0500 Subject: [PATCH] feat(site): vertical-specific order-page headers (trucking/telecom/healthcare/corporate) via unified VerticalOrderHeader; apply to all 49 order pages; retire TruckingOrderHeader --- scripts/inject_order_headers.py | 104 ++++++++++++ site/src/components/TruckingOrderHeader.astro | 124 -------------- site/src/components/VerticalOrderHeader.astro | 159 ++++++++++++++++++ site/src/pages/order/bdc-broadband.astro | 2 + site/src/pages/order/bdc-filing.astro | 2 + site/src/pages/order/bdc-voice.astro | 2 + site/src/pages/order/boc3-filing.astro | 5 +- site/src/pages/order/ca-mcp-carb.astro | 5 +- site/src/pages/order/calea-ssi.astro | 2 + site/src/pages/order/cdr-analysis.astro | 2 + .../pages/order/cores-frn-registration.astro | 2 + site/src/pages/order/cpni-certification.astro | 2 + site/src/pages/order/ct-highway-use-fee.astro | 5 +- site/src/pages/order/dc-agent.astro | 2 + site/src/pages/order/dot-audit-prep.astro | 5 +- site/src/pages/order/dot-drug-alcohol.astro | 5 +- .../src/pages/order/dot-full-compliance.astro | 5 +- site/src/pages/order/dot-registration.astro | 5 +- site/src/pages/order/fcc-499-initial.astro | 2 + site/src/pages/order/fcc-499a-499q.astro | 2 + site/src/pages/order/fcc-499a.astro | 2 + .../pages/order/fcc-63-11-notification.astro | 2 + .../pages/order/fcc-compliance-checkup.astro | 2 + .../src/pages/order/fcc-full-compliance.astro | 2 + .../pages/order/foreign-qualification.astro | 2 + site/src/pages/order/hazmat-phmsa.astro | 5 +- site/src/pages/order/ifta-application.astro | 5 +- site/src/pages/order/ifta-quarterly.astro | 5 +- .../pages/order/intrastate-authority.astro | 5 +- site/src/pages/order/irp-registration.astro | 5 +- .../src/pages/order/ky-kyu-registration.astro | 5 +- site/src/pages/order/mc-authority.astro | 5 +- site/src/pages/order/mcs150-update.astro | 5 +- .../src/pages/order/medicare-enrollment.astro | 2 + site/src/pages/order/new-carrier-bundle.astro | 5 +- site/src/pages/order/nm-weight-distance.astro | 5 +- site/src/pages/order/npi-reactivation.astro | 2 + site/src/pages/order/npi-revalidation.astro | 2 + site/src/pages/order/nppes-update.astro | 2 + .../src/pages/order/ny-hut-registration.astro | 5 +- site/src/pages/order/ocn-registration.astro | 2 + site/src/pages/order/oig-sam-screening.astro | 2 + site/src/pages/order/or-weight-mile-tax.astro | 5 +- site/src/pages/order/osow-permit.astro | 5 +- .../order/provider-compliance-bundle.astro | 2 + site/src/pages/order/rmd-filing.astro | 2 + .../pages/order/state-dot-registration.astro | 5 +- site/src/pages/order/state-emissions.astro | 5 +- .../pages/order/state-trucking-bundle.astro | 5 +- site/src/pages/order/stir-shaken.astro | 2 + site/src/pages/order/ucr-registration.astro | 5 +- site/src/pages/order/usdot-reactivation.astro | 5 +- 52 files changed, 386 insertions(+), 174 deletions(-) create mode 100644 scripts/inject_order_headers.py delete mode 100644 site/src/components/TruckingOrderHeader.astro create mode 100644 site/src/components/VerticalOrderHeader.astro diff --git a/scripts/inject_order_headers.py b/scripts/inject_order_headers.py new file mode 100644 index 0000000..145f265 --- /dev/null +++ b/scripts/inject_order_headers.py @@ -0,0 +1,104 @@ +#!/usr/bin/env python3 +"""Inject the vertical-specific into every order page. + +Single source of truth for slug -> vertical. Idempotent: re-running it +normalizes import + placement and migrates the legacy to +. + +Placement: immediately after the closing of the page's title block +(the same spot the trucking header used), or as the first child of
/the +top wrapper if no obvious anchor is found. +""" +import os, re, sys + +ORDER_DIR = os.path.join(os.path.dirname(__file__), "..", "site", "src", "pages", "order") + +# slug -> vertical. Anything not listed defaults to "trucking" (the original set). +VERTICAL = { + # ── Telecom / FCC ───────────────────────────────────────────── + "bdc-broadband": "telecom", "bdc-filing": "telecom", "bdc-voice": "telecom", + "calea-ssi": "telecom", "cdr-analysis": "telecom", + "cores-frn-registration": "telecom", "cpni-certification": "telecom", + "fcc-499a": "telecom", "fcc-499a-499q": "telecom", "fcc-499-initial": "telecom", + "fcc-63-11-notification": "telecom", "fcc-compliance-checkup": "telecom", + "fcc-full-compliance": "telecom", "ocn-registration": "telecom", + "stir-shaken": "telecom", + # ── Healthcare ──────────────────────────────────────────────── + "medicare-enrollment": "healthcare", "npi-reactivation": "healthcare", + "npi-revalidation": "healthcare", "nppes-update": "healthcare", + "oig-sam-screening": "healthcare", "provider-compliance-bundle": "healthcare", + "rmd-filing": "healthcare", + # ── Corporate ───────────────────────────────────────────────── + "dc-agent": "corporate", "foreign-qualification": "corporate", +} + +IMPORT_LINE = 'import VerticalOrderHeader from "../../components/VerticalOrderHeader.astro";' +LEGACY_IMPORT_RE = re.compile(r'^\s*import\s+TruckingOrderHeader\s+from\s+["\'][^"\']+["\'];\s*$', re.M) +NEW_IMPORT_RE = re.compile(r'^\s*import\s+VerticalOrderHeader\s+from\s+["\'][^"\']+["\'];\s*$', re.M) + + +def vertical_for(slug: str) -> str: + return VERTICAL.get(slug, "trucking") + + +def process(path: str) -> str: + slug = os.path.basename(path)[:-len(".astro")] + v = vertical_for(slug) + src = open(path).read() + tag = f'' + + # 1) Imports: ensure VerticalOrderHeader import, drop the legacy one. + src = LEGACY_IMPORT_RE.sub("", src) + if not NEW_IMPORT_RE.search(src): + # insert after the Base import (first import line in frontmatter) + m = re.search(r'^(import\s+Base\s+from[^\n]*\n)', src, re.M) + if m: + src = src[:m.end()] + IMPORT_LINE + "\n" + src[m.end():] + else: + # fallback: after frontmatter opening --- + src = re.sub(r'^---\n', "---\n" + IMPORT_LINE + "\n", src, count=1) + + # 2) Replace any legacy header usage with the new one. + src = re.sub(r'', tag, src) + + # 3) If the new tag isn't placed yet, insert it after the first + # in the body (the title block) — matching the trucking convention. + if tag not in src: + m = re.search(r'\s*\n', src) + if m: + src = src[:m.end()] + "\n " + tag + "\n" + src[m.end():] + else: + # last resort: right after
or the first wrapper div + m = re.search(r'(]*>\s*\n)', src) + if m: + src = src[:m.end()] + " " + tag + "\n" + src[m.end():] + else: + print(f" WARN: no anchor in {slug}, skipped placement", file=sys.stderr) + + # tidy: collapse 3+ blank lines created by import removal + src = re.sub(r'\n{3,}', "\n\n", src) + return src + + +def main(): + order = os.path.normpath(ORDER_DIR) + changed = 0 + counts = {} + for fn in sorted(os.listdir(order)): + if not fn.endswith(".astro"): + continue + path = os.path.join(order, fn) + slug = fn[:-len(".astro")] + v = vertical_for(slug) + new = process(path) + old = open(path).read() + if new != old: + open(path, "w").write(new) + changed += 1 + counts[v] = counts.get(v, 0) + 1 + print(f"order pages processed; changed={changed}") + print("vertical counts:", dict(sorted(counts.items()))) + + +if __name__ == "__main__": + main() diff --git a/site/src/components/TruckingOrderHeader.astro b/site/src/components/TruckingOrderHeader.astro deleted file mode 100644 index b70f0e6..0000000 --- a/site/src/components/TruckingOrderHeader.astro +++ /dev/null @@ -1,124 +0,0 @@ ---- ---- - -
-
DOT / FMCSA Compliance Specialists
-

We handle your FMCSA filings so you can focus on the road.

-

- Performance West is a dedicated transportation compliance firm serving thousands of motor carriers nationwide. - We combine deep regulatory expertise with purpose-built filing technology so your paperwork is done right, done fast, - and tracked every step of the way. -

-
-
-
📋
-

Specialized in trucking compliance

-

MCS-150, BOC-3, UCR, IFTA/IRP, operating authority and more, filed correctly the first time.

-
-
-
-

Fast turnaround

-

Our automated filing systems submit most updates within 1-2 business days of receiving your information.

-
-
-
🔍
-

Attention to detail

-

Every filing is verified against current FMCSA requirements. We catch errors before they become problems.

-
-
-
📞
-

Real support, real people

-

Questions? Call (888) 411-0383 or reply to any email. We respond same business day.

-
-
-
- - diff --git a/site/src/components/VerticalOrderHeader.astro b/site/src/components/VerticalOrderHeader.astro new file mode 100644 index 0000000..dd4835b --- /dev/null +++ b/site/src/components/VerticalOrderHeader.astro @@ -0,0 +1,159 @@ +--- +// Vertical-specific order-page hero. One component, four verticals, so the copy +// + accent live in a single place and never drift across the ~50 order pages. +// +// Usage: +// Verticals: "trucking" | "telecom" | "healthcare" | "corporate" +// (trucking mirrors the original TruckingOrderHeader copy verbatim.) +export interface Props { + vertical: "trucking" | "telecom" | "healthcare" | "corporate"; +} +const { vertical } = Astro.props; + +type Card = { icon: string; h: string; p: string }; +type Content = { + badge: string; + title: string; + intro: string; + accent: string; // accent color (badge text + card highlight) + cards: Card[]; +}; + +const PHONE = "(888) 411-0383"; + +const CONTENT: Record = { + trucking: { + badge: "DOT / FMCSA Compliance Specialists", + title: "We handle your FMCSA filings so you can focus on the road.", + intro: + "Performance West is a dedicated transportation compliance firm serving thousands of motor carriers nationwide. We combine deep regulatory expertise with purpose-built filing technology so your paperwork is done right, done fast, and tracked every step of the way.", + accent: "#fb923c", + cards: [ + { icon: "\u{1F4CB}", h: "Specialized in trucking compliance", p: "MCS-150, BOC-3, UCR, IFTA/IRP, operating authority and more, filed correctly the first time." }, + { icon: "\u{26A1}", h: "Fast turnaround", p: "Our automated filing systems submit most updates within 1-2 business days of receiving your information." }, + { icon: "\u{1F50D}", h: "Attention to detail", p: "Every filing is verified against current FMCSA requirements. We catch errors before they become problems." }, + { icon: "\u{1F4DE}", h: "Real support, real people", p: `Questions? Call ${PHONE} or reply to any email. We respond same business day.` }, + ], + }, + telecom: { + badge: "FCC / Telecom Compliance Specialists", + title: "We handle your FCC filings so you can focus on your network.", + intro: + "Performance West is a dedicated telecommunications compliance firm serving carriers, VoIP providers, and resellers nationwide. We pair deep FCC regulatory expertise with purpose-built filing technology so your Form 499, STIR/SHAKEN, CPNI, and registrations are done right, done on time, and tracked every step of the way.", + accent: "#60a5fa", + cards: [ + { icon: "\u{1F4E1}", h: "Specialized in telecom compliance", p: "Form 499-A/Q, FCC registration, STIR/SHAKEN, CPNI, Robocall Mitigation, OCN/CORES and more." }, + { icon: "\u{26A1}", h: "Deadline-driven filing", p: "We track every FCC and USAC due date and file on time so you avoid red-light status and penalties." }, + { icon: "\u{1F50D}", h: "Accuracy you can audit", p: "Every filing is verified against current FCC rules. We catch revenue and classification errors before they cost you." }, + { icon: "\u{1F4DE}", h: "Real support, real people", p: `Questions? Call ${PHONE} or reply to any email. We respond same business day.` }, + ], + }, + healthcare: { + badge: "Healthcare Provider Compliance Specialists", + title: "We handle your Medicare and NPI filings so you can focus on patients.", + intro: + "Performance West is a dedicated healthcare compliance firm serving providers, group practices, and facilities nationwide. We combine deep CMS and NPPES regulatory expertise with purpose-built filing technology so your revalidation, enrollment, and registry updates are done right, done fast, and tracked every step of the way.", + accent: "#34d399", + cards: [ + { icon: "\u{1FA7A}", h: "Specialized in provider compliance", p: "Medicare PECOS revalidation, NPI/NPPES updates, reactivation, enrollment, and OIG/SAM screening." }, + { icon: "\u{26A1}", h: "Beat the deactivation deadline", p: "Miss a revalidation date and CMS deactivates your billing privileges. We file before the clock runs out." }, + { icon: "\u{1F50D}", h: "Accuracy that protects billing", p: "Every filing is checked against current CMS requirements so an error never interrupts your reimbursements." }, + { icon: "\u{1F4DE}", h: "Real support, real people", p: `Questions? Call ${PHONE} or reply to any email. We respond same business day.` }, + ], + }, + corporate: { + badge: "Corporate Compliance Specialists", + title: "We handle your corporate filings so you can focus on the business.", + intro: + "Performance West is a dedicated corporate compliance firm serving companies registering and operating across multiple states. We combine deep regulatory expertise with purpose-built filing technology so your registrations, agent designations, and annual obligations are done right, done fast, and tracked every step of the way.", + accent: "#a78bfa", + cards: [ + { icon: "\u{1F3DB}\u{FE0F}", h: "Specialized in corporate filings", p: "Foreign qualification, registered/process agent service, formations, and annual reports nationwide." }, + { icon: "\u{26A1}", h: "Fast, multi-state turnaround", p: "We handle the Secretary of State paperwork in every jurisdiction so you can expand without the delay." }, + { icon: "\u{1F50D}", h: "Nothing falls through the cracks", p: "Every registration is verified and tracked, so deadlines and renewals never slip." }, + { icon: "\u{1F4DE}", h: "Real support, real people", p: `Questions? Call ${PHONE} or reply to any email. We respond same business day.` }, + ], + }, +}; + +const c = CONTENT[vertical]; +--- + +
+
{c.badge}
+

{c.title}

+

{c.intro}

+
+ {c.cards.map((card) => ( +
+
{card.icon}
+

{card.h}

+

{card.p}

+
+ ))} +
+
+ + diff --git a/site/src/pages/order/bdc-broadband.astro b/site/src/pages/order/bdc-broadband.astro index d9e7ccd..ed2069c 100644 --- a/site/src/pages/order/bdc-broadband.astro +++ b/site/src/pages/order/bdc-broadband.astro @@ -1,5 +1,6 @@ --- import Base from "../../layouts/Base.astro"; +import VerticalOrderHeader from "../../components/VerticalOrderHeader.astro"; import Wizard from "../../components/intake/Wizard.astro"; import TaxDeductibilityNotice from "../../components/TaxDeductibilityNotice.astro"; import { INTAKE_MANIFEST, SERVICE_META, formatUSD } from "../../lib/intake_manifest"; @@ -18,6 +19,7 @@ const description = "Availability data only (no voice subscription). For broadba

{description}

+