PageSourceSearch

https://www.elevolt.co.ke/_next/static/chunks/pages/hr/[tenant]/directory-d5df7fac2b13e08d.js

js elevolt.co.ke collected 2026-10-04 21:47:04 UTC 29,451 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c1123fcb-86fa-45b4-a506-04131bfccf19",e._sentryDebugIdIdentifier="sentry-dbid-c1123fcb-86fa-45b4-a506-04131bfccf19")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9942],{65981:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/hr/[tenant]/directory",function(){return s(68641)}])},68641:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return $}});var l=s(52322),r=s(71896),a=s(19317),n=s(79417),i=s(1973),o=s(47023),c=s(65232),d=s(77590),m=s(47477),u=s(43493),x=s(90269),p=s(23825),h=s(75588),f=s(75457),g=s(76467),v=s(84475),y=s(59417),b=s(99603),j=s(5632),N=s.n(j),w=s(13980),C=s.n(w),S=s(2784),Z=s(87686),k=s(59820),I=s(60418),T=s(62202),q=s(82036);let F=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(q.JW,"tenant/").concat((0,m.d_)(),"/").concat(e)},R=e=>["employee-import","status",e],z=()=>(0,Z.D)({mutationFn:async()=>{let e=new Blob([(await I.Z.get(F("employees/import-template"),{headers:{...(0,v.g0)({realm:"hr"})},responseType:"blob"})).data]),t=URL.createObjectURL(e),s=document.createElement("a");s.href=t,s.download="employee-import-template.csv",document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(t)},onError:e=>{var t,s,l,r;let a=(null==e?void 0:null===(s=e.response)||void 0===s?void 0:null===(t=s.data)||void 0===t?void 0:t.message)||(null==e?void 0:null===(r=e.response)||void 0===r?void 0:null===(l=r.data)||void 0===l?void 0:l.error);T.default.error(a||"Failed to download template. Please try again.")}}),D=()=>(0,Z.D)({mutationFn:async e=>{let{file:t}=e,s=new FormData;return s.append("file",t),(await I.Z.post(F("employees/import"),s,{headers:{...(0,v.g0)({realm:"hr"}),"Content-Type":"multipart/form-data"}})).data}}),P=function(e){let{enabled:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,k.a)({queryKey:R(e),queryFn:async()=>(await I.Z.get(F("employees/import/".concat(e)),{headers:{...(0,v.g0)({realm:"hr"})}})).data,enabled:!!(t&&e)&&(0,m.Xu)(),refetchInterval:e=>{var t,s;let l=null===(s=e.state.data)||void 0===s?void 0:null===(t=s.data)||void 0===t?void 0:t.status;return("pending"===l||"processing"===l)&&3e3},refetchOnWindowFocus:!1,staleTime:0,retry:2,meta:{expected404:!0}})};var _=s(97203),L=s(79413),E=s(88510),A=s(14010);let G=[".csv",".txt"],O=[{id:"upload",label:"Upload"},{id:"processing",label:"Processing"},{id:"results",label:"Results"}],B={upload:0,processing:1,results:2},U=e=>e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(1)," KB"):"".concat((e/1048576).toFixed(1)," MB"),M=e=>{if(!e)return"Please select a file to upload.";let t=e.name.substring(e.name.lastIndexOf(".")).toLowerCase();return G.includes(t)?e.size>5242880?"File is too large. Maximum size is 5MB.":null:"Invalid file type. Please upload a .csv or .txt file."},W=e=>{var t,s;let l=null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data,r=(null==l?void 0:l.message)||(null==l?void 0:l.error);return 422===(null==e?void 0:null===(s=e.response)||void 0===s?void 0:s.status)?r||"Invalid file. Please upload a valid CSV.":r||"Failed to upload file. Please try again."},V=e=>{let{onUploadSuccess:t,uploadError:s,setUploadError:r}=e,a=(0,S.useRef)(null),[n,i]=(0,S.useState)(!1),[c,d]=(0,S.useState)(null),{mutateAsync:m,isPending:u}=z(),{mutateAsync:x,isPending:p}=D(),h=(0,S.useCallback)(e=>{let t=M(e);if(t){r(t),d(null);return}r(null),d(e)},[r]),f=(0,S.useCallback)(async()=>{if(c){r(null);try{let e=await x({file:c}),s=null==e?void 0:e.eiid;if(!s){r("Something went wrong. Please try again.");return}t(s,c.name)}catch(e){r(W(e))}}},[c,x,t,r]),v=(0,S.useCallback)(()=>{d(null),r(null),a.current&&(a.current.value="")},[r]),j=(0,S.useCallback)(e=>{e.preventDefault(),i(!0)},[]),N=(0,S.useCallback)(e=>{e.preventDefault(),i(!1)},[]),w=(0,S.useCallback)(e=>{e.preventDefault(),i(!1),h(e.dataTransfer.files[0])},[h]),C=(0,S.useCallback)(e=>{let t=e.target.files[0];t&&h(t)},[h]);return(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)("div",{className:"flex items-center justify-between",children:(0,l.jsx)(g.Z,{color:"text-gray-600",variant:"body",children:"Download the template, fill in employee details, then upload the completed file."})}),(0,l.jsx)("div",{children:(0,l.jsxs)(o.Z,{design:"plain",disabled:u,onClick:()=>m(),children:[(0,l.jsx)(b.G,{className:"mr-2 text-sm",icon:u?y.LM3:y.q7m,size:"1x",spin:u}),u?"Downloading...":"Download CSV Template"]})}),!c&&(0,l.jsxs)("div",{className:"border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors ".concat(n?"border-blue-400 bg-blue-50":"border-gray-300 hover:border-gray-400"),onClick:()=>{var e;return null===(e=a.current)||void 0===e?void 0:e.click()},onDragLeave:N,onDragOver:j,onDrop:w,children:[(0,l.jsx)(b.G,{className:"text-gray-400 mb-3",icon:y.Vmj,size:"2x"}),(0,l.jsx)(g.Z,{className:"block",color:"text-gray-600",variant:"body",children:"Drag and drop your CSV file here, or click to browse"}),(0,l.jsx)(g.Z,{className:"block mt-1",color:"text-gray-400",variant:"caption",children:"Accepted formats: .csv, .txt (max 5MB)"}),(0,l.jsx)("input",{accept:".csv,.txt",className:"hidden",onChange:C,ref:a,type:"file"})]}),!!c&&(0,l.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(b.G,{className:"text-blue-500",icon:y.gMD,size:"lg"}),(0,l.jsxs)("div",{children:[(0,l.jsx)(g.Z,{color:"text-gray-700",variant:"body",children:c.name}),(0,l.jsx)(g.Z,{color:"text-gray-400",variant:"caption",children:U(c.size)})]})]}),!p&&(0,l.jsx)("button",{className:"text-gray-400 hover:text-gray-600 p-1",onClick:v,type:"button",children:(0,l.jsx)(b.G,{icon:y.NBC})})]}),(0,l.jsx)("div",{className:"flex justify-end mt-4",children:(0,l.jsx)(o.Z,{design:"primary",disabled:p,isLoading:p,onClick:f,children:"Upload and Import"})})]}),!!s&&(0,l.jsx)(L.Z,{borderSide:"all",message:s,variant:"warning"})]})};V.propTypes={onUploadSuccess:C().func.isRequired,uploadError:C().string,
1setUploadError:C().func.isRequired};let J=e=>{let{status:t,fileName:s}=e,[r,a]=(0,S.useState)(0);return(0,S.useEffect)(()=>{let e=setInterval(()=>{a(e=>e+1)},1e3);return()=>clearInterval(e)},[]),(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-4",children:[(0,l.jsx)(b.G,{className:"text-blue-500",icon:y.LM3,size:"3x",spin:!0}),(0,l.jsx)(g.Z,{color:"text-gray-700",variant:"body",children:"processing"===t?"Importing employees...":"Queued for import..."}),!!s&&(0,l.jsx)(g.Z,{color:"text-gray-400",variant:"caption",children:s}),(0,l.jsxs)(g.Z,{color:"text-gray-400",variant:"caption",children:["Elapsed: ",r,"s"]}),(0,l.jsx)(g.Z,{color:"text-gray-400",variant:"caption",children:"You can close this dialog. The import will continue in the background."})]})};J.propTypes={status:C().string,fileName:C().string};let K=e=>{var t,s,r,a;let{data:n,onClose:i}=e,c=null!==(s=null==n?void 0:n.imported_count)&&void 0!==s?s:0,d=null!==(r=null==n?void 0:n.failed_count)&&void 0!==r?r:0,m=null!==(a=null==n?void 0:n.errors)&&void 0!==a?a:[],u="failed"===(null==n?void 0:n.status);return(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[!!u&&(0,l.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-red-50 rounded-lg",children:[(0,l.jsx)(b.G,{className:"text-red-500",icon:y.eHv,size:"lg"}),(0,l.jsx)(g.Z,{color:"text-red-700",variant:"body",children:(null===(t=m[0])||void 0===t?void 0:t.message)||"Import failed. Please try again."})]}),!u&&(0,l.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-green-50 rounded-lg",children:[(0,l.jsx)(b.G,{className:"text-green-500",icon:y.f8k,size:"lg"}),(0,l.jsxs)(g.Z,{color:"text-gray-700",variant:"body",children:[c," employee",1!==c?"s":""," imported successfully",!!d&&(0,l.jsxs)("span",{className:"text-red-600",children:[", ",d," row",1!==d?"s":""," failed"]})]})]}),!!(m.length>0&&!u)&&(0,l.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,l.jsxs)("table",{className:"w-full text-sm",children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{className:"bg-gray-50",children:[(0,l.jsx)("th",{className:"text-left px-4 py-2 font-medium text-gray-700",children:"Row"}),(0,l.jsx)("th",{className:"text-left px-4 py-2 font-medium text-gray-700",children:"Field"}),(0,l.jsx)("th",{className:"text-left px-4 py-2 font-medium text-gray-700",children:"Message"})]})}),(0,l.jsx)("tbody",{children:m.map((e,t)=>{var s,r,a;return(0,l.jsxs)("tr",{className:"border-t",children:[(0,l.jsx)("td",{className:"px-4 py-2 text-gray-600",children:null!==(s=e.row)&&void 0!==s?s:"-"}),(0,l.jsx)("td",{className:"px-4 py-2 text-gray-600",children:null!==(r=e.field)&&void 0!==r?r:"-"}),(0,l.jsx)("td",{className:"px-4 py-2 text-gray-600",children:null!==(a=e.message)&&void 0!==a?a:"-"})]},"import-err-".concat(t))})})]})}),(0,l.jsx)("div",{className:"flex justify-end pt-2",children:(0,l.jsx)(o.Z,{design:"secondary",onClick:i,children:"Done"})})]})};K.propTypes={data:C().object,onClose:C().func.isRequired};let H=e=>{var t;let{show:s,onClose:r}=e,a=(0,A.NL)(),[n,i]=(0,S.useState)("upload"),[o,c]=(0,S.useState)(null),[d,m]=(0,S.useState)(null),[u,x]=(0,S.useState)(null),{data:p}=P(o,{enabled:"processing"===n}),h=null==p?void 0:null===(t=p.data)||void 0===t?void 0:t.status,{currentStepIndex:f,completedSteps:g}=(0,S.useMemo)(()=>{var e;let t=null!==(e=B[n])&&void 0!==e?e:0,s=new Set;return t>=1&&s.add(0),t>=2&&s.add(1),{currentStepIndex:t,completedSteps:s}},[n]);(0,S.useEffect)(()=>{("completed"===h||"failed"===h)&&(i("results"),a.invalidateQueries({queryKey:["tenantUsers"]}))},[h,a]);let v=(0,S.useCallback)((e,t)=>{c(e),m(t),i("processing")},[]),y=(0,S.useCallback)(()=>{i("upload"),c(null),m(null),x(null),r()},[r]);return(0,l.jsx)(_.B,{fullWidth:!0,maxWidth:"800px",onClose:y,show:s,title:{upload:"Import Employees",processing:"Processing Import",results:"Import Results"}[n],children:(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(E.Z,{completedSteps:g,currentStep:f,showStepNumbers:!1,steps:O}),"upload"===n&&(0,l.jsx)(V,{onUploadSuccess:v,setUploadError:x,uploadError:u}),"processing"===n&&(0,l.jsx)(J,{fileName:d,status:h}),"results"===n&&(0,l.jsx)(K,{data:null==p?void 0:p.data,onClose:y})]})})};H.propTypes={show:C().bool.isRequired,onClose:C().func.isRequired};var Q=s(79337);let X=e=>{var t,s,n,i,o;let{user:c,tenantName:x,authUser:p}=e,h=[{text:"View Profile",icon:(0,l.jsx)(b.G,{className:"mr-2",icon:y.Mdf,size:"1x"}),show:()=>c.profiles&&c.profiles.length>0,action:e=>N().push("/hr/".concat(x,"/directory/view/").concat(e.uid))},{text:"New Job Profile",icon:(0,l.jsx)(b.G,{className:"mr-2",icon:y.r8p,size:"1x"}),action:e=>N().push("/hr/".concat(x,"/profiles/new?user=").concat(e.uid)),show:()=>{var e;return(0,u.userIsAdmin)(p)&&!(null===(e=c.profiles)||void 0===e?void 0:e.length)}},{text:"Edit Job Profile",icon:(0,l.jsx)(b.G,{className:"mr-2",icon:y.Xcf,size:"1x"}),action:e=>N().push("/hr/".concat(x,"/directory/view/").concat(e.uid)),show:e=>e.profiles&&e.profiles.length>0&&(0,u.userIsAdmin)(p)},{text:"Performance & Goals",icon:(0,l.jsx)(b.G,{className:"mr-2",icon:y.Wpq,size:"1x"}),action:e=>N().push("/hr/".concat(x,"/directory/view/").concat(e.uid,"/performance")),show:e=>e.profiles&&e.profiles.length>0&&(0,u.userIsAdmin)(p)},{text:"Documents",icon:(0,l.jsx)(b.G,{className:"mr-2",icon:y.cC_,size:"1x"}),action:e=>N().push("/hr/".concat(x,"/directory/view/").concat(e.uid,"/documents")),show:()=>!0},{text:"Activity",icon:(0,l.jsx)(b.G,{className:"mr-2",icon:y.SZw,size:"1x"}),action:e=>N().push("/hr/".concat(x,"/directory/view/").concat(e.uid,"/activity")),show:()=>!0}];return(0,l.jsxs)("tr",{className:"border-t hover:bg-gray-50",children:[(0,l.jsx)("td",{children:(0,l.jsxs)("a",{className:"pl-3 py-1 flex items-center appearance-none text-gray-900 hover:text-blue-dark",href:"/hr/".concat(x,"/directory/view/").concat(c.uid),children:[(0,l.jsx)(r.Z,{user:c}),(0,l.jsxs)("span",{className:"ml-4 flex flex-col",children:[(0,l.jsx)(g.Z,{as:"span",className:"leading-none",color:"text-inherit",variant:"bodySmall",weight:"font-medium",children:(0,d.ei)(c.name)}),!!c.email&&(0,l.jsx)(g.Z,{as:"span",className:"leading-tight",color:"text-inherit",variant:"bodySmall",children:c.email})]})]})}),(0,l.jsx)("td",{children:(0,l.jsx)(g.Z,{as:"p",className:"capitalize",color:"text-gray-500",variant:"bodySmall",children:(0,d.ei)(c.id)})}),(0,l.jsx)("td",{children:(0,l.jsx)(g.Z,{as:"p",className:"capitalize",color:"text-gray-500",variant:"bodySmall",children:(0,d.ei)(!!(null===(t=c.profiles)||void 0===t?void 0:t.length)&&c.profiles[0].title)})}),(0,l.jsx)("td",{children:(0,l.jsx)(g.Z,{as:"p",className:"capitalize",color:"text-gray-500",variant:"bodySmall",children:(0,d.ei)(!!(null===(s=c.profiles)||void 0===s?void 0:s.length)&&c.profiles[0].position)})}),(0,l.jsx)("td",{children:(0,l.jsx)(g.Z,{as:"p",color:"text-gray-500",variant:"bodySmall",children:(0,d.ei)(!!(null===(n=c.profiles)||void 0===n?void 0:n.length)&&c.profiles[0].employee_type)})}),(0,l.jsx)("td",{children:(0,l.jsx)(g.Z,{as:"p",color:"text-gray-500",variant:"bodySmall",children:(0,d.ei)(!!(null===(i=c.profiles)||void 0===i?void 0:i.length)&&c.profiles[0].manager&&c.profiles[0].manager.name)})}),(0,l.jsx)("td",{children:(0,l.jsx)(g.Z,{as:"p",className:"mt-1",color:"text-gray-500",variant:"bodySmall",children:(0,d.ei)((0,m.p6)(!!(null===(o=c.profiles)||void 0===o?void 0:o.length)&&c.profiles[0].hire_date,"dd LLL yyyy"))})}),(0,l.jsx)("td",{children:(0,l.jsx)("div",{className:"w-full flex items-center",children:(0,l.jsx)(a.C,{menuItems:h,subject:c})})})]})};X.propTypes={user:C().object,authUser:C().object,isLastItem:C().bool,tenantName:C().string};let Y=e=>{var t;let{user:s,tenantName:r}=e,[a,m]=(0,S.useState)(null),[g,v]=(0,S.useState)(!1),{data:j,isLoading:N,isFetching:w,isError:C}=(0,x.dD)({tenantId:null==s?void 0:null===(t=s.tenant)||void 0===t?void 0:t.t
1id,search:a}),Z=[{href:"/hr/".concat(r,"/directory"),name:"Directory",nodeType:"Link"}],k=null==j?void 0:j.filter(e=>{var t,s;return!a||(null===(t=e.name)||void 0===t?void 0:t.toLowerCase().includes(a.toLowerCase()))||(null===(s=e.email)||void 0===s?void 0:s.includes(a.toLowerCase()))});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Q.Z,{title:"".concat((0,d.kC)((0,d.parseUnderScore)(r))," - Directory")}),(0,l.jsxs)("main",{className:"container flex flex-col gap-4 mx-auto px-4 md:px-8 lg:px-12 pb-6",children:[(0,l.jsx)(h.Z,{actions:!!(0,u.userIsAdmin)(s)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.Z,{design:"secondary",onClick:()=>v(!0),children:[(0,l.jsx)(b.G,{className:"mr-2 text-sm",icon:y.Vmj,size:"1x"}),"Import"]}),(0,l.jsx)(n.q,{actionBtn:e=>(0,l.jsxs)(o.Z,{design:"secondary",...e,children:[(0,l.jsx)(b.G,{className:"mr-2 text-sm",icon:y.FKd,size:"1x"}),"Invite"]})})]}),breadcrumbs:Z,description:"Find anyone on the team and open their profile, documents or employment details",tenantName:r,title:"Team Directory"}),(0,l.jsxs)(c.ZP,{children:[(0,l.jsx)(c.Ol,{children:(0,l.jsx)("div",{className:"w-full flex flex-row justify-between items-center",children:(0,l.jsx)(f.Z,{onChange:e=>{m(e.target.value)},onClear:()=>m(null),placeholder:"Search by name or email...",value:a||""})})}),(0,l.jsxs)(c.eW,{padding:0,children:[!!(N||C||!(null==k?void 0:k.length))&&(0,l.jsx)(i.Z,{action:(0,u.userCan)(s,"manage-users")?(0,l.jsx)(n.q,{}):null,description:"Get started by inviting a team member.",design:"wrapped",isError:C,isLoading:N,message:"No team members found"}),!!(!N&&!C&&(null==k?void 0:k.length))&&(0,l.jsx)(p.Z,{className:"w-full flex flex-col pb-2",isFetching:w,children:(0,l.jsxs)("table",{className:"auto min-w-[600px]",children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{className:"bg-gray-50",children:[(0,l.jsx)("th",{className:"text-sm py-3 font-medium text-gray-700 text-left whitespace-nowrap px-4",children:"Name"}),(0,l.jsx)("th",{className:"text-sm py-3 font-medium text-gray-700 px-4 whitespace-nowrap text-left",children:"No."}),(0,l.jsx)("th",{className:"text-sm py-3 font-medium text-gray-700 px-4 whitespace-nowrap text-left",children:"Title"}),(0,l.jsx)("th",{className:"text-sm py-3 font-medium text-gray-700 px-4 whitespace-nowrap text-left",children:"Position"}),(0,l.jsx)("th",{className:"text-sm py-3 font-medium text-gray-700 px-4 whitespace-nowrap text-left",children:"Type"}),(0,l.jsx)("th",{className:"text-sm py-3 font-medium text-gray-700 px-4 whitespace-nowrap text-left",children:"Manager"}),(0,l.jsx)("th",{className:"text-sm py-3 font-medium text-gray-700 px-4 whitespace-nowrap text-left",children:"Hire Date"})]})}),(0,l.jsx)("tbody",{children:null==k?void 0:k.map((e,t)=>(0,l.jsx)(X,{authUser:s,isLastItem:t+1===j.length,tenantName:r,user:e},"tt-user-card-".concat(e.uid)))})]})})]})]})]}),(0,l.jsx)(H,{onClose:()=>v(!1),show:g})]})};Y.getInitialProps=async e=>{let t=e.query.tenant;return!t&&e.res?{notFound:!0}:{tenantName:t}},Y.propTypes={token:C().string,user:C().object,tenantName:C().string};var $=(0,v.withAuthSync)(Y)},16049:function(e,t,s){"use strict";var l=s(52322),r=s(2369),a=s(92942),n=s(13980),i=s.n(n),o=s(2784),c=s(47023);let d=e=>{let{home:t,links:s}=e,n=e=>"undefined"===e?"unknown":e;return(0,l.jsx)("nav",{"aria-label":"Breadcrumb",children:(0,l.jsxs)("ul",{className:"flex w-full flex-row items-center breadcrumbs overflow-x-auto py-2 md:py-4",children:[(0,l.jsx)("li",{className:"flex items-center",children:(0,l.jsx)(c.Z,{asDefaultATag:!0,className:"!px-0 !py-0",design:"plain",href:t,children:(0,l.jsx)(a.FontAwesomeIcon,{className:"text-lg text-gray-400 hover:text-blue-dark",icon:r.J9Y,size:"sm"})})}),s.map((e,t)=>{let i=t+1===s.length,d="Link"===e.nodeType||"a"===e.nodeType;return(0,l.jsxs)(o.Fragment,{children:[(0,l.jsx)("li",{"aria-hidden":"true",className:"text-sm flex items-center",children:(0,l.jsx)(a.FontAwesomeIcon,{className:"text-xs text-gray-400 px-2",icon:r._tD,size:"xs"})}),(0,l.jsxs)("li",{className:"font-medium text-sm flex items-center",children:[!!d&&(0,l.jsx)("a",{"aria-current":i?"page":void 0,className:"text-sm whitespace-nowrap ".concat(i?"text-blue-dark":""),href:e.href,children:n(e.name)}
1),"Button"===e.nodeType&&(0,l.jsx)(c.Z,{asDefaultATag:!0,className:"text-blue-dark",design:"plain",href:e.href,children:n(e.name)}),!!(!d&&"Button"!==e.nodeType)&&(0,l.jsx)("span",{className:"text-sm whitespace-nowrap",children:n(e.name)})]})]},"".concat(e.href,"-").concat(t))})]})})};d.propTypes={home:i().string.isRequired,links:i().arrayOf(i().shape({nodeType:i().oneOf(["Link","a","Button"]).isRequired,href:i().string.isRequired,name:i().string.isRequired}))},d.defaultProps={links:[]},t.Z=d},79417:function(e,t,s){"use strict";s.d(t,{q:function(){return v}});var l=s(52322),r=s(2369),a=s(92942),n=s(88883),i=s(13980),o=s.n(i),c=s(2784),d=s(63955),m=s(62202),u=s(5120),x=s(90269),p=s(47023),h=s(95254),f=s(97203);let g=u.Ryn({name:u.Z_8().min(1,"Name is required"),email:u.Z_8().min(1,"Email is required").email({message:"Invalid email address"})}),v=e=>{let{actionBtn:t,onDone:s}=e,[i,o]=(0,c.useState)(!1),u=(0,x.ir)(),{control:v,handleSubmit:y,formState:{errors:b},reset:j}=(0,d.cI)({resolver:(0,n.F)(g),defaultValues:{name:"",email:""}}),N=()=>{o(!0)},w=()=>{o(!1),j()},C=async e=>{try{let t=await u.mutateAsync({user:e});(null==t?void 0:t.message)?m.default.success(t.message):m.default.success("Team member invited successfully"),w(),null==s||s()}catch(s){var t,l;let e=(null==s?void 0:null===(l=s.response)||void 0===l?void 0:null===(t=l.data)||void 0===t?void 0:t.message)||"Failed to invite team member. Please try again.";m.default.error(e)}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(f.B,{centerY:!0,fullWidth:!0,maxWidth:"500px",onClose:w,show:i,title:"Invite a team member",children:(0,l.jsx)("div",{className:"w-full flex flex-col",children:(0,l.jsxs)("form",{onSubmit:y(C),children:[(0,l.jsx)("div",{className:"w-full mb-4 mt-2",children:(0,l.jsx)(d.Qr,{control:v,name:"name",render:e=>{var t;let{field:s}=e;return(0,l.jsx)(h.o,{...s,error:null===(t=b.name)||void 0===t?void 0:t.message,label:"Full Name*",placeholder:"Full Name",type:"text"})}})}),(0,l.jsx)("div",{className:"w-full mb-4",children:(0,l.jsx)(d.Qr,{control:v,name:"email",render:e=>{var t;let{field:s}=e;return(0,l.jsx)(h.o,{...s,description:"Their official work email address",error:null===(t=b.email)||void 0===t?void 0:t.message,label:"Email Address*",placeholder:"Email Address",type:"email"})}})}),(0,l.jsx)("div",{className:"flex items-center justify-end",children:(0,l.jsx)(p.Z,{disabled:u.isPending,type:"submit",children:u.isPending?"Sending...":"Send Invitation"})})]})})}),!!t&&(t?(0,l.jsx)(t,{onClick:N}):null),!t&&(0,l.jsx)(p.Z,{beforeIcon:(0,l.jsx)(a.FontAwesomeIcon,{className:"mr-2",icon:r.FKd}),design:"secondary",onClick:N,children:"Invite User"})]})};v.propTypes={actionBtn:o().func,onDone:o().func}},23825:function(e,t,s){"use strict";var l=s(52322),r=s(13980),a=s.n(r),n=s(2784),i=s(42369);let o=e=>{let{isFetching:t=!1,delayMs:s=200,size:r="sm",message:a,className:o="",children:c}
1=e,[d,m]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(!t){m(!1);return}let e=setTimeout(()=>m(!0),s);return()=>clearTimeout(e)},[t,s]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{"aria-busy":!!t,className:"relative ".concat(o),children:[!!d&&(0,l.jsx)(i.J,{className:"pointer-events-none",fixed:!1,size:r,zIndexClass:"z-10"}),c]}),!!d&&(0,l.jsx)("span",{className:"sr-only",role:"status",children:a||"Updating"})]})};o.propTypes={isFetching:a().bool,delayMs:a().number,size:a().string,message:a().string,className:a().string,children:a().node.isRequired},t.Z=o},75588:function(e,t,s){"use strict";var l=s(52322),r=s(13980),a=s.n(r);s(2784);var n=s(16049),i=s(76467);let o=e=>{let{tenantName:t,breadcrumbs:s,title:r,description:a,actions:o,titleProps:c,fullWidth:d=!0}=e;return(0,l.jsxs)("div",{className:d?"w-full":"container mx-auto px-4 md:px-8 lg:px-12",children:[(0,l.jsx)("div",{children:(0,l.jsx)(n.Z,{home:"/hr/".concat(t,"/"),links:s})}),(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 py-4",children:[(0,l.jsxs)("div",{...c,children:[(0,l.jsx)(i.Z,{variant:"heading1",children:r}),!!a&&(0,l.jsx)(i.Z,{className:"mt-1",variant:"bodySmall",children:a})]}),!!o&&(0,l.jsx)("div",{className:"flex items-center gap-3",children:o})]})]})};o.propTypes={tenantName:a().string.isRequired,breadcrumbs:a().arrayOf(a().shape({href:a().string.isRequired,name:a().string.isRequired,nodeType:a().string})).isRequired,title:a().node.isRequired,description:a().string,actions:a().node,titleProps:a().object,fullWidth:a().bool},t.Z=o},75457:function(e,t,s){"use strict";var l=s(52322),r=s(2369),a=s(92942),n=s(12524),i=s.n(n),o=s(13980),c=s.n(o);s(2784);var d=s(95254);let m=e=>{let{value:t,onChange:s,onClear:n,placeholder:o="Search...",className:c,name:m="search"}=e;return(0,l.jsxs)("div",{className:i()("relative w-full md:w-72",c),children:[(0,l.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,l.jsx)(a.FontAwesomeIcon,{className:"text-gray-400 text-sm",icon:r.wn1})}
1),(0,l.jsx)(d.o,{inputClassName:"pl-10 pr-10",name:m,onChange:s,placeholder:o,type:"text",value:t}),!!(t&&n)&&(0,l.jsx)("button",{"aria-label":"Clear search",className:"absolute inset-y-0 right-0 pr-3 flex items-center text-gray-400 hover:text-gray-600",onClick:n,type:"button",children:(0,l.jsx)(a.FontAwesomeIcon,{className:"text-sm",icon:r.NBC})})]})};m.propTypes={value:c().string.isRequired,onChange:c().func.isRequired,onClear:c().func,placeholder:c().string,className:c().string,name:c().string},t.Z=m},79413:function(e,t,s){"use strict";s.d(t,{Z:function(){return v}});var l=s(52322),r=s(2369),a=s(92942),n=s(12524),i=s.n(n),o=s(13980),c=s.n(o),d=s(2784),m=s(47023),u=s(76467);let x={premium:{icon:r.nmd,gradient:"from-yellow-50 to-orange-50",borderColor:"border-yellow-200",iconColor:"text-yellow-600",textColor:"text-gray-700"},subscription:{icon:r.byT,gradient:"from-blue-50 to-indigo-50",borderColor:"border-blue-200",iconColor:"text-blue-600",textColor:"text-gray-700"},"limit-exceeded":{icon:r.eHv,gradient:"from-red-50 to-orange-50",borderColor:"border-red-200",iconColor:"text-red-600",textColor:"text-gray-700"},"limit-warning":{icon:r.sqG,gradient:"from-yellow-50 to-amber-50",borderColor:"border-yellow-200",iconColor:"text-yellow-600",textColor:"text-gray-700"},info:{icon:r.sqG,gradient:"from-blue-50 to-blue-100",borderColor:"border-blue-200",iconColor:"text-blue-600",textColor:"text-gray-700"},warning:{icon:r.eHv,gradient:"from-amber-50 to-orange-50",borderColor:"border-amber-200",iconColor:"text-amber-600",textColor:"text-gray-700"},success:{icon:r.f8k,gradient:"from-green-50 to-emerald-50",borderColor:"border-green-200",iconColor:"text-green-600",textColor:"text-gray-700"}},p=e=>x[e]||x.info,h={static:"",top:"absolute top-0 left-0 right-0 z-10",bottom:"absolute bottom-0 left-0 right-0 z-10"},f={bottom:"border-b",top:"border-t",left:"border-l-4",right:"border-r-4",all:"border",none:""},g=e=>{let{variant:t="info",message:s,icon:n,action:o,dismissible:c=!1,onDismiss:x,position:g="static",borderSide:v="all",className:y=""}=e,[b,j]=(0,d.useState)(!1);if(b)return null;let N=p(t),w=n||N.icon,C=v in f?f[v]:f.bottom,S=i()("bg-gradient-to-r",N.gradient,C,N.borderColor,"px-3 py-2 sm:px-4 sm:py-3",h[g]||"","rounded-lg",y);return(0,l.jsx)("div",{className:S,role:"alert",children:(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2 sm:gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5 sm:gap-2 sm:flex-1 min-w-0",children:[!!w&&(0,l.jsx)(a.FontAwesomeIcon,{className:i()(N.iconColor,"flex-shrink-0 text-sm sm:text-base"),icon:w}),(0,l.jsx)(u.Z,{as:"span",color:N.textColor,responsive:!1,variant:"bodySmall",children:s})]}),!!(o||c)&&(0,l.jsxs)("div",{className:"flex items-center gap-1.5 sm:gap-2 sm:flex-shrink-0",children:[!!o&&(0,l.jsx)(m.Z,{className:"whitespace-nowrap",design:o.design||"primary",onClick:o.onClick,size:o.size||"xs",children:o.label}),!!c&&(0,l.jsx)("button",{"aria-label":"Dismiss",className:i()(N.iconColor,"opacity-50 hover:opacity-100 transition-opacity p-1"),onClick:()=>{j(!0),null==x||x()},type:"button",children:(0,l.jsx)(a.FontAwesomeIcon,{icon:r.NBC,size:"sm"})})]})]})})};g.propTypes={variant:c().oneOf(["premium","subscription","limit-exceeded","limit-warning","info","warning","success"]),message:c().node.isRequired,icon:c().object,action:c().shape({label:c().string.isRequired,onClick:c().func.isRequired,design:c().string,size:c().string}),dismissible:c().bool,onDismiss:c().func,position:c().oneOf(["static","top","bottom"]),borderSide:c().oneOf(["bottom","top","left","right","all","none"]),className:c().string};var v=g},88510:function(e,t,s){"use strict";var l=s(52322),r=s(12524),a=s.n(r),n=s(13980),i=s.n(n);s(2784);let o=(e,t,s)=>s.has(e)?"completed":e===t?"active":"inactive",c=e=>e instanceof Set?e:new Set(e),d=(e,t)=>(e+1)/t*100,m=e=>{let{steps:t,currentStep:s,completedSteps:r=new Set,compact:n=!1,showStepNumbers:i=!0,showProgressText:m=!1,ariaLabel:u="Form progress",className:x}=e,p=c(r),h=d(s,t.length);return n?(0,l.jsxs)("div",{className:a()("flex items-center gap-2",x),children:[(0,l.jsx)("div",{className:"flex-1 bg-gray-200 rounded-full h-2 overflow-hidden",children:(0,l.jsx)("div",{"aria-label":"".concat(s+1," of ").concat(t.length," steps completed"),"aria-valuemax":t.length,"aria-valuemin":1,"aria-valuenow":s+1,className:"h-full bg-blue-500 rounded-full transition-all duration-300",role:"progressbar",style:{width:"".concat(h,"%")}})}),!!m&&(0,l.jsxs)("span",{className:"text-sm text-gray-600 font-medium whitespace-nowrap",children:[s+1,"/",t.length]})]}):(0,l.jsxs)("nav",{"aria-label":u,className:a()("w-full",x),role:"navigation",children:[(0,l.jsx)("div",{className:"grid gap-4",style:{gridTemplateColumns:"repeat(".concat(t.length,", 1fr)")},children:t.map((e,t)=>{let r=o(t,s,p),n="active"===r,c="completed"===r;return(0,l.jsxs)("div",{"aria-current":t===s?"step":void 0,className:"flex flex-col",children:[(0,l.jsx)("div",{className:a()("w-full rounded-sm transition-all duration-300",{"h-2 bg-blue-300":n,"h-2 bg-blue-600":c,"h-2 bg-gray-200":!n&&!c})}),(0,l.jsx)("div",{className:"mt-1",children:(0,l.jsxs)("span",{className:a()("text-sm font-medium text-left flex flex-col",{"text-gray-500":n,"text-blue-700":c,"text-gray-400":!n&&!c}),children:[!!i&&(0,l.jsxs)("span",{className:"hidden sm:inline text-sm",children:["Step ",t+1]}),e.label]})})]},e.id)})}),!!m&&(0,l.jsxs)("div",{className:"mt-4 text-left text-xs text-gray-500 font-medium",children:["Step ",s+1," of ",t.length]})]})};m.propTypes={steps:i().arrayOf(i().shape({id:i().string.isRequired,label:i().string.isRequired})).isRequired,currentStep:i().number.isRequired,completedSteps:i().oneOfType([i().instanceOf(Set),i().arrayOf(i().number)]),compact:i().bool,showStepNumbers:i().bool,showProgressText:i().bool,className:i().string,ariaLabel:i().string},t.Z=m}},function(e){e.O(0,[4976,5351,9603,6383,1985,974,2888,9774,179],function(){return e(e.s=65981)}),_N_E=e.O()}]);

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.