HR-ATS-Portal/frontend/dist/assets/Dashboard-1SEoZ3VH.js

3 lines
7.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import{u as S,a as r,s as c,r as n,b as i,j as s,L as t,I as h,k as L,K as v,A as m,f as P,S as R,c as I,m as J}from"./index-BTPmxtwM.js";import{C as d,a as x,b as M}from"./Chart-BGHtrE8S.js";function q(){const j=S(),{data:N=[]}=r(c("interviews")),{data:u=[]}=r(c("candidates")),{data:b=[]}=r(c("recruiters")),{data:g=[]}=r(c("activity")),a=L,y=n.useMemo(()=>({labels:i.hiringTrend.labels,area:!0,datasets:[{label:"Applications",data:i.hiringTrend.applications,color:d.PALETTE[4]},{label:"Hires",data:i.hiringTrend.hires,color:d.PALETTE[0]}]}),[]),f=n.useMemo(()=>({labels:i.pipeline.map(e=>e.stage),data:i.pipeline.map(e=>e.count),colors:d.PALETTE}),[]),w=n.useMemo(()=>({labels:i.sources.map(e=>e.source),data:i.sources.map(e=>e.count)}),[]),T=n.useMemo(()=>[{label:"Applications",color:d.PALETTE[4]},{label:"Hires",color:d.PALETTE[0]}],[]),p=N.filter(e=>e.status==="Scheduled").slice(0,5),A=[...u].sort((e,l)=>l.applied-e.applied).slice(0,5),C=[...b].sort((e,l)=>l.hires-e.hires).slice(0,5),E=[{label:"Open Jobs",value:a.openJobs,icon:"briefcase",tone:"i-indigo",trend:"+8%",dir:"up",foot:"vs last month"},{label:"Total Candidates",value:a.totalCandidates,icon:"users",tone:"i-blue",trend:"+12%",dir:"up",foot:"active in pipeline"},{label:"Interviews Today",value:a.interviewsToday,icon:"calendar",tone:"i-purple",trend:"3 upcoming",dir:"flat",foot:"next at 2:00 PM"},{label:"Offers Accepted",value:a.offersAccepted,icon:"check-circle",tone:"i-green",trend:"+5%",dir:"up",foot:`of ${a.offersSent} sent`}],k=[{label:"Time to Hire",value:`${a.timeToHire} days`,icon:"clock",tone:"i-teal",trend:"-3 days",dir:"up",foot:"faster than target"},{label:"Time to Fill",value:`${a.timeToFill} days`,icon:"target",tone:"i-amber",trend:"-2 days",dir:"up",foot:"41 day average"},{label:"Cost per Hire",value:J(a.costPerHire),icon:"dollar",tone:"i-red",trend:"+4%",dir:"down",foot:"above budget"},{label:"Closed Jobs",value:a.closedJobs+a.hires,icon:"award",tone:"i-purple",trend:"+15%",dir:"up",foot:"this quarter"}];return s.jsxs("div",{className:"page",children:[s.jsxs("div",{className:"page-head",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"page-title",children:"Good morning, Asfand 👋"}),s.jsx("p",{className:"page-sub",children:"Heres whats happening with your hiring today — Thursday, July 9, 2026"})]}),s.jsxs("div",{className:"page-head-actions",children:[s.jsxs(t,{className:"btn btn-secondary",to:"/reports",children:[s.jsx(h,{name:"download"})," Export"]}),s.jsxs(t,{className:"btn btn-primary",to:"/jobs",state:{openCreate:!0},children:[s.jsx(h,{name:"plus"})," Create Job"]})]})]}),s.jsx("div",{className:"grid g-kpi",children:E.map(e=>s.jsx(v,{...e},e.label))}),s.jsx("div",{className:"grid g-kpi mt-18",children:k.map(e=>s.jsx(v,{...e},e.label))}),s.jsxs("div",{className:"grid g-2-1 mt-18",children:[s.jsxs("div",{className:"card",children:[s.jsxs("div",{className:"card-head",children:[s.jsxs("div",{children:[s.jsx("h3",{children:"Hiring Trend"}),s.jsx("span",{className:"ch-sub",children:"Hires vs applications over the last 7 months"})]}),s.jsxs("div",{className:"pill-tabs",children:[s.jsx("span",{className:"pill-tab active",children:"7M"}),s.jsx("span",{className:"pill-tab",children:"1Y"})]})]}),s.jsxs("div",{className:"card-body",children:[s.jsx("div",{className:"chart-wrap",children:s.jsx(x,{type:"line",data:y,height:280})}),s.jsx(M,{items:T})]})]}),s.jsxs("div",{className:"card",children:[s.jsx("div",{className:"card-head",children:s.jsxs("div",{children:[s.jsx("h3",{children:"Candidate Pipeline"}),s.jsx("span",{className:"ch-sub",children:"Active by stage"})]})}),s.jsx("div",{className:"card-body",children:s.jsx("div",{className:"chart-wrap",children:s.jsx(x,{type:"horizontalBar",data:f,height:280})})})]})]}),s.jsxs("div",{className:"grid g-2-1 mt-18",children:[s.jsxs("div",{className:"card",children:[s.jsxs("div",{className:"card-head",children:[s.jsxs("div",{children:[s.jsx("h3",{children:"Upcoming Interviews"}),s.jsx("span",{className:"ch-sub",children:"Next scheduled sessions"})]}),s.jsx(t,{className:"btn btn-ghost btn-sm",to:"/interviews",children:"View all"})]}),s.jsx("div",{className:"card-body",children:s.jsx("div",{className:"list-tight",children:p.length===0?s.jsx("div",{className:"empty-state",style:{padding:30},children:"No upcoming interviews"}):p.map(e=>s.jsxs("div",{className:"list-row",style:{cursor:"pointer"},onClick:()=>j("/interviews"),children:[s.jsx(m,{name:e.candidate,initials:e.candInitials,color:e.color}),s.jsxs("div",{className:"lr-main",children:[s.jsx("div",{className:"lr-title",children:e.candidate}),s.jsxs("div",{className:"lr-sub",children:[e.type," · ",e.jobTitle]})]}),s.jsxs("div",{className:"lr-right",children:[s.jsx("div",{className:"fw-600 text-sm",children:P(e.when)}),s.jsx("div",{className:"lr-sub",children:e.when.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})})]})]},e.id))})})]}),s.jsxs("div",{className:"card",children:[s.jsx("div",{className:"card-head",children:s.jsxs("div",{children:[s.jsx("h3",{children:"Source Analytics"}),s.jsx("span",{className:"ch-sub",children:"Where candidates come from"})]})}),s.jsx("div",{className:"card-body",children:s.jsx("div",{className:"chart-wrap",children:s.jsx(x,{type:"bar",data:w,height:240})})})]})]}),s.jsxs("div",{className:"grid g-3 mt-18",children:[s.jsxs("div",{className:"card",children:[s.jsxs("div",{className:"card-head",children:[s.jsx("div",{children:s.jsx("h3",{children:"Recent Applications"})}),s.jsx(t,{className:"btn btn-ghost btn-sm",to:"/candidates",children:"View all"})]}),s.jsx("div",{className:"card-body",children:s.jsx("div",{className:"list-tight",children:A.map(e=>s.jsxs("div",{className:"list-row",style:{cursor:"pointer"},onClick:()=>j("/candidates",{state:{openCandidate:e.id}}),children:[s.jsx(m,{name:e.name,initials:e.initials,color:e.color}),s.jsxs("div",{className:"lr-main",children:[s.jsx("div",{className:"lr-title",children:e.name}),s.jsx("div",{className:"lr-sub",children:e.jobTitle})]}),s.jsx("div",{className:"lr-right",children:s.jsx(R,{score:e.aiScore})})]},e.id))})})]}),s.jsxs("div",{className:"card",children:[s.jsx("div",{className:"card-head",children:s.jsx("div",{children:s.jsx("h3",{children:"Recruiter Performance"})})}),s.jsx("div",{className:"card-body",children:s.jsx("div",{className:"list-tight",children:C.map(e=>s.jsxs("div",{className:"list-row",children:[s.jsx(m,{name:e.name,initials:e.initials,color:e.color}),s.jsxs("div",{className:"lr-main",children:[s.jsx("div",{className:"lr-title",children:e.name}),s.jsxs("div",{className:"lr-sub",children:[e.openReqs," open reqs · ",e.avgTimeToHire,"d avg"]})]}),s.jsxs("div",{className:"lr-right",children:[s.jsx("div",{className:"fw-600",children:e.hires}),s.jsx("div",{className:"lr-sub",children:"hires"})]})]},e.id))})})]}),s.jsxs("div",{className:"card",children:[s.jsx("div",{className:"card-head",children:s.jsx("div",{children:s.jsx("h3",{children:"Recent Activity"})})}),s.jsx("div",{className:"card-body",style:{maxHeight:360,overflowY:"auto"},children:s.jsx("div",{className:"list-tight",children:g.slice(0,8).map((e,l)=>s.jsxs("div",{className:"list-row",children:[s.jsx("span",{className:`kpi-icn ${e.color}`,style:{width:36,height:36,borderRadius:9},children:s.jsx(h,{name:e.icon})}),s.jsxs("div",{className:"lr-main",children:[s.jsx("div",{className:"lr-sub",style:{color:"var(--text-2)",fontSize:13},children:e.parts.map((o,H)=>typeof o=="string"?o:s.jsx("b",{children:o.b},H))}),s.jsx("div",{className:"lr-sub",children:I(e.time)})]})]},`${e.candidateId}-${l}`))})})]})]})]})}export{q as default};
//# sourceMappingURL=Dashboard-1SEoZ3VH.js.map