PageSourceSearch

https://winmyjob.com/assets/background-check-CXsnKuG9.js

js winmyjob.com collected 2026-10-02 01:49:21 UTC 29,313 bytes, 1 lines download raw bytes

1import{r as g,j as e}from"./vendor-react-EKpbQ58x.js";import{b as ke,u as ie,a as Z}from"./vendor-query-Cy-95fCG.js";import{B as y,D as W,e as ee,f as se,h as te,d as X,b as U,I as i,T as q}from"./index-DSiBKyF6.js";import{P as we}from"./PageHeader-Dff73aen.js";import{E as Se}from"./empty-state-DzV_t00J.js";import{A as Ae,a as De,b as Te,c as Ie,d as _e,e as Pe,f as Ee,g as Oe}from"./alert-dialog-BkYsFFCD.js";import{L as r}from"./label-BeENAcCB.js";import{B as ae}from"./badge-Cm0J9pKt.js";import{S as V,a as z,b as J,c as Y,d as o}from"./select-Pyi2N7ZV.js";import{T as Le,a as Fe,b as P,c as E}from"./tabs-QKdd4dXb.js";import{ag as H,aZ as M,g as ce,be as oe,r as de,B as ue,a5 as me,b7 as he,U as xe,c1 as pe,b1 as Be,b2 as Re,j as qe,h as Ue,bD as re,X as Q}from"./icons-Dx8Iaodt.js";import"./vendor-D5X0EH2b.js";import"./ui-radix-DiOYaS2U.js";import"./vendor-routing-DfDPPI-Y.js";function h(l,u={}){if(!l)return u;try{return JSON.parse(l)}catch{return u}}function K(l){return l==="clear"||l==="verified"||l==="completed"?e.jsx(qe,{className:"w-3.5 h-3.5 text-green-600"}):l==="pending"?e.jsx(Ue,{className:"w-3.5 h-3.5 text-yellow-600"}):l==="review_needed"||l==="discrepancy"?e.jsx(ce,{className:"w-3.5 h-3.5 text-orange-500"}):l==="not_started"?e.jsx(re,{className:"w-3.5 h-3.5 text-muted-foreground"}):e.jsx(re,{className:"w-3.5 h-3.5 text-muted-foreground"})}function G(l){return{not_started:"Not started",pending:"Pending",clear:"Clear",verified:"Verified",completed:"Completed",review_needed:"Review needed",discrepancy:"Discrepancy"}[l]??l}const Ve={pending:"bg-yellow-100 text-yellow-700",in_progress:"bg-blue-100 text-blue-700",completed:"bg-green-100 text-green-700",passed:"bg-green-100 text-green-700",failed:"bg-red-100 text-red-700",adverse_action:"bg-red-100 text-red-700"};function $({value:l,onChange:u,options:f}){return e.jsxs(V,{value:l,onValueChange:u,children:[e.jsx(z,{className:"w-44",children:e.jsx(J,{})}),e.jsx(Y,{children:f.map(j=>e.jsx(o,{value:j.value,children:j.label},j.value))})]})}const ze=[{value:"not_started",label:"Not started"},{value:"pending",label:"Pending"},{value:"clear",label:"Clear"},{value:"review_needed",label:"Review needed"}],ne=[{value:"not_started",label:"Not started"},{value:"pending",label:"Pending"},{value:"verified",label:"Verified"},{value:"discrepancy",label:"Discrepancy found"}],Je=[{value:"not_started",label:"Not started"},{value:"pending",label:"Pending"},{value:"completed",label:"Completed"}];function L({children:l}){return e.jsxs("div",{className:"flex gap-2.5 bg-blue-50 border border-blue-100 rounded-xl p-3 text-xs text-blue-800",children:[e.jsx(oe,{className:"w-3.5 h-3.5 shrink-0 mt-0.5 text-blue-500"}),e.jsx("p",{children:l})]})}function le({item:l,onClose:u,onSave:f}){const{data:j=[]}=ie({queryKey:["job-opportunities"],queryFn:()=>U("GET","/job-opportunities")}),[d,m]=g.useState({company:l?.company||"",provider:l?.provider||"",status:l?.status||"pending",initiatedAt:l?.initiatedAt?.slice(0,10)||"",completedAt:l?.completedAt?.slice(0,10)||"",result:l?.result||"",notes:l?.notes||"",jobOpportunityId:""}),[N,O]=g.useState(h(l?.criminalCheck,{status:"not_started",jurisdictions:"",notes:""})),[k,w]=g.useState(h(l?.employmentCheck,{status:"not_started",employers:[],notes:""})),[S,A]=g.useState(h(l?.educationCheck,{status:"not_started",institutions:[],notes:""})),[n,x]=g.useState(h(l?.addressHistory,[])),[D,T]=g.useState(h(l?.referencesList,[])),[v,b]=g.useState(h(l?.i9Data,{status:"not_started",documentType:"",completionDate:"",notes:""}));function F(){f({...d,jobOpportunityId:d.jobOpportunityId?parseInt(d.jobOpportunityId):void 0,criminalCheck:JSON.stringify(N),employmentCheck:JSON.stringify(k),educationCheck:JSON.stringify(S),addressHistory:JSON.stringify(n),referencesList:JSON.stringify(D),i9Data:JSON.stringify(v)})}function je(){w(s=>({...s,employers:[...s.employers,{employer:"",title:"",fromDate:"",toDate:"",isCurrent:!1}]}))}function ge(s){w(t=>({...t,employers:t.employers.filter((a,c)=>c!==s)}))}function B(s,t,a){w(c=>({...c,employers:c.employers.map((p,_)=>_===s?{...p,[t]:a}:p)}))}function ve(){A(s=>({...s,institutions:[...s.institutions,{institution:"",degree:"",field:"",graduationYear:"",graduated:!0}]}))}function ye(s){A(t=>({...t,institutions:t.institutions.filter((a,c)=>c!==s)}))}function R(s,t,a){A(c=>({...c,institutions:c.institutions.map((p,_)=>_===s?{...p,[t]:a}:p)}))}function fe(){x(s=>[...s,{street:"",city:"",state:"",zip:"",country:"United States",fromDate:"",toDate:"",isCurrent:!1}])}function Ne(s){x(t=>t.filter((a,c)=>c!==s))}function C(s,t,a){x(c=>c.map((p,_)=>_===s?{...p,[t]:a}:p))}function be(){T(s=>[...s,{name:"",title:"",company:"",relationship:"professional",phone:"",email:"",provided:!1}])}function Ce(s){T(t=>t.filter((a,c)=>c!==s))}function I(s,t,a){T(c=>c.map((p,_)=>_===s?{...p,[t]:a}:p))}return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs(Le,{defaultValue:"overview",children:[e.jsxs(Fe,{className:"grid grid-cols-7 h-auto gap-0.5",children:[e.jsxs(P,{value:"overview",className:"text-xs py-1.5",children:[e.jsx(H,{className:"w-3 h-3 mr-1 hidden sm:inline"}),"Overview"]}),e.jsxs(P,{value:"criminal",className:"text-xs py-1.5",children:[e.jsx(de,{className:"w-3 h-3 mr-1 hidden sm:inline"}),"Criminal"]}),e.jsxs(P,{value:"employment",className:"text-xs py-1.5",children:[e.jsx(ue,{className:"w-3 h-3 mr-1 hidden sm:inline"}),"Employment"]}),e.jsxs(P,{value:"education",className:"text-xs py-1.5",children:[e.jsx(me,{className:"w-3 h-3 mr-1 hidden sm:inline"}),"Education"]}),e.jsxs(P,{value:"addresses",className:"text-xs py-1.5",children:[e.jsx(he,{className:"w-3 h-3 mr-1 hidden sm:inline"}),"Addresses"]}),e.jsxs(P,{value:"references",className:"text-xs py-1.5",children:[e.jsx(xe,{className:"w-3 h-3 mr-1 hidden sm:inline"}),"References"]}),e.jsxs(P,{value:"i9",className:"text-xs py-1.5",children:[e.jsx(pe,{className:"w-3 h-3 mr-1 hidden sm:inline"}),"I-9"]})]}),e.jsxs(E,{value:"overview",className:"mt-4 space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(r,{children:"Company *"}),e.jsx(i,{className:"mt-1",placeholder:"Company running the check",value:d.company,onChange:s=>m(t=>({...t,company:s.target.value}))})]}
1),e.jsxs("div",{children:[e.jsx(r,{children:"Background Check Provider"}),e.jsx(i,{className:"mt-1",placeholder:"e.g. Checkr, HireRight, Sterling",value:d.provider,onChange:s=>m(t=>({...t,provider:s.target.value}))})]}),e.jsxs("div",{children:[e.jsx(r,{children:"Overall Status"}),e.jsxs(V,{value:d.status,onValueChange:s=>m(t=>({...t,status:s})),children:[e.jsx(z,{className:"mt-1",children:e.jsx(J,{})}),e.jsxs(Y,{children:[e.jsx(o,{value:"pending",children:"Pending"}),e.jsx(o,{value:"in_progress",children:"In Progress"}),e.jsx(o,{value:"completed",children:"Completed"}),e.jsx(o,{value:"passed",children:"Passed"}),e.jsx(o,{value:"failed",children:"Failed / Adverse Action"})]})]})]}),e.jsxs("div",{children:[e.jsx(r,{children:"Linked Job"}),e.jsxs(V,{value:d.jobOpportunityId,onValueChange:s=>m(t=>({...t,jobOpportunityId:s})),children:[e.jsx(z,{className:"mt-1",children:e.jsx(J,{placeholder:"Select job…"})}),e.jsx(Y,{children:j.map(s=>e.jsxs(o,{value:String(s.id),children:[s.company,s.jobTitle?` — ${s.jobTitle}`:""]},s.id))})]})]}),e.jsxs("div",{children:[e.jsx(r,{children:"Date Initiated"}),e.jsx(i,{className:"mt-1",type:"date",value:d.initiatedAt,onChange:s=>m(t=>({...t,initiatedAt:s.target.value}))})]}),e.jsxs("div",{children:[e.jsx(r,{children:"Date Completed"}),e.jsx(i,{className:"mt-1",type:"date",value:d.completedAt,onChange:s=>m(t=>({...t,completedAt:s.target.value}))})]})]}),e.jsxs("div",{children:[e.jsx(r,{children:"Overall Result"}),e.jsx(i,{className:"mt-1",placeholder:"e.g. Clear, Adverse action, Pending review…",value:d.result,onChange:s=>m(t=>({...t,result:s.target.value}))})]}),e.jsxs("div",{children:[e.jsx(r,{children:"General Notes"}),e.jsx(q,{className:"mt-1",rows:3,placeholder:"Documents submitted, instructions received, timeline…",value:d.notes,onChange:s=>m(t=>({...t,notes:s.target.value}))})]})]}),e.jsxs(E,{value:"criminal",className:"mt-4 space-y-4",children:[e.jsx(L,{children:"Criminal background checks typically search court records at county, state, and/or federal level for the past 7–10 years. Under the FCRA, you have the right to know what was reported and to dispute inaccurate information before any adverse action is taken."}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(r,{className:"shrink-0",children:"Check Status"}),e.jsx($,{value:N.status,onChange:s=>O(t=>({...t,status:s})),options:ze})]}),e.jsxs("div",{children:[e.jsx(r,{children:"Jurisdictions Searched"}),e.jsx(i,{className:"mt-1",placeholder:"e.g. Federal, California State, San Francisco County",value:N.jurisdictions,onChange:s=>O(t=>({...t,jurisdictions:s.target.value}))}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"List the counties, states, or federal scope that were included in the search."})]}),e.jsxs("div",{children:[e.jsx(r,{children:"Notes"}),e.jsx(q,{className:"mt-1",rows:3,placeholder:"Any communications received, documents requested…",value:N.notes,onChange:s=>O(t=>({...t,notes:s.target.value}))})]})]}),e.jsxs(E,{value:"employment",className:"mt-4 space-y-4",children:[e.jsx(L,{children:"Employment verification confirms job titles, employment dates, and eligibility for rehire with previous employers. Small discrepancies in dates (a month or two) are common — keep your own employment records handy to cross-check."}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(r,{className:"shrink-0",children:"Check Status"}),e.jsx($,{value:k.status,onChange:s=>w(t=>({...t,status:s})),options:ne})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(r,{children:"Previous Employers Being Verified"}),e.jsxs(y,{type:"button",variant:"outline",size:"sm",onClick:je,children:[e.jsx(M,{className:"w-3.5 h-3.5 mr-1"}),"Add Employer"]})]}),k.employers.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground py-2",children:"No employers added yet. Add each employer you expect to be verified."}),k.employers.map((s,t)=>e.jsxs("div",{className:"border rounded-xl p-4 space-y-3 relative",children:[e.jsx("button",{type:"button",onClick:()=>ge(t),className:"absolute top-3 right-3 text-muted-foreground hover:text-destructive",children:e.jsx(Q,{className:"w-4 h-4"})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"Employer"}),e.jsx(i,{className:"mt-1",placeholder:"Company name",value:s.employer,onChange:a=>B(t,"employer",a.target.value)})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"Job Title"}),e.jsx(i,{className:"mt-1",placeholder:"Your title at this role",value:s.title,onChange:a=>B(t,"title",a.target.value)})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"From Date"}),e.jsx(i,{className:"mt-1",type:"date",value:s.fromDate,onChange:a=>B(t,"fromDate",a.target.value)})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"To Date"}),e.jsx(i,{className:"mt-1",type:"date",value:s.toDate,disabled:s.isCurrent,onChange:a=>B(t,"toDate",a.target.value)})]})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.isCurrent,onChange:a=>B(t,"isCurrent",a.target.checked),className:"rounded"}),"Current employer"]})]},t))]}),e.jsxs("div",{children:[e.jsx(r,{children:"Notes"}),e.jsx(q,{className:"mt-1",rows:2,placeholder:"Any discrepancies flagged, documents requested…",value:k.notes,onChange:s=>w(t=>({...t,notes:s.target.value}))})]})]}),e.jsxs(E,{value:"education",className:"mt-4 space-y-4",children:[e.jsx(L,{children:"Education verification confirms degrees, diplomas, and attendance dates directly with institutions or through clearinghouses such as the National Student Clearinghouse. Typically covers the highest degree claimed, though some checks verify all listed qualifications."}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(r,{className:"shrink-0",children:"Check Status"}),e.jsx($,{value:S.status,onChange:s=>A(t=>({...t,status:s})),options:ne})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(r,{children:"Institutions Being Verified"}),e.jsxs(y,{type:"button",variant:"outline",size:"sm",onClick:ve,children:[e.jsx(M,{className:"w-3.5 h-3.5 mr-1"}),"Add Institution"]})]}),S.institutions.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground py-2",children:"No institutions added yet. Add each school or university you expect to be verified."}),S.institutions.map((s,t)=>e.jsxs("div",{className:"border rounded-xl p-4 space-y-3 relative",children:[e.jsx("button",{type:"button",onClick:()=>ye(t),className:"absolute top-3 right-3 text-muted-foreground hover:text-destructive",children:e.jsx(Q,{className:"w-4 h-4"})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"col-span-2",children:[e.jsx(r,{className:"text-xs",children:"Institution"}),e.jsx(i,{className:"mt-1",placeholder:"University / College / School name",value:s.institution,onChange:a=>R(t,"institution",a.target.value)})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"Degree / Qualification"}),e.jsx(i,{className:"mt-1",placeholder:"e.g. Bachelor of Science",value:s.degree,onChange:a=>R(t,"degree",a.target.value)})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"Field of Study"}),e.jsx(i,{className:"mt-1",placeholder:"e.g. Computer Science",value:s.field,onChange:a=>R(t,"field",a.target.value)})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"Graduation Year"}),e.jsx(i,{className:"mt-1",placeholder:"e.g. 2019",value:s.graduationYear,onChange:a=>R(t,"graduationYear",a.target.value)})]})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.graduated,onChange:a=>R(t,"graduated",a.target.checked),className:"rounded"}),"Degree awarded (uncheck if attended but did not graduate)"]})]},t))]}),e.jsxs("div",{children:[e.jsx(r,{children:"Notes"}),e.jsx(q,{className:"mt-1",rows:2,placeholder:"Any discrepancies, documents requested, transcript requirements…",value:S.notes,onChange:s=>A(t=>({...t,notes:s.target.value}))})]})]}),e.jsxs(E,{value:"addresses",className:"mt-4 space-y-4",children:[e.jsx(L,{children:"Address history is used to determine the correct jurisdictions for criminal record searches. Employers typically request 7 years of address history. Provide all addresses where you lived during that period, including short-term residences."}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(r,{children:"Address History"}),e.jsxs(y,{type:"button",variant:"outline",size:"sm",onClick:fe,children:[e.jsx(M,{className:"w-3.5 h-3.5 mr-1"}),"Add Address"]})]}),n.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground py-2",children:"No addresses added yet. Add each address you have lived at, most recent first."}),n.map((s,t)=>e.jsxs("div",{className:"border rounded-xl p-4 space-y-3 relative",children:[e.jsx("button",{type:"button",onClick:()=>Ne(t),className:"absolute top-3 right-3 text-muted-foreground hover:text-destructive",children:e.jsx(Q,{className:"w-4 h-4"})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"col-span-2",children:[e.jsx(r,{className:"text-xs",children:"Street Address"}),e.jsx(i,{className:"mt-1",placeholder:"123 Main St, Apt 4B",value:s.street,onChange:a=>C(t,"street",a.target.value)})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"City"}),e.jsx(i,{className:"mt-1",placeholder:"City",value:s.city,onChange:a=>C(t,"city",a.target.value)})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"State / Province"}),e.jsx(i,{className:"mt-1",placeholder:"State",value:s.state,onChange:a=>C(t,"state",a.target.value)})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"ZIP / Postal Code"}),e.jsx(i,{className:"mt-1",placeholder:"ZIP code",value:s.zip,onChange:a=>C(t,"zip",a.target.value)})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"Country"}),e.jsx(i,{className:"mt-1",placeholder:"Country",value:s.country,onChange:a=>C(t,"country",a.target.value)})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"From"}),e.jsx(i,{className:"mt-1",type:"date",value:s.fromDate,onChange:a=>C(t,"fromDate",a.target.value)})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"To"}),e.jsx(i,{className:"mt-1",type:"date",value:s.toDate,disabled:s.isCurrent,onChange:a=>C(t,"toDate",a.target.value)})]})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.isCurrent,onChange:a=>C(t,"isCurrent",a.target.checked),className:"rounded"}),"Current address"]})]},t))]})]}),e.jsxs(E,{value:"references",className:"mt-4 space-y-4",children:[e.jsx(L,{children:"Reference checks involve contacting individuals you list to verify your character, skills, and work history. You are always asked to consent before references are contacted. Only provide references who are aware they may be reached out to."}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(r,{children:"Reference List"}),e.jsxs(y,{type:"button",variant:"outline",size:"sm",onClick:be,children:[e.jsx(M,{className:"w-3.5 h-3.5 mr-1"}),"Add Reference"]})]}),D.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground py-2",children:"No references added yet. Track each reference you are providing or expect to be contacted."}),D.map((s,t)=>e.jsxs("div",{className:"border rounded-xl p-4 space-y-3 relative",children:[e.jsx("button",{type:"button",onClick:()=>Ce(t),className:"absolute top-3 right-3 text-muted-foreground hover:text-destructive",children:e.jsx(Q,{className:"w-4 h-4"})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"Full Name"}),e.jsx(i,{className:"mt-1",placeholder:"Reference name",value:s.name,onChange:a=>I(t,"name",a.target.value)})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"Job Title"}),e.jsx(i,{className:"mt-1",placeholder:"Their current title",value:s.title,onChange:a=>I(t,"title",a.target.value)})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"Company"}),e.jsx(i,{className:"mt-1",placeholder:"Their company",value:s.company,onChange:a=>I(t,"company",a.target.value)})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"Relationship Type"}),e.jsxs(V,{value:s.relationship,onValueChange:a=>I(t,"relationship",a),children:[e.jsx(z,{className:"mt-1",children:e.jsx(J,{})}),e.jsxs(Y,{children:[e.jsx(o,{value:"professional",children:"Professional (former manager / colleague)"}),e.jsx(o,{value:"academic",children:"Academic (professor / advisor)"}),e.jsx(o,{value:"personal",children:"Personal (non-family)"})]})]})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"Phone"}),e.jsx(i,{className:"mt-1",placeholder:"Phone number",value:s.phone,onChange:a=>I(t,"phone",a.target.value)})]}),e.jsxs("div",{children:[e.jsx(r,{className:"text-xs",children:"Email"}),e.jsx(i,{className:"mt-1",placeholder:"Email address",value:s.email,onChange:a=>I(t,"email",a.target.value)})]})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.provided,onChange:a=>I(t,"provided",a.target.checked),className:"rounded"}),"Contact details already provided to employer"]})]},t))]})]}),e.jsxs(E,{value:"i9",className:"mt-4 space-y-4",children:[e.jsx(L,{children:"Form I-9 verifies your identity and authorisation to work in the United States. It is required by law for all US employers. You choose which acceptable documents to present — either one List A document (e.g. US Passport) or one document from List B and one from List C. Your employer cannot specify which documents you must use."}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(r,{className:"shrink-0",children:"I-9 Status"}),e.jsx($,{value:v.status,onChange:s=>b(t=>({...t,status:s})),options:Je})]}),e.jsxs("div",{children:[e.jsx(r,{children:"Documents Presented"}),e.jsxs(V,{value:v.documentType,onValueChange:s=>b(t=>({...t,documentType:s})),children:[e.jsx(z,{className:"mt-1",children:e.jsx(J,{placeholder:"Select document type…"})}),e.jsxs(Y,{children:[e.jsx(o,{value:"passport",children:"List A — US Passport or Passport Card"}),e.jsx(o,{value:"perm_resident",children:"List A — Permanent Resident Card (
1I-551)"}),e.jsx(o,{value:"ead",children:"List A — Employment Authorization Document (I-766)"}),e.jsx(o,{value:"foreign_passport_visa",children:"List A — Foreign Passport with applicable visa"}),e.jsx(o,{value:"dl_ssn",children:"List B + C — Driver's Licence + Social Security Card"}),e.jsx(o,{value:"dl_birth",children:"List B + C — Driver's Licence + Birth Certificate"}),e.jsx(o,{value:"other",children:"Other combination"})]})]})]}),e.jsxs("div",{children:[e.jsx(r,{children:"Completion Date"}),e.jsx(i,{className:"mt-1",type:"date",value:v.completionDate,onChange:s=>b(t=>({...t,completionDate:s.target.value}))})]}),e.jsxs("div",{children:[e.jsx(r,{children:"Notes"}),e.jsx(q,{className:"mt-1",rows:3,placeholder:"Remote I-9 authorized representative details, E-Verify status, any follow-up required…",value:v.notes,onChange:s=>b(t=>({...t,notes:s.target.value}))})]})]})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2 border-t",children:[e.jsx(y,{variant:"outline",onClick:u,children:"Cancel"}),e.jsx(y,{onClick:F,disabled:!d.company,children:"Save"})]})]})}function rs(){const[l,u]=g.useState(!1),[f,j]=g.useState(null),[d,m]=g.useState(null),N=ke(),{data:O=[],isLoading:k}=ie({queryKey:["background-checks"],queryFn:()=>U("GET","/background-checks")}),w=Z({mutationFn:n=>U("POST","/background-checks",n),onSuccess:()=>{N.invalidateQueries({queryKey:["background-checks"]}),u(!1),X({title:"Background check added!"})}}),S=Z({mutationFn:({id:n,data:x})=>U("PUT",`/background-checks/${n}`,x),onSuccess:()=>{N.invalidateQueries({queryKey:["background-checks"]}),j(null),X({title:"Updated!"})}}),A=Z({mutationFn:n=>U("DELETE",`/background-checks/${n}`),onSuccess:()=>{N.invalidateQueries({queryKey:["background-checks"]}),X({title:"Deleted"})}});return e.jsxs("div",{className:"p-4 sm:p-6 max-w-5xl mx-auto",children:[e.jsx(we,{icon:H,title:"Background Check",description:"Track background check progress for each company — criminal, employment, education, addresses, references, and I-9.",actions:e.jsxs(y,{onClick:()=>u(!0),children:[e.jsx(M,{className:"w-4 h-4 mr-2"}),"Add Check"]})}),e.jsxs("div",{className:"flex gap-3 bg-amber-50 border border-amber-200 rounded-xl p-4 mb-3 text-sm text-amber-800",children:[e.jsx(ce,{className:"w-4 h-4 text-amber-500 shrink-0 mt-0.5"}),e.jsxs("p",{children:["This is a personal tracking tool only — it does not provide legal advice. Under the ",e.jsx("strong",{children:"FCRA"}),", you have the right to receive a copy of any report used against you and to dispute inaccurate information before adverse action is finalised. For specific concerns about your background check results, consult a qualified attorney or the relevant regulatory body."]})]}),e.jsxs("div",{className:"flex gap-3 bg-blue-50 border border-blue-200 rounded-xl p-4 mb-5 text-sm text-blue-800",children:[e.jsx(oe,{className:"w-4 h-4 text-blue-500 shrink-0 mt-0.5"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"font-semibold",children:"Important reminders while your background check is in progress"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-blue-700",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Do not resign from your current job"})," until the background check has been fully completed and cleared. Even with a verbal offer, an uncleared check can put you in a very difficult position."]}),e.jsxs("li",{children:["Once the check is marked complete, ",e.jsx("strong",{children:"request a written confirmation"})," — ask the employer or screening provider to email you a report confirming the outcome. You are entitled to a copy of any consumer report used in the process."]})]})]})]}),k?e.jsx("div",{className:"space-y-3 animate-pulse",children:[...Array(3)].map((n,x)=>e.jsx("div",{className:"h-24 bg-muted rounded-xl"},x))}):O.length===0?e.jsx(Se,{icon:H,title:"No background checks tracked",description:"Add a background check to track its progress across criminal, employment, education, address, reference, and I-9 verification.",action:{label:"Add Check",onClick:()=>u(!0)}}):e.jsx("div",{className:"space-y-3",children:O.map(n=>{const x=h(n.criminalCheck,{status:"not_started",jurisdictions:"",notes:""}),D=h(n.employmentCheck,{status:"not_started",employers:[],notes:""}),T=h(n.educationCheck,{status:"not_started",institutions:[],notes:""}),v=h(n.i9Data,{status:"not_started",documentType:"",completionDate:"",notes:""}),b=h(n.addressHistory,[]).length,F=h(n.referencesList,[]).length;return e.jsx("div",{className:"bg-card border rounded-xl p-5 shadow-sm",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-1",children:[e.jsx("h3",{className:"font-semibold text-foreground",children:n.company||"Unknown company"}),e.jsx(ae,{className:`${Ve[n.status]||"bg-muted text-muted-foreground"} border-0 text-xs capitalize`,children:n.status.replace("_"," ")}),n.result&&e.jsx(ae,{className:"bg-muted text-muted-foreground border-0 text-xs",children:n.result})]}),n.provider&&e.jsxs("p",{className:"text-sm text-muted-foreground",children:["via ",n.provider]}),n.initiatedAt&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Started: ",new Date(n.initiatedAt).toLocaleDateString()]}),n.completedAt&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Completed: ",new Date(n.completedAt).toLocaleDateString()]}),e.jsxs("div",{className:"flex items-center gap-3 mt-2 flex-wrap",children:[x.status!=="not_started"&&e.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[K(x.status),e.jsx(de,{className:"w-3 h-3"}),e.jsxs("span",{children:["Criminal · ",G(x.status)]})]}),D.status!=="not_started"&&e.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[K(D.status),e.jsx(ue,{className:"w-3 h-3"}),e.jsxs("span",{children:["Employment · ",G(D.status)]})]}),T.status!=="not_started"&&e.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[K(T.status),e.jsx(me,{className:"w-3 h-3"}),e.jsxs("span",{children:["Education · ",G(T.status)]})]}),b>0&&e.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx(he,{className:"w-3 h-3"}),e.jsxs("span",{children:[b," address",b!==1?"es":""]})]}),F>0&&e.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx(xe,{className:"w-3 h-3"}),e.jsxs("span",{children:[F," reference",F!==1?"s":""]})]}),v.status!=="not_started"&&e.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[K(v.status),e.jsx(pe,{className:"w-3 h-3"}),e.jsxs("span",{children:["I-9 · ",G(v.status)]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx(y,{variant:"outline",size:"sm",onClick:()=>j(n),children:e.jsx(Be,{className:"w-4 h-4"})}),e.jsx(y,{variant:"outline",size:"sm",onClick:()=>m(n.id),className:"text-destructive hover:bg-destructive/10",children:e.jsx(Re,{className:"w-4 h-4"})})]})]})},n.id)})}),e.jsx(W,{open:l,onOpenChange:u,children:e.jsxs(ee,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsx(se,{children:e.jsxs(te,{className:"flex items-center gap-2",children:[e.jsx(H,{className:"w-5 h-5"}
1),"Add Background Check"]})}),e.jsx(le,{onClose:()=>u(!1),onSave:w.mutate})]})}),e.jsx(W,{open:!!f,onOpenChange:()=>j(null),children:e.jsxs(ee,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsx(se,{children:e.jsxs(te,{className:"flex items-center gap-2",children:[e.jsx(H,{className:"w-5 h-5"}),"Edit Background Check"]})}),f&&e.jsx(le,{item:f,onClose:()=>j(null),onSave:n=>S.mutate({id:f.id,data:n})})]})}),e.jsx(Ae,{open:d!==null,onOpenChange:n=>{n||m(null)},children:e.jsxs(De,{children:[e.jsxs(Te,{children:[e.jsx(Ie,{children:"Delete this background check?"}),e.jsx(_e,{children:"This will permanently remove this background check record. This action cannot be undone."})]}),e.jsxs(Pe,{children:[e.jsx(Ee,{children:"Cancel"}),e.jsx(Oe,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{d!==null&&(A.mutate(d),m(null))},children:"Delete"})]})]})})]})}export{rs as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.