From 790e980ef839419dac0b1a7fd3afe879d857e1d5 Mon Sep 17 00:00:00 2001 From: justin Date: Wed, 29 Apr 2026 09:33:42 -0500 Subject: [PATCH] Separate customer type into its own question section The retail/wholesale radios were visually mixed in with the voice/broadband checkboxes, making it easy to misread "Wholesale" as a service type. Moved to a distinct Q1b section "Who are your customers?" that only appears after checking voice or broadband. Single selection covers both services (retail / wholesale / both). Co-Authored-By: Claude Opus 4.6 (1M context) --- .../order/fcc-carrier-registration/index.html | 50 ++++++++----------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/site/public/order/fcc-carrier-registration/index.html b/site/public/order/fcc-carrier-registration/index.html index 2a0fc7f..c002c1b 100644 --- a/site/public/order/fcc-carrier-registration/index.html +++ b/site/public/order/fcc-carrier-registration/index.html @@ -87,22 +87,17 @@ select:focus,input:focus{outline:none;border-color:#1e3a5f;box-shadow:0 0 0 2px

What type of service will you offer?

Select all that apply.

- - - - +
+ + + @@ -340,7 +335,7 @@ select:focus,input:focus{outline:none;border-color:#1e3a5f;box-shadow:0 0 0 2px // ── Wizard state ── var wizard = { - serviceTypes: [], voiceMode: 'retail', broadbandMode: 'retail', + serviceTypes: [], customerType: 'retail', voiceDelivery: '', infraNeeds: [], broadbandType: '', operatingStates: '', // Derived @@ -372,19 +367,19 @@ select:focus,input:focus{outline:none;border-color:#1e3a5f;box-shadow:0 0 0 2px 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('q1-voice-mode').classList.toggle('hidden', !hasVoice); - document.getElementById('q1-broadband-mode').classList.toggle('hidden', !hasBroadband); + document.getElementById('q1b').classList.toggle('hidden', !hasVoice && !hasBroadband); document.getElementById('q2').classList.toggle('hidden', !hasVoice); document.getElementById('q4').classList.toggle('hidden', !hasBroadband); if (hasVoice || hasBroadband) document.getElementById('q5').classList.remove('hidden'); }); }); - // Voice/broadband mode radios - document.querySelectorAll('input[name=voice_mode]').forEach(function(r) { - r.addEventListener('change', function() { wizard.voiceMode = this.value; }); - }); - document.querySelectorAll('input[name=broadband_mode]').forEach(function(r) { - r.addEventListener('change', function() { wizard.broadbandMode = this.value; }); + // ── Q1b: Customer type ── + document.querySelectorAll('[data-custtype]').forEach(function(btn) { + btn.addEventListener('click', function() { + document.querySelectorAll('[data-custtype]').forEach(function(b) { b.classList.remove('selected'); }); + btn.classList.add('selected'); + wizard.customerType = btn.dataset.custtype; + }); }); // ── Q2: Voice delivery ── @@ -433,15 +428,15 @@ select:focus,input:focus{outline:none;border-color:#1e3a5f;box-shadow:0 0 0 2px var hasVoice = wizard.serviceTypes.indexOf('voice') >= 0; var hasBroadband = wizard.serviceTypes.indexOf('broadband') >= 0; - var bbRetail = hasBroadband && (wizard.broadbandMode === 'retail' || wizard.broadbandMode === 'both'); + var hasRetail = wizard.customerType === 'retail' || wizard.customerType === 'both'; // Voice carriers always need RMD + CPNI regardless of retail/wholesale wizard.needsRmd = hasVoice; wizard.needsCpni = hasVoice; // CALEA: all voice carriers + facilities-based broadband wizard.needsCalea = hasVoice || (hasBroadband && wizard.broadbandType === 'facilities'); - // BDC only for broadband with retail end users (not wholesale-only broadband) - wizard.needsBdc = bbRetail; + // BDC only for broadband providers with retail end users + wizard.needsBdc = hasBroadband && hasRetail; wizard.needsOcn = wizard.infraNeeds.indexOf('lcr') >= 0 || wizard.infraNeeds.indexOf('own_dids') >= 0 || wizard.infraNeeds.indexOf('interconnect') >= 0 || wizard.infraNeeds.indexOf('stir_sign') >= 0; wizard.needsStirShaken = wizard.infraNeeds.indexOf('stir_sign') >= 0 || wizard.needsOcn; @@ -703,8 +698,7 @@ select:focus,input:focus{outline:none;border-color:#1e3a5f;box-shadow:0 0 0 2px address_zip: wizard.addrZip, service_wizard: { service_types: wizard.serviceTypes, - voice_mode: wizard.voiceMode, - broadband_mode: wizard.broadbandMode, + customer_type: wizard.customerType, voice_delivery: wizard.voiceDelivery, infra_needs: wizard.infraNeeds, broadband_type: wizard.broadbandType,