HR-ATS-Portal/frontend/dist/assets/Reports-N5uRXWvZ.js

3 lines
5.7 KiB
JavaScript

import{d as g,r as t,b as a,l as c,j as e,I as i,K as u,X as v}from"./index-BTPmxtwM.js";import{C as n,a as d,b as y}from"./Chart-BGHtrE8S.js";import{D as N}from"./DataTable-D5imKbZq.js";const o=[{stage:"Applied",v:100},{stage:"Screened",v:62},{stage:"Assessed",v:41},{stage:"Interviewed",v:28},{stage:"Offered",v:14},{stage:"Hired",v:9}],T=[{name:"Hiring Funnel Report",desc:"Conversion rates across each pipeline stage",icn:"filter",cls:"i-indigo"},{name:"Source Effectiveness",desc:"ROI and quality by sourcing channel",icn:"target",cls:"i-teal"},{name:"Diversity & Inclusion",desc:"Demographic breakdown of the pipeline",icn:"users",cls:"i-purple"},{name:"Recruiter Scorecard",desc:"Individual performance metrics",icn:"award",cls:"i-amber"},{name:"Offer Analysis",desc:"Acceptance rates and compensation trends",icn:"file",cls:"i-green"},{name:"Interview Analytics",desc:"Interviewer load and feedback quality",icn:"calendar",cls:"i-blue"}];function E(){const{toast:l}=g(),m=t.useMemo(()=>a.departments.map(s=>{const r=Math.round((s.open?s.apps/(s.open*40):.5)*100);return{id:s.dept,dept:s.dept,open:s.open,apps:s.apps,hires:c(1,8),ttf:c(28,52),rate:Math.min(r,98)}}),[]),h=t.useMemo(()=>({labels:o.map(s=>s.stage),data:o.map(s=>s.v),colors:n.PALETTE,yFmt:s=>`${s}%`}),[]),p=t.useMemo(()=>({labels:a.hiringTrend.labels,datasets:[{label:"Time to Hire",data:a.timeToHire,color:n.PALETTE[0]},{label:"Time to Fill",data:a.timeToFill,color:n.PALETTE[2]}],yFmt:s=>`${s}d`}),[]),x=t.useMemo(()=>[{label:"Time to Hire",color:n.PALETTE[0]},{label:"Time to Fill",color:n.PALETTE[2]}],[]),b=[{label:"Total Hires (YTD)",value:a.hiringTrend.hires.reduce((s,r)=>s+r,0),icon:"award",tone:"i-green",foot:"+18% vs last year"},{label:"Total Applications",value:a.hiringTrend.applications.reduce((s,r)=>s+r,0).toLocaleString(),icon:"users",tone:"i-blue",foot:"across all channels"},{label:"Avg. Time to Hire",value:"27 days",icon:"clock",tone:"i-teal",foot:"3 days faster"},{label:"Avg. Cost per Hire",value:"$4,280",icon:"dollar",tone:"i-amber",foot:"within budget"}],j=[{key:"dept",label:"Department",sortable:!0,render:s=>e.jsx("span",{className:"cell-primary",children:s.dept})},{key:"open",label:"Open Roles",sortable:!0,align:"center"},{key:"apps",label:"Applications",sortable:!0,align:"center",render:s=>e.jsx("b",{children:s.apps})},{key:"hires",label:"Hires",sortable:!0,align:"center"},{key:"ttf",label:"Time to Fill",sortable:!0,align:"center",render:s=>`${s.ttf} days`},{key:"rate",label:"Fill Rate",sortable:!0,render:s=>e.jsxs("div",{className:"flex items-center gap-8",children:[e.jsx("div",{style:{flex:1},children:e.jsx(v,{pct:s.rate})}),e.jsxs("b",{style:{width:38,textAlign:"right"},children:[s.rate,"%"]})]})}];return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"page-head",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"page-title",children:"Reports"}),e.jsx("p",{className:"page-sub",children:"Recruitment metrics and downloadable insights"})]}),e.jsxs("div",{className:"page-head-actions",children:[e.jsxs("select",{className:"select",defaultValue:"Last 7 months",children:[e.jsx("option",{children:"Last 7 months"}),e.jsx("option",{children:"This quarter"}),e.jsx("option",{children:"This year"})]}),e.jsxs("button",{className:"btn btn-primary",onClick:()=>l("Full report exported to PDF","success"),children:[e.jsx(i,{name:"download"})," Export Report"]})]})]}),e.jsx("div",{className:"grid g-kpi mb-18",children:b.map(s=>e.jsx(u,{...s},s.label))}),e.jsxs("div",{className:"grid g-2 mb-18",children:[e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{children:"Hiring Funnel"}),e.jsx("span",{className:"ch-sub",children:"Stage-by-stage conversion"})]}),e.jsx("button",{className:"btn btn-ghost btn-sm",onClick:()=>l("Chart exported","info"),children:e.jsx(i,{name:"download"})})]}),e.jsx("div",{className:"card-body",children:e.jsx("div",{className:"chart-wrap",children:e.jsx(d,{type:"bar",data:h,height:280})})})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"card-head",children:e.jsxs("div",{children:[e.jsx("h3",{children:"Time to Hire vs Fill"}),e.jsx("span",{className:"ch-sub",children:"Monthly trend (days)"})]})}),e.jsxs("div",{className:"card-body",children:[e.jsx("div",{className:"chart-wrap",children:e.jsx(d,{type:"groupedBar",data:p,height:280})}),e.jsx(y,{items:x})]})]})]}),e.jsxs("div",{className:"card mb-18",children:[e.jsxs("div",{className:"card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{children:"Department Performance"}),e.jsx("span",{className:"ch-sub",children:"Hiring breakdown by team"})]}),e.jsxs("button",{className:"btn btn-secondary btn-sm",onClick:()=>l("Table exported to CSV","success"),children:[e.jsx(i,{name:"download"})," CSV"]})]}),e.jsx(N,{columns:j,rows:m,pageSize:10})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"card-head",children:e.jsxs("div",{children:[e.jsx("h3",{children:"Report Library"}),e.jsx("span",{className:"ch-sub",children:"Generate a detailed report"})]})}),e.jsx("div",{className:"card-body",children:e.jsx("div",{className:"grid g-3",children:T.map(s=>e.jsx("div",{className:"card",style:{boxShadow:"none",background:"var(--bg-sunken)",cursor:"pointer"},onClick:()=>l(`Generating: ${s.name}`,"info"),children:e.jsxs("div",{className:"card-body",children:[e.jsx("span",{className:`kpi-icn ${s.cls}`,style:{marginBottom:12},children:e.jsx(i,{name:s.icn})}),e.jsx("div",{className:"lr-title",children:s.name}),e.jsx("div",{className:"lr-sub",style:{marginTop:4},children:s.desc}),e.jsxs("div",{style:{marginTop:12,color:"var(--primary)",fontWeight:600,fontSize:13},children:["Generate ",e.jsx(i,{name:"chevron-right"})]})]})},s.name))})})]})]})}export{E as default};
//# sourceMappingURL=Reports-N5uRXWvZ.js.map