new-site/site/src/components/intake/steps/CALEAStep.astro
justin f8cd37ac8c Initial commit — Performance West telecom compliance platform
Includes: API (Express/TypeScript), Astro site, Python workers,
document generators, FCC compliance tools, Canada CRTC formation,
Ansible infrastructure, and deployment scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 06:54:22 -05:00

97 lines
4.5 KiB
Text

---
// CALEAStep — LE contact + network infrastructure for the SSI plan.
---
<div class="pw-step">
<h2>CALEA SSI Plan details</h2>
<p class="pw-help">
Every common carrier and interconnected-VoIP provider must maintain
a System Security and Integrity plan (47 USC § 229 / 47 CFR § 1.20003).
The plan is kept internally and provided to DOJ on subpoena.
</p>
<fieldset class="pw-fieldset">
<legend>Designated 24-hour law enforcement contact</legend>
<label class="pw-field">Name</label>
<input id="pw-le-name" class="pw-input" />
<label class="pw-field">Title</label>
<input id="pw-le-title" class="pw-input" placeholder="e.g. General Counsel" />
<label class="pw-field">24-hour phone</label>
<input id="pw-le-phone" class="pw-input" />
<label class="pw-field">24-hour email</label>
<input id="pw-le-email" class="pw-input" />
</fieldset>
<fieldset class="pw-fieldset">
<legend>CPNI Protection Officer</legend>
<label class="pw-field">Name</label>
<input id="pw-cpni-name" class="pw-input" />
<label class="pw-field">Title</label>
<input id="pw-cpni-title" class="pw-input" />
</fieldset>
<label class="pw-field">Network infrastructure summary</label>
<textarea id="pw-net-summary" class="pw-input" rows="3" placeholder="e.g. FreeSWITCH cluster + Ribbon SBC; trunking via Bandwidth.com"></textarea>
<label class="pw-field">How you support lawful intercept</label>
<textarea id="pw-intercept" class="pw-input" rows="3" placeholder="e.g. CALEA intercept via upstream provider Bandwidth.com under the CALEA Reference Model for VoIP"></textarea>
<div id="pw-calea-err" class="pw-err" hidden></div>
</div>
<style>
.pw-step h2 { margin: 0 0 0.5rem; color: #1a2744; }
.pw-help { color: #64748b; font-size: 0.9rem; margin-bottom: 1rem; }
.pw-field { display: block; font-weight: 600; margin: 0.7rem 0 0.2rem; font-size: 0.88rem; }
.pw-input { width: 100%; padding: 0.5rem 0.7rem; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 0.93rem; font-family: inherit; }
.pw-fieldset { border: 1px solid #e2e8f0; border-radius: 8px; padding: 0.75rem 1rem 1rem; margin: 1rem 0; }
.pw-fieldset legend { font-weight: 600; color: #1a2744; padding: 0 0.5rem; }
.pw-err { color: #b91c1c; margin-top: 0.75rem; font-size: 0.9rem; }
</style>
<script>
const g = <T extends HTMLElement>(id: string) => document.getElementById(id) as T;
const err = g<HTMLDivElement>("pw-calea-err");
window.addEventListener("pw:step-shown", (evt: any) => {
if (evt.detail.step !== "calea") return;
const s = (window as any).PWIntake.get();
const c = s.intake_data?.calea_ssi || {};
g<HTMLInputElement>("pw-le-name").value = c.law_enforcement_contact?.name || "";
g<HTMLInputElement>("pw-le-title").value = c.law_enforcement_contact?.title || "";
g<HTMLInputElement>("pw-le-phone").value = c.law_enforcement_contact?.phone || "";
g<HTMLInputElement>("pw-le-email").value = c.law_enforcement_contact?.email_24h || "";
g<HTMLInputElement>("pw-cpni-name").value = c.cpni_protection_officer?.name || "";
g<HTMLInputElement>("pw-cpni-title").value = c.cpni_protection_officer?.title || "";
g<HTMLTextAreaElement>("pw-net-summary").value = c.network_infrastructure_summary || "";
g<HTMLTextAreaElement>("pw-intercept").value = c.interception_support_method || "";
});
window.addEventListener("pw:step-next", (evt: any) => {
const PW = (window as any).PWIntake;
if (PW.steps[PW.get().step_index] !== "calea") return;
const leName = g<HTMLInputElement>("pw-le-name").value.trim();
const lePhone = g<HTMLInputElement>("pw-le-phone").value.trim();
const leEmail = g<HTMLInputElement>("pw-le-email").value.trim();
if (!leName || !lePhone || !leEmail) {
err.hidden = false; err.textContent = "Law enforcement 24-hour contact name, phone, and email are required."; evt.preventDefault(); return;
}
err.hidden = true;
PW.patchIntakeData({
calea_ssi: {
law_enforcement_contact: {
name: leName,
title: g<HTMLInputElement>("pw-le-title").value.trim(),
phone: lePhone,
email_24h: leEmail,
},
cpni_protection_officer: {
name: g<HTMLInputElement>("pw-cpni-name").value.trim(),
title: g<HTMLInputElement>("pw-cpni-title").value.trim(),
},
network_infrastructure_summary: g<HTMLTextAreaElement>("pw-net-summary").value.trim(),
interception_support_method: g<HTMLTextAreaElement>("pw-intercept").value.trim(),
},
});
});
</script>