yellow CTA: list specific state/entity items needing attention instead of generic message
This commit is contained in:
parent
2b67420624
commit
4345a7546d
1 changed files with 16 additions and 5 deletions
|
|
@ -358,13 +358,24 @@ Send reset link
|
|||
html += '<p class="text-xs text-gray-400 mt-3">Or call (888) 411-0383</p>';
|
||||
html += '</div>';
|
||||
} else if (s.yellow > 0) {
|
||||
// No red issues but yellow state-level warnings — show softer CTA
|
||||
// No red issues but yellow warnings — list what needs attention
|
||||
var yellowSvcParam = recommendedServices.length > 0 ? "&services=" + recommendedServices.join(",") : "";
|
||||
if (data.phy_state) yellowSvcParam += "&state=" + data.phy_state;
|
||||
html += '<div style="background:#f0fdf4;border:2px solid #86efac;border-radius:12px;padding:24px;text-align:center;margin-top:8px">';
|
||||
html += '<h3 style="font-size:18px;font-weight:700;color:#166534;margin-bottom:4px">Federal filings look good!</h3>';
|
||||
html += '<p style="font-size:14px;color:#374151;margin-bottom:12px">Your FMCSA filings are current, but you may have state-level obligations to address.</p>';
|
||||
html += '<a href="/order/dot-compliance?dot=' + data.dot_number + yellowSvcParam + '" style="display:inline-block;padding:10px 28px;background:#ea580c;color:#fff;font-weight:700;border-radius:8px;text-decoration:none;font-size:14px">Review State Compliance →</a>';
|
||||
var yellowItems = [];
|
||||
(data.checks || []).forEach(function(c) {
|
||||
if (c.status === "yellow") yellowItems.push(c.label);
|
||||
});
|
||||
html += '<div style="background:#fffbeb;border:2px solid #fbbf24;border-radius:12px;padding:24px;margin-top:8px">';
|
||||
html += '<h3 style="font-size:18px;font-weight:700;color:#92400e;margin-bottom:4px;text-align:center">Federal filings look good — but ' + yellowItems.length + ' item' + (yellowItems.length > 1 ? 's' : '') + ' to review</h3>';
|
||||
html += '<p style="font-size:14px;color:#78350f;margin-bottom:12px;text-align:center">Your FMCSA filings are current. The following may need attention:</p>';
|
||||
html += '<ul style="list-style:none;padding:0;margin:0 0 16px">';
|
||||
yellowItems.forEach(function(item) {
|
||||
html += '<li style="display:flex;align-items:center;gap:8px;padding:6px 0;font-size:14px;color:#374151;border-bottom:1px solid #fef3c7">';
|
||||
html += '<span style="color:#f59e0b;font-size:16px">⚠</span> ' + item + '</li>';
|
||||
});
|
||||
html += '</ul>';
|
||||
html += '<div style="text-align:center"><a href="/order/dot-compliance?dot=' + data.dot_number + yellowSvcParam + '" style="display:inline-block;padding:10px 28px;background:#ea580c;color:#fff;font-weight:700;border-radius:8px;text-decoration:none;font-size:14px">Get These Handled →</a>';
|
||||
html += '<p style="font-size:12px;color:#92400e;margin-top:8px">Or call (888) 411-0383</p></div>';
|
||||
html += '</div>';
|
||||
} else {
|
||||
html += '<div style="background:#f0fdf4;border:2px solid #86efac;border-radius:12px;padding:24px;text-align:center;margin-top:8px">';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue