import { Download, ShieldAlert, ShieldCheck } from 'lucide-react' import { useAdverseImpact } from '../lib/queries' import { api } from '../lib/api' import { Badge, Panel } from '../components/ui' import { flagRatio } from '../lib/format' import type { AnalysisSection, ImpactRow } from '../lib/types' export function Compliance() { const report = useAdverseImpact() async function downloadExport() { const text = await api.adverseImpactExport() const url = URL.createObjectURL(new Blob([text], { type: 'text/plain' })) const a = document.createElement('a') a.href = url a.download = 'adverse_impact_report.txt' a.click() URL.revokeObjectURL(url) } return (
Adverse Impact and AEDT Compliance

Four fifths analysis over recorded decisions. The platform supplies this data for an independent audit run by the deploying employer.

{report.isLoading &&

Loading the report.

} {report.isError && (

The adverse impact report is unavailable. It is read only by the compliance role and requires the compliance database connection. Detail: {(report.error as Error).message}

)} {report.data && ( <>
)}
) } function Meta({ k, v, wide }: { k: string; v: string; wide?: boolean }) { return (
{k}
{v}
) } function Section({ section }: { section: AnalysisSection }) { return (
) } function Cut({ title, rows }: { title: string; rows: ImpactRow[] }) { return (
{title}
{rows.length === 0 ? (

No data.

) : ( {rows.map((r) => ( ))}
Group Selected Rate Impact ratio Status
{r.group} {r.selected} of {r.considered} {r.rate} {r.impact_ratio} {r.flagged ? ( Below 0.80 ) : ( ok )}
)}
) }