PageSourceSearch

https://www.elevolt.co.ke/_next/static/chunks/461-ddaf62dcb50d04a5.js

js elevolt.co.ke collected 2026-10-04 21:45:32 UTC 9,720 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:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1f036e64-dc53-4bd3-9070-9e3a69803e7a",e._sentryDebugIdIdentifier="sentry-dbid-1f036e64-dc53-4bd3-9070-9e3a69803e7a")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[461],{57989:function(e,n,s){s.d(n,{W:function(){return d}});var l=s(52322),t=s(2369),a=s(92942),r=s(13980),i=s.n(r);s(2784);let d=e=>{let{title:n,description:s,button:r=null,flow:i="y",...d}=e;return(0,l.jsxs)("div",{...d,className:"w-full bg-red-100 border border-red-300 p-3 rounded flex flex-col md:flex-row md:justify-between items-center relative",children:[(0,l.jsxs)("div",{className:"flex justify-start flex-col",children:[(0,l.jsx)("span",{className:"absolute -top-2 -left-1",children:(0,l.jsx)(a.FontAwesomeIcon,{className:"text-red-600 text-lg",icon:t.RLE,size:"1x"})}),!!n&&(0,l.jsx)("h6",{className:"text-center md:text-left font-semibold text-gray-800 md:leading-none mb-2",children:n}),(0,l.jsx)("p",{className:"text-center md:text-left font-normal leading-tight text-gray-800",children:s}),!!("y"===i&&r)&&(0,l.jsx)("div",{className:"mt-3",children:r})]}),!!("x"===i&&r)&&(0,l.jsx)("div",{className:"mt-3 md:ml-2 md:mt-auto",children:r})]})};d.propTypes={title:i().string,description:i().string,button:i().element,flow:i().string},n.Z=d},79417:function(e,n,s){s.d(n,{q:function(){return g}});var l=s(52322),t=s(2369),a=s(92942),r=s(88883),i=s(13980),d=s.n(i),c=s(2784),o=s(63955),m=s(62202),u=s(5120),x=s(90269),f=s(47023),h=s(95254),p=s(97203);let j=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"})}),g=e=>{let{actionBtn:n,onDone:s}=e,[i,d]=(0,c.useState)(!1),u=(0,x.ir)(),{control:g,handleSubmit:b,formState:{errors:v},reset:y}=(0,o.cI)({resolver:(0,r.F)(j),defaultValues:{name:"",email:""}}),N=()=>{d(!0)},w=()=>{d(!1),y()},k=async e=>{try{let n=await u.mutateAsync({user:e});(null==n?void 0:n.message)?m.default.success(n.message):m.default.success("Team member invited successfully"),w(),null==s||s()}catch(s){var n,l;let e=(null==s?void 0:null===(l=s.response)||void 0===l?void 0:null===(n=l.data)||void 0===n?void 0:n.message)||"Failed to invite team member. Please try again.";m.default.error(e)}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(p.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:b(k),children:[(0,l.jsx)("div",{className:"w-full mb-4 mt-2",children:(0,l.jsx)(o.Qr,{control:g,name:"name",render:e=>{var n;let{field:s}=e;return(0,l.jsx)(h.o,{...s,error:null===(n=v.name)||void 0===n?void 0:n.message,label:"Full Name*",placeholder:"Full Name",type:"text"})}})}),(0,l.jsx)("div",{className:"w-full mb-4",children:(0,l.jsx)(o.Qr,{control:g,name:"email",render:e=>{var n;let{field:s}=e;return(0,l.jsx)(h.o,{...s,description:"Their official work email address",error:null===(n=v.email)||void 0===n?void 0:n.message,label:"Email Address*",placeholder:"Email Address",type:"email"})}})}),(0,l.jsx)("div",{className:"flex items-center justify-end",children:(0,l.jsx)(f.Z,{disabled:u.isPending,type:"submit",children:u.isPending?"Sending...":"Send Invitation"})})]})})}),!!n&&(n?(0,l.jsx)(n,{onClick:N}):null),!n&&(0,l.jsx)(f.Z,{beforeIcon:(0,l.jsx)(a.FontAwesomeIcon,{className:"mr-2",icon:t.FKd}),design:"secondary",onClick:N,children:"Invite User"})]})};g.propTypes={actionBtn:d().func,onDone:d().func}},22406:function(e,n,s){var l=s(52322),t=s(2369),a=s(92942),r=s(5632),i=s(13980),d=s.n(i),c=s(2784),o=s(43493),m=s(65232),u=s(79417);let{userCan:x,userIsAdmin:f,hasSubscription:h}=o,p="appearance-none flex justify-start items-center text-sm font-medium hover:text-blue-dark rounded-sm py-3 px-4 bg-blue-50 hover:bg-blue-100",j=()=>(0,l.jsx)(a.FontAwesomeIcon,{className:"ml-auto text-sm text-inherit",icon:t._tD,size:"1x"}),g=e=>{let{href:n,onClick:s,children:t,...a}=e,r=(0,l.jsxs)(l.Fragment,{children:[t,(0,l.jsx)(j,{})]});return n?(0,l.jsx)("a",{className:p,href:n,...a,children:r}):(0,l.jsx)("button",{className:p,onClick:s,type:"button",...a,children:r})};g.propTypes={children:d().node.isRequired,href:d().string,onClick:d().func};let b=e=>(0,l.jsx)(g,{...e,children:"Invite Team Member"});b.propTypes={onClick:d().func};let v=e=>h(e,"Pro Annual")||h(e,"30 day trial"),y=e=>!!e&&(f(e)||x(e,"manage-users"))&&v(e),N=e=>{var n;let{user:s,addons:t=[],customActions:a=[],showDefaultActions:i=!0,title:d="Quick Actions"}=e,o=(0,r.useRouter)(),h=x(s,"manage-job-posts"),p=y(s),j="/hr/[tenant]/profiles/view"===o.pathname,v="/hr/[tenant]/time-off"===o.pathname,N=null==s?void 0:null===(n=s.tenant)||void 0===n?void 0:n.name;return s||0!==a.length?(0,l.jsxs)(m.ZP,{children:[(0,l.jsx)(m.Ol,{children:(0,l.jsx)("h3",{className:"text-xl",children:d})}),(0,l.jsx)(m.eW,{children:(0,l.jsxs)("div",{className:"w-full flex flex-col justify-start rounded-xl gap-2",children:[null==a?void 0:a.map((e,n)=>c.isValidElement(e)?(0,l.jsx)(c.Fragment,{children:e},"custom-action-".concat(n)):(0,l.jsx)(e,{},"custom-action-".concat(n))),i&&s?(0,l.jsxs)(l.Fragment,{children:[h?(0,l.jsx)(g,{href:"/hr/[tenant]/hiring/post",children:"Post a Job"}):null,p?(0,l.jsx)(u.q,{actionBtn:b}):null,p?(0,l.jsx)(g,{href:"/hr/".concat(N,"/workflows/new"),children:"Create a Workflow"}):null,!j&&(0,l.jsx)(g,{href:"/hr/".concat(N,"/profile"),children:"Review Your Profile"}),!v&&!f(s)&&(0,l.jsx)(g,{href:"/hr/".concat(N,"/time-off"),children:"Request Time Off"}),v&&f(s)?(0,l.jsx)(g,{href:"/hr/".concat(N,"/settings?tab=timeoff_policies"),children:"TimeOff Settings"}):null]}):null,null==t?void 0:t.map((e,n)=>c.isValidElement(e)?(0,l.jsx)(c.Fragment,{children:e},"addon-".concat(n)):(0,l.jsx)(e,{},e.name||"addon-".concat(n)))]})})]}):null};N.propTypes={user:d().shape({tenant:d().shape({name:d().string})}),addons:d().array,customActions:d().array,showDefaultActions:d().bool,title:d().string},n.Z=N},7239:function(e,n,s){s.d(n,{m:function(){return f}});var l=s(52322);
1s(2784);var t=s(13980),a=s.n(t),r=s(92942),i=s(2369),d=s(36160),c=s.n(d),o=s(43493),m=s(47023),u=s(57989);let{userIsAdmin:x}=o,f=e=>{let{user:n,tenantName:s}=e;return(0,l.jsx)(l.Fragment,{children:n?(0,l.jsx)("div",{className:"w-full bg-white rounded p-2 md:p-4 flex flex-col shadow-sm",children:(0,l.jsxs)("div",{className:"w-full flex flex-row justify-start items-center",children:[(0,l.jsx)("div",{className:"flex justify-center items-center text-center flex-grow-0 mx-auto avatar avatar-lg bg-no-repeat bg-center ".concat(n.avatar?"bg-white":"bg-gray-200"),style:{backgroundImage:"url(".concat(n.avatar,")")},children:!n.avatar&&n.name?(0,l.jsx)("p",{children:n.name.substr(0,1)}):null}),(0,l.jsxs)("div",{className:"flex-grow ml-4",children:[(0,l.jsx)("p",{className:"leading-none text-sm",children:"Welcome back,"}),(0,l.jsx)("p",{className:"leading-none text-base my-1 font-semibold",children:n.name}),(0,l.jsxs)("p",{className:"leading-none text-sm font-medium",children:[!c()(n.profiles)&&(0,l.jsx)("span",{className:"leading-none text-sm font-medium mr-3",children:n.profiles[0].title}),x(n)&&(0,l.jsx)("span",{className:"px-2 py-[2px] rounded-xl bg-blue-100 text-blue leading-none text-[10px] font-medium",children:"ADMIN"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(m.Z,{className:"hidden md:inline-flex",design:"secondary",href:"/hr/".concat(s,"/profile"),children:"View Profile"}),(0,l.jsx)(m.Z,{className:"inline-flex md:hidden px-1",design:"plain",href:"/hr/".concat(s,"/profile"),children:(0,l.jsx)(r.FontAwesomeIcon,{className:"text-sm",icon:i.eFW})})]})]})}):null})},h=e=>{let{user:n}=e;if(!n)return;let s=(null==n?void 0:n.status)==="inactive"||(null==n?void 0:n.status)==="suspended",t=(null==n?void 0:n.status)==="inactive"?"This user account is currently inactive":"This user account is currently suspended";return(0,l.jsxs)(l.Fragment,{children:[!!s&&(0,l.jsx)("div",{className:"w-full mb-4",children:(0,l.jsx)(u.Z,{description:t})}),(0,l.jsx)("div",{className:"w-full bg-white px-4 py-4 rounded mb-4",children:(0,l.jsxs)("div",{className:"w-full flex justify-start items-center",children:[(0,l.jsx)("div",{className:"flex justify-center items-center text-center avatar bg-no-repeat bg-center bg-blue-50",style:{backgroundImage:"url(".concat(n.avatar,")")},children:!n.avatar&&n.name?(0,l.jsx)("p",{className:"font-semibold",children:n.name.substr(0,1)}):null}),(0,l.jsxs)("div",{className:"border-r border-gray-300 pr-4 ml-4",children:[(0,l.jsx)("h3",{className:"text-sm text-gray-500 font-semibold",children:"Name"}),(0,l.jsx)("p",{className:"text-sm text-gray-700 font-medium leading-none",children:n.name})]}),(0,l.jsxs)("div",{className:"border-r border-gray-300 pr-4 pl-4",children:[(0,l.jsxs)("h3",{className:"text-sm text-gray-500 font-semibold",children:[(0,l.jsx)(r.FontAwesomeIcon,{className:"hover:text-blue-dark mr-1",icon:i.mSY,size:"sm"}),"Email"]}),(0,l.jsx)("p",{className:"text-sm text-gray-700 font-medium leading-none",children:n.email?n.email:"unknown"})]}),(0,l.jsxs)("div",{className:"pr-4 pl-4",children:[(0,l.jsxs)("h3",{className:"text-sm text-gray-500 font-semibold",children:[(0,l.jsx)(r.FontAwesomeIcon,{className:"hover:text-blue-dark mr-1",icon:i.j1w,size:"sm"}),"Phone"]}),(0,l.jsx)("p",{className:"text-sm text-gray-700 font-medium leading-none",children:n.phone?n.phone:"unknown"})]})]})})]})};h.propTypes={user:a().shape({avatar:a().any,email:a().any,name:a().shape({substr:a().func}),phone:a().any})},n.Z=h}}]);

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.