From 9c4d65c7a97b149d3980ce42d3a40ebc4f8c8d41 Mon Sep 17 00:00:00 2001 From: justin Date: Wed, 29 Apr 2026 09:59:03 -0500 Subject: [PATCH] Skip Q2 voice delivery for wholesale-only carriers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wholesale voice carriers run their own switching by definition — the Q2 options (reseller, UCaaS, own switch) are retail delivery models. When wholesale is selected in Q1b, Q2 is hidden and Q3 (infrastructure needs: LCR, DIDs, interconnection, STIR/SHAKEN) is shown directly. voiceDelivery is auto-set to own_switch for wholesale. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../order/fcc-carrier-registration/index.html | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/site/public/order/fcc-carrier-registration/index.html b/site/public/order/fcc-carrier-registration/index.html index 8d90d63..d65b3b1 100644 --- a/site/public/order/fcc-carrier-registration/index.html +++ b/site/public/order/fcc-carrier-registration/index.html @@ -396,13 +396,29 @@ select:focus,input:focus{outline:none;border-color:#1e3a5f;box-shadow:0 0 0 2px } // ── Q1: Service types ── + function updateVoiceQuestions() { + var hasVoice = wizard.serviceTypes.indexOf('voice') >= 0; + var isWholesaleOnly = wizard.customerType === 'wholesale'; + // Wholesale voice carriers run their own switching by definition — skip Q2, show Q3 directly + if (hasVoice && isWholesaleOnly) { + document.getElementById('q2').classList.add('hidden'); + document.getElementById('q3').classList.remove('hidden'); + wizard.voiceDelivery = 'own_switch'; // implied for wholesale + } else if (hasVoice) { + document.getElementById('q2').classList.remove('hidden'); + // Q3 visibility still controlled by Q2 answer + } else { + document.getElementById('q2').classList.add('hidden'); + document.getElementById('q3').classList.add('hidden'); + } + } document.querySelectorAll('[data-svc]').forEach(function(cb) { cb.addEventListener('change', function() { wizard.serviceTypes = Array.from(document.querySelectorAll('[data-svc]:checked')).map(function(c) { return c.dataset.svc; }); var hasVoice = wizard.serviceTypes.indexOf('voice') >= 0; var hasBroadband = wizard.serviceTypes.indexOf('broadband') >= 0; document.getElementById('q1b').classList.toggle('hidden', !hasVoice && !hasBroadband); - document.getElementById('q2').classList.toggle('hidden', !hasVoice); + updateVoiceQuestions(); document.getElementById('q4').classList.toggle('hidden', !hasBroadband); if (hasVoice || hasBroadband) document.getElementById('q5').classList.remove('hidden'); }); @@ -413,6 +429,8 @@ select:focus,input:focus{outline:none;border-color:#1e3a5f;box-shadow:0 0 0 2px document.querySelectorAll('[data-custtype]').forEach(function(b) { b.classList.remove('selected'); }); btn.classList.add('selected'); wizard.customerType = btn.dataset.custtype; + // Re-evaluate whether to show Q2 or skip to Q3 + updateVoiceQuestions(); }); });