import { useState } from 'react' import { CheckCircle2, Download, ShieldAlert, ShieldCheck } from 'lucide-react' import { useAdverseImpact, useApproveCurationProposal, useCurationProposals, useVerifyCurationProposal, } from '../lib/queries' import { api } from '../lib/api' import { Badge, Panel } from '../components/ui' import { flagRatio } from '../lib/format' import type { AnalysisSection, CurationProposalView, 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 (
Four fifths analysis over recorded decisions. The platform supplies this data for an independent audit run by the deploying employer.
Loading the report.
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}
The curation surface is unavailable. It is gated to the compliance or operator role and requires the migrator database connection. Detail: {(proposals.error as Error).message}
)} {!proposals.isError && rows.length === 0 && (No pending curation proposals.
)} {rows.length > 0 && (| Kind | Substitute skill | For required skill | Strength | Evidence | Action |
|---|---|---|---|---|---|
| {p.kind.replace(/_/g, ' ')} | {p.from_skill_id.slice(0, 8)} | {p.to_skill_id.slice(0, 8)} | {p.proposed_strength || 'n a'} | {p.evidence_successes} of {p.evidence_observations} |
{isVerified ? (
|
No data.
) : (| Group | Selected | Rate | Impact ratio | Status |
|---|---|---|---|---|
| {r.group} | {r.selected} of {r.considered} | {r.rate} | {r.impact_ratio} |
{r.flagged ? (
|