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",
|
||||
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": {
|
||||
name: "DOT Drug & Alcohol Compliance Program",
|
||||
price_cents: 14900,
|
||||
|
|
|
|||
|
|
@ -98,23 +98,34 @@ router.get("/api/v1/dot/lookup", async (req, res) => {
|
|||
C: "Cancelled",
|
||||
};
|
||||
const statusLabel = statusLabels[statusCode] || statusCode;
|
||||
const isInactive = statusCode === "I" || statusCode === "S" || statusCode === "C";
|
||||
const effectiveStatus = allowed && !isInactive ? "green" : isInactive && allowed ? "yellow" : "red";
|
||||
const isNotActive = statusCode !== "A";
|
||||
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({
|
||||
id: "operating_status",
|
||||
label: "Operating Status",
|
||||
status: effectiveStatus,
|
||||
detail: effectiveStatus === "green"
|
||||
? `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."
|
||||
}`,
|
||||
detail: statusMessages[statusCode] || `Status: ${statusLabel}. Contact Performance West at (888) 411-0383 for assistance.`,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue