Fix Q5 showing retail variant for wholesale carriers
Q5 was shown immediately on voice/broadband checkbox, before Q1b (customer type) was answered — always defaulting to retail variant. Now Q5 only appears after Q1b is answered, and the correct variant (retail vs wholesale) is set at that point. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
653837617e
commit
3ea47b52ed
1 changed files with 3 additions and 2 deletions
|
|
@ -432,7 +432,7 @@ select:focus,input:focus{outline:none;border-color:#1e3a5f;box-shadow:0 0 0 2px
|
|||
document.getElementById('q1b').classList.toggle('hidden', !hasVoice && !hasBroadband);
|
||||
updateVoiceQuestions();
|
||||
document.getElementById('q4').classList.toggle('hidden', !hasBroadband);
|
||||
if (hasVoice || hasBroadband) document.getElementById('q5').classList.remove('hidden');
|
||||
// Q5 shown only after Q1b is answered (customer type determines which variant)
|
||||
});
|
||||
});
|
||||
// ── Q1b: Customer type ──
|
||||
|
|
@ -443,8 +443,9 @@ select:focus,input:focus{outline:none;border-color:#1e3a5f;box-shadow:0 0 0 2px
|
|||
wizard.customerType = btn.dataset.custtype;
|
||||
// Re-evaluate whether to show Q2 or skip to Q3
|
||||
updateVoiceQuestions();
|
||||
// Toggle Q5 variant: retail vs wholesale
|
||||
// Show Q5 with the correct variant for customer type
|
||||
var isWholesaleOnly = wizard.customerType === 'wholesale';
|
||||
document.getElementById('q5').classList.remove('hidden');
|
||||
document.getElementById('q5-retail').classList.toggle('hidden', isWholesaleOnly);
|
||||
document.getElementById('q5-wholesale').classList.toggle('hidden', !isWholesaleOnly);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue