map all FMCSA status codes to services: OOS→ETA ($499), Inactive→reactivation, Revoked/Suspended→reinstatement
- OOS (Out of Service): RED, urgent messaging, maps to Emergency Temporary Authority $499 - Inactive: YELLOW, reactivation $149 - Not Authorized: YELLOW, new USDOT + MC authority - Revoked: RED, new authority application - Suspended: YELLOW, compliance resolution + reinstatement - Cancelled: YELLOW, new registration - Each status has specific actionable messaging with PW CTA
This commit is contained in:
parent
b106a88e90
commit
58aa2cf78e
3 changed files with 35 additions and 14 deletions
|
|
@ -257,6 +257,12 @@ const COMPLIANCE_SERVICES: Record<
|
||||||
erpnext_item: "USDOT-REACTIVATION",
|
erpnext_item: "USDOT-REACTIVATION",
|
||||||
discountable: true,
|
discountable: true,
|
||||||
},
|
},
|
||||||
|
"emergency-temporary-authority": {
|
||||||
|
name: "Emergency Temporary Authority (ETA)",
|
||||||
|
price_cents: 49900,
|
||||||
|
erpnext_item: "EMERGENCY-TEMP-AUTH",
|
||||||
|
discountable: false, // urgent service, premium pricing
|
||||||
|
},
|
||||||
"dot-drug-alcohol": {
|
"dot-drug-alcohol": {
|
||||||
name: "DOT Drug & Alcohol Compliance Program",
|
name: "DOT Drug & Alcohol Compliance Program",
|
||||||
price_cents: 14900,
|
price_cents: 14900,
|
||||||
|
|
|
||||||
|
|
@ -98,23 +98,34 @@ router.get("/api/v1/dot/lookup", async (req, res) => {
|
||||||
C: "Cancelled",
|
C: "Cancelled",
|
||||||
};
|
};
|
||||||
const statusLabel = statusLabels[statusCode] || statusCode;
|
const statusLabel = statusLabels[statusCode] || statusCode;
|
||||||
const isInactive = statusCode === "I" || statusCode === "S" || statusCode === "C";
|
const isNotActive = statusCode !== "A";
|
||||||
const effectiveStatus = allowed && !isInactive ? "green" : isInactive && allowed ? "yellow" : "red";
|
const isOOS = statusCode === "O";
|
||||||
|
const effectiveStatus = isOOS ? "red"
|
||||||
|
: isNotActive ? "yellow"
|
||||||
|
: allowed ? "green" : "red";
|
||||||
|
|
||||||
|
const statusMessages: Record<string, string> = {
|
||||||
|
A: "Active and authorized to operate.",
|
||||||
|
I: "USDOT status is Inactive. Your registration needs to be reactivated before you can legally operate. "
|
||||||
|
+ "Performance West can handle the reactivation process for you — no Login.gov account needed.",
|
||||||
|
N: "This carrier is Not Authorized. You may need to apply for a new USDOT number or operating authority. "
|
||||||
|
+ "Performance West can file your USDOT registration and MC authority application.",
|
||||||
|
O: "URGENT: This carrier has been placed Out of Service by FMCSA and cannot legally operate. "
|
||||||
|
+ "Every day out of service costs you money. Performance West offers emergency compliance resolution "
|
||||||
|
+ "— call (888) 411-0383 now or order Emergency Temporary Authority online.",
|
||||||
|
R: "This carrier's authority has been Revoked. You will need to apply for new operating authority. "
|
||||||
|
+ "Performance West can handle the entire reinstatement and new authority application process.",
|
||||||
|
S: "This carrier's authority is Suspended. Operations must cease until the suspension is lifted. "
|
||||||
|
+ "Performance West can help resolve the underlying compliance issues and file for reinstatement.",
|
||||||
|
C: "This USDOT number has been Cancelled. You may need to apply for a new USDOT number. "
|
||||||
|
+ "Performance West can file a new registration or request reactivation on your behalf.",
|
||||||
|
};
|
||||||
|
|
||||||
checks.push({
|
checks.push({
|
||||||
id: "operating_status",
|
id: "operating_status",
|
||||||
label: "Operating Status",
|
label: "Operating Status",
|
||||||
status: effectiveStatus,
|
status: effectiveStatus,
|
||||||
detail: effectiveStatus === "green"
|
detail: statusMessages[statusCode] || `Status: ${statusLabel}. Contact Performance West at (888) 411-0383 for assistance.`,
|
||||||
? `Active and authorized to operate.`
|
|
||||||
: effectiveStatus === "yellow"
|
|
||||||
? `USDOT status is ${statusLabel}. Your registration may need to be reactivated before you can legally operate. Performance West can handle the reactivation process for you — no Login.gov account needed.`
|
|
||||||
: `NOT authorized to operate — ${statusLabel}. ${
|
|
||||||
statusCode === "I" ? "This USDOT number is inactive. You may need to reactivate it before operating."
|
|
||||||
: statusCode === "N" ? "This carrier is not authorized. Operating authority may be required."
|
|
||||||
: statusCode === "R" ? "This carrier's authority has been revoked."
|
|
||||||
: statusCode === "O" ? "This carrier has been placed out of service by FMCSA."
|
|
||||||
: "This carrier cannot legally operate."
|
|
||||||
}`,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -334,7 +334,11 @@ Send reset link
|
||||||
else if (data.phy_state === "NM") recommendedServices.push("nm-weight-distance");
|
else if (data.phy_state === "NM") recommendedServices.push("nm-weight-distance");
|
||||||
else if (data.phy_state === "CT") recommendedServices.push("ct-highway-use-fee");
|
else if (data.phy_state === "CT") recommendedServices.push("ct-highway-use-fee");
|
||||||
}
|
}
|
||||||
if (c.id === "operating_status") recommendedServices.push("usdot-reactivation");
|
if (c.id === "operating_status" && c.detail && c.detail.indexOf("Out of Service") >= 0) {
|
||||||
|
recommendedServices.push("emergency-temporary-authority");
|
||||||
|
} else if (c.id === "operating_status") {
|
||||||
|
recommendedServices.push("usdot-reactivation");
|
||||||
|
}
|
||||||
if (c.id === "state_carrier_permit" && data.phy_state === "CA") recommendedServices.push("ca-mcp-carb");
|
if (c.id === "state_carrier_permit" && data.phy_state === "CA") recommendedServices.push("ca-mcp-carb");
|
||||||
if (c.id === "intrastate_authority") recommendedServices.push("intrastate-authority");
|
if (c.id === "intrastate_authority") recommendedServices.push("intrastate-authority");
|
||||||
if (c.id === "corporate_compliance") recommendedServices.push("annual-report-filing");
|
if (c.id === "corporate_compliance") recommendedServices.push("annual-report-filing");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue