Add engagement authorization, remove price headers from intake pages, fix duplicate emails
- Add clickwrap authorization checkbox to fcc-compliance, state-puc, neca-ocn order pages - Store engagement_accepted_at/ip/version in compliance_orders (migration 074) - Add 499-A past-due/multi-year eSign engagement letter generator - Gate 499-A handler on engagement signature for past-due/multi-year orders - Remove price/tax/fee headers from all 19 intake pages (post-payment only) - Fix duplicate confirmation email for compliance_batch orders - Add USAC past-due fee negotiation research doc Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6171c64b90
commit
cbfb8d6091
29 changed files with 602 additions and 52 deletions
|
|
@ -358,6 +358,7 @@ function renderServices() {
|
|||
'<label class="flex items-center gap-3 p-3 rounded-lg border border-gray-200 cursor-pointer hover:border-pw-400 has-[:checked]:border-pw-500 has-[:checked]:bg-pw-50"><input type="radio" name="pw_pay" value="paypal"><span class="text-sm font-medium text-gray-800">PayPal</span><span class="ml-auto text-xs text-gray-400">+3%</span></label>' +
|
||||
'<label class="flex items-center gap-3 p-3 rounded-lg border border-gray-200 cursor-pointer hover:border-pw-400 has-[:checked]:border-pw-500 has-[:checked]:bg-pw-50"><input type="radio" name="pw_pay" value="crypto"><span class="text-sm font-medium text-gray-800">Cryptocurrency</span><span class="ml-auto text-xs text-gray-400">No fee</span></label>' +
|
||||
'</div>' +
|
||||
'<label class="flex items-start gap-2 p-3 mt-3 rounded-lg border border-gray-200 cursor-pointer text-xs text-gray-600 leading-relaxed"><input type="checkbox" id="pw-engage" required class="mt-0.5 rounded border-gray-300 text-pw-600 focus:ring-pw-500"><span>I authorize Performance West Inc. to prepare and submit regulatory filings on my behalf as described above. I understand Performance West provides compliance consulting services, not legal advice or legal representation. I confirm the information I provide is accurate to the best of my knowledge. <a href="/terms" target="_blank" class="text-pw-600 underline">Terms of Service</a></span></label>' +
|
||||
'<button type="submit" id="pw-submit" class="w-full py-3 rounded-lg bg-green-600 text-white font-bold text-base hover:bg-green-700 transition-colors disabled:bg-gray-400 disabled:cursor-not-allowed">Continue to Payment</button>' +
|
||||
'<p id="pw-err" class="text-sm text-red-700 mt-1" hidden></p>' +
|
||||
'</form>';
|
||||
|
|
@ -367,6 +368,8 @@ function renderServices() {
|
|||
document.getElementById("pw-batch-form").addEventListener("submit", function(e){
|
||||
e.preventDefault();
|
||||
if(selectedSlugs.length === 0){ alert("Please select at least one service."); return; }
|
||||
var engageBox=document.getElementById("pw-engage");
|
||||
if(engageBox && !engageBox.checked){ alert("Please accept the authorization terms to continue."); return; }
|
||||
var errEl=document.getElementById("pw-err");errEl.hidden=true;
|
||||
var btn=document.getElementById("pw-submit");btn.disabled=true;btn.textContent="Creating order...";
|
||||
var payMethod=document.querySelector("input[name=pw_pay]:checked").value;
|
||||
|
|
@ -376,7 +379,8 @@ function renderServices() {
|
|||
customer_email:document.getElementById("pw-email").value.trim(),
|
||||
customer_phone:document.getElementById("pw-phone").value.trim()||undefined,
|
||||
discount_code:document.getElementById("pw-promo").value.trim()||undefined,
|
||||
intake_data:{frn:frn,source:"compliance-check-remediation"}
|
||||
intake_data:{frn:frn,source:"compliance-check-remediation"},
|
||||
engagement_accepted:true
|
||||
};
|
||||
fetch(API+"/api/v1/compliance-orders/batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(body)})
|
||||
.then(function(r){return r.json().then(function(d){if(!r.ok)throw new Error(d.error||"Order failed");return d})})
|
||||
|
|
|
|||
|
|
@ -154,6 +154,11 @@ select:focus,input:focus{outline:none;border-color:#1e3a5f;box-shadow:0 0 0 2px
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<label style="display:flex;align-items:flex-start;gap:.5rem;padding:.65rem;margin-top:.75rem;border:1px solid #e5e7eb;border-radius:8px;cursor:pointer;font-size:.75rem;color:#6b7280;line-height:1.5">
|
||||
<input type="checkbox" id="engage-check" required style="margin-top:2px;accent-color:#1e3a5f">
|
||||
<span>I authorize Performance West Inc. to prepare and submit regulatory filings on my behalf as described above. I understand Performance West provides compliance consulting services, not legal advice or legal representation. I confirm the information I provide is accurate to the best of my knowledge. <a href="/terms" target="_blank" style="color:#1e3a5f;text-decoration:underline">Terms of Service</a></span>
|
||||
</label>
|
||||
|
||||
<div style="margin-top:1rem;text-align:right">
|
||||
<button class="btn btn-primary" id="btn-pay">Continue to Payment</button>
|
||||
</div>
|
||||
|
|
@ -229,6 +234,11 @@ select:focus,input:focus{outline:none;border-color:#1e3a5f;box-shadow:0 0 0 2px
|
|||
var contactEmail = document.getElementById('contact-email').value.trim();
|
||||
var contactPhone = document.getElementById('contact-phone').value.trim();
|
||||
|
||||
if (!document.getElementById('engage-check').checked) {
|
||||
errEl.textContent = 'Please accept the authorization terms to continue.';
|
||||
errEl.style.display = 'block';
|
||||
return;
|
||||
}
|
||||
if (!entityName || !contactName || !contactEmail || !contactPhone) {
|
||||
errEl.textContent = 'Please fill in all required fields (entity name, contact name, email, phone).';
|
||||
errEl.style.display = 'block';
|
||||
|
|
|
|||
|
|
@ -170,6 +170,11 @@ select:focus,input:focus{outline:none;border-color:#1e3a5f;box-shadow:0 0 0 2px
|
|||
<input type="text" id="promo-code" placeholder="SAVE20" style="margin-bottom:.75rem">
|
||||
</div>
|
||||
|
||||
<label style="display:flex;align-items:flex-start;gap:.5rem;padding:.65rem;margin-top:.75rem;border:1px solid #e5e7eb;border-radius:8px;cursor:pointer;font-size:.75rem;color:#6b7280;line-height:1.5">
|
||||
<input type="checkbox" id="engage-check" required style="margin-top:2px;accent-color:#1e3a5f">
|
||||
<span>I authorize Performance West Inc. to prepare and submit regulatory filings on my behalf as described above. I understand Performance West provides compliance consulting services, not legal advice or legal representation. I confirm the information I provide is accurate to the best of my knowledge. <a href="/terms" target="_blank" style="color:#1e3a5f;text-decoration:underline">Terms of Service</a></span>
|
||||
</label>
|
||||
|
||||
<div style="margin-top:1rem;display:flex;gap:.5rem;justify-content:flex-end">
|
||||
<button class="btn" style="background:#e5e7eb;color:#374151" id="btn-back-3">← Back</button>
|
||||
<button class="btn btn-primary" id="btn-pay" disabled>Continue to Payment</button>
|
||||
|
|
@ -410,6 +415,12 @@ select:focus,input:focus{outline:none;border-color:#1e3a5f;box-shadow:0 0 0 2px
|
|||
const errEl = document.getElementById('checkout-error');
|
||||
errEl.style.display = 'none';
|
||||
|
||||
if (!document.getElementById('engage-check').checked) {
|
||||
errEl.textContent = 'Please accept the authorization terms to continue.';
|
||||
errEl.style.display = 'block';
|
||||
return;
|
||||
}
|
||||
|
||||
const customerName = document.getElementById('customer-name').value.trim();
|
||||
const customerEmail = document.getElementById('customer-email').value.trim();
|
||||
if (!customerName || !customerEmail) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue