Fix 4 bugs from trucking code review
1. Insurance "on file" check: undefined !== null was true, falsely showing green. Changed to !!field && field !== "0". 2. Insurance lead ticket: filtered for c.id === "insurance" but actual IDs are insurance_bipd/cargo/bond. Fixed to match prefix. 3. Bundle pricing: was $499 for $376 of services (MORE than individual). Now includes Safety Audit Prep ($399), making individual total $775 and bundle saves $276. 4. Order page submit button: inline styles for visibility (bg-orange-500 not in Astro CSS). UCR $46 gov fee confirmed correct for 2026 (fees stayed flat). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
54d3ec6fb2
commit
a471f26bb9
4 changed files with 9 additions and 9 deletions
|
|
@ -134,11 +134,11 @@ router.get("/api/v1/dot/lookup", async (req, res) => {
|
|||
// ── Check 3: Insurance ──
|
||||
if (carrier) {
|
||||
const bipdRequired = carrier.bipdInsuranceRequired === "Y";
|
||||
const bipdOnFile = carrier.bipdInsuranceOnFile !== null && carrier.bipdInsuranceOnFile !== "0";
|
||||
const bipdOnFile = !!carrier.bipdInsuranceOnFile && carrier.bipdInsuranceOnFile !== "0";
|
||||
const cargoRequired = carrier.cargoInsuranceRequired === "Y";
|
||||
const cargoOnFile = carrier.cargoInsuranceOnFile !== null && carrier.cargoInsuranceOnFile !== "0";
|
||||
const cargoOnFile = !!carrier.cargoInsuranceOnFile && carrier.cargoInsuranceOnFile !== "0";
|
||||
const bondRequired = carrier.bondInsuranceRequired === "Y";
|
||||
const bondOnFile = carrier.bondInsuranceOnFile !== null && carrier.bondInsuranceOnFile !== "0";
|
||||
const bondOnFile = !!carrier.bondInsuranceOnFile && carrier.bondInsuranceOnFile !== "0";
|
||||
|
||||
// Check each type separately for clearer reporting
|
||||
if (bipdRequired) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue