Insurance referral on order page + fix MCS-150 date display

- Order page: insurance referral checkbox (pre-checked) shown when
  ?ins=1 from checker or carrier has insurance gap. Flag stored
  in intake_data.insurance_referral_requested.
- Checker CTA passes &ins=1 when insurance issues found.
- MCS-150: use mcs150Outdated=N from FMCSA API to show green even
  without exact date. Fixes "Filing date not available" for carriers
  not in local census.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
justin 2026-05-29 00:12:28 -05:00
parent 2e45a59133
commit 3d4c72f259
3 changed files with 44 additions and 6 deletions

View file

@ -109,10 +109,17 @@ router.get("/api/v1/dot/lookup", async (req, res) => {
id: "mcs150",
label: "MCS-150 Biennial Update",
status: "red",
detail: `OVERDUE — last filed ${mcs150Date || "unknown date"}. The MCS-150 must be updated every 2 years. `
+ `Failure to update can result in USDOT deactivation and fines up to $1,000/day (capped at $10,000). `
+ `File at: https://safer.fmcsa.dot.gov/CompanyUpdateSearch.aspx`,
action_url: "https://safer.fmcsa.dot.gov/CompanyUpdateSearch.aspx",
detail: `OVERDUE${mcs150Date ? " — last filed " + mcs150Date : ""}. The MCS-150 must be updated every 2 years. `
+ `Failure to update can result in USDOT deactivation and fines up to $1,000/day (capped at $10,000).`,
action_url: "https://portal.fmcsa.dot.gov/login",
});
} else if (carrier && carrier.mcs150Outdated === "N") {
// API confirms not outdated — show green even without exact date
checks.push({
id: "mcs150",
label: "MCS-150 Biennial Update",
status: "green",
detail: `Current${mcs150Date ? " — last filed " + mcs150Date : ""}.`,
});
} else if (mcs150Date) {
checks.push({
@ -126,7 +133,7 @@ router.get("/api/v1/dot/lookup", async (req, res) => {
id: "mcs150",
label: "MCS-150 Biennial Update",
status: "unknown",
detail: "Filing date not available. Verify at SAFER.",
detail: "Could not determine MCS-150 status. Verify at the FMCSA Portal.",
});
}
}