1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9668],{98571:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/workflows",function(){return n(35314)}])},66339:function(e,t,n){"use strict";n.d(t,{H:function(){return a},f:function(){return i}});var o=n(94076),r=n(61378),i=function(){return o.Z.get(r.k8)},a=function(e){return o.Z.patch("".concat(r.k8,"/default/").concat(e))}},95430:function(e,t,n){"use strict";var o=n(85893),r=n(95854),i=n(9879),a=n(87710),s=n(70547),c=n(68409),l=n(60145),u=n(85695),d=n(48847),f=n(19635),v={color:"$neutral400",mr:"$2"},h={color:"$neutral800",display:"inline-block"},p=(0,r.zo)(l.Z,v),x=(0,r.zo)(u.Z,v);t.Z=function(e){var t=e.author,n=void 0===t?"":t,r=e.date,l=void 0===r?"":r,u=e.option,v=e.title,w=void 0===v?"":v,m=e.onCardClick,Z=e.id,j=void 0===Z?"":Z,k=e.type,C=void 0===k?"":k,y=e.subAction,b=void 0===y?"":y,g=(0,d.fh)(l),S=f.Zy.includes(C);return(0,o.jsxs)(i.Z,{spacing:"32",variant:"outlined",maxWidth:"sm",css:{minWidth:"416px",maxWidth:"600px",flexBasis:"0",cursor:S?"pointer":""},onClick:function(){S&&m(j,C,b)},children:[(0,o.jsxs)(a.Z,{justifyContent:"space-between",children:[w,u]}),n&&l&&(0,o.jsxs)(a.Z,{justifyContent:"space-between",children:[(0,o.jsxs)(c.ZC,{children:[(0,o.jsx)(p,{})," ",(0,o.jsx)(s.Z,{variant:"text-sm",sx:h,children:n})]}),(0,o.jsxs)(c.ZC,{children:[(0,o.jsx)(x,{})," ",(0,o.jsx)(s.Z,{variant:"text-sm",sx:h,children:g})]})]})]})}},67466:function(e,t,n){"use strict";var o=n(14251),r=n(85893),i=n(95854),a=n(87710),s=n(70547),c=n(68409),l=(0,i.zo)(c.ZC,{px:"$4",py:"$2",borderColor:"$primary400","&:hover":{backgroundColor:"$neutral100",cursor:"pointer"},variants:{isActive:{true:{borderBottom:"3px solid $primary400",backgroundColor:"transparent !important",cursor:"default !important"},false:{borderBottom:"3px solid transparent"}}}});t.Z=function(e){var t=e.tabs,n=void 0===t?[]:t,i=e.onClick,u=e.activeTab,d=void 0===u?"":u,f=e.css,v=void 0===f?{}:f;return(0,r.jsx)(c.ZC,{css:(0,o.Z)({borderBottom:"1px solid $neutral200"},v),children:(0,r.jsx)(a.Z,{children:n.map((function(e){var t=e.id===d;return(0,r.jsx)(l,{isActive:t,onClick:function(){return i(e)},children:(0,r.jsx)(s.Z,{variant:"text",sx:{color:t?"$neutral900":"$neutral700"},children:e.displayName})},e.id)}))})})}},84753:function(e,t,n){"use strict";var o=n(85893),r=n(87710),i=n(70547),a=n(35758),s=n(28621),c=n(13065),l=n(67294),u=n(26204);function d(e){var t=e.title,n=void 0===t?[]:t,l=e.btnText,d=void 0===l?"Add":l,f=e.onAddClick,v=e.isBtnLoading,h=void 0!==v&&v,p=e.secondaryButton,x=e.tertiaryButton,w=e.buttonId,m=void 0===w?"add-new-button":w,Z=e.isHRW,j=void 0!==Z&&Z;return(0,o.jsxs)(r.Z,{justifyContent:"space-between",alignItems:"flex-end",children:[j?(0,o.jsx)(i.Z,{variant:"h4",children:n}):(0,o.jsxs)(a.Z,{title:n,children:[(0,o.jsx)(s.Z,{href:"/",children:"POFU"}),(0,o.jsx)(s.Z,{href:"#",children:n})]}),f&&(0,o.jsxs)(r.Z,{css:{gap:"$2"},children:[x,p,(0,o.jsx)(c.Z,{sx:{margin:"$2 0"},variant:"primary",endIcon:(0,o.jsx)(u.Z,{}),onClick:f,isLoading:h,size:"large",id:m,children:d})]})]})}t.Z=(0,l.memo)(d)},62899:function(e,t,n){"use strict";n.d(t,{T:function(){return s},z:function(){return i}});var o=n(95854),r=n(6271),i=(0,o.zo)(r.Div,{width:"100%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}),a=n(68409),s=(0,o.zo)(a.ZC,{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:"$3"})},13728:function(e,t,n){"use strict";var o=n(14251),r=n(85893),i=n(70547),a=n(95430);t.Z=function(e){var t=e.workflow,n=void 0===t?{}:t,s=e.page,c=void 0!==s&&s,l=e.option,u=e.authors,d=void 0===u?{}:u,f=n.name,v=void 0===f?"":f,h=n.createdAt,p=void 0===h?"":h,x=n.createdBy,w={};if("workflow-templates"!==c){var m=d[x],Z=m.firstName,j=m.lastName;w={author:"".concat(Z||""," ").concat(j||""),date:p}}return(0,r.jsx)(a.Z,(0,o.Z)({title:(0,r.jsx)(i.Z,{variant:"text-l",isBold:!0,children:v}),option:l},w))}},1854:function(e,t,n){"use strict";var o=n(85893),r=n(60887),i=n(56017),a=n(68409),s=n(44644),c=n(87710),l=n(95854),u=n(39415);t.Z=function(e){var t=e.title,n=void 0===t?"Add an Action":t,s=e.type,l=void 0===s?"":s,u=e.index,v=void 0===u?0:u,h=e.isDisabled,p=e.onRemove,x=e.id,w=e.isDefault,m=void 0!==w&&w,Z=e.isEmpty,j=void 0!==Z&&Z,k=(0,r.Zj)({id:v,disabled:h||"Add an Action"!==n}),C=k.setNodeRef,y=k.isOver,b=k.active;return(0,o.jsx)(a.ZC,{ref:C,css:{p:"$3",my:"$1",bgColor:"$baseWhite",borderRadius:"$1",width:"70%",mx:"auto",boxShadow:"$1",opacity:b&&!y?.4:1,"&:hover .remove-action":{opacity:1}},children:(0,o.jsxs)(c.Z,{justifyContent:"space-between",children:[(0,o.jsx)(i.Z,{type:l,name:n,isEmpty:j}),!m&&(0,o.jsx)(f,{className:"remove-action","aria-label":"delete",icon:(0,o.jsx)(d,{}),onClick:function(){return p(x)}})]})})};var d=(0,l.zo)(s.Z,{color:"$critical700"}),f=(0,l.zo)(u.Z,{opacity:0,transition:"opacity 0.2s","&:hover":{opacity:1}})},32317:function(e,t,n){"use strict";var o=n(67573),r=n(14251),i=n(52875),a=n(85893),s=n(95854),c=n(87710),l=n(76047),u=n(22187),d=n(67294),f=n(94076),v=n(61378),h=n(66339),p=n(71656),x=n(81520),w=n(56270),m=n(30187),Z=n(72806),j=n(49681),k=n(68409),C=n(13728),y=n(24990),b=n(18542),g=[{label:"Set as default"},{label:"Delete Workflow"}],S=[{label:"Delete Workflow"}],$=(0,s.zo)(c.Z,{flexWrap:"wrap",gap:"$3"});
1t.Z=function(e){var t=e.setCurrentTab,n=e.openNewWorkflow,s=e.openDetailView,c=(0,d.useState)([]),N=c[0],A=c[1],z=(0,d.useState)({}),W=z[0],E=z[1],D=(0,d.useState)({}),B=D[0],T=D[1],I=(0,d.useState)(!0),_=I[0],O=I[1],R=(0,d.useState)(""),V=R[0],H=R[1],P=(0,d.useState)({}),F=P[0],M=P[1],q=(0,y.V6)(),L=q.showSuccessToast,X=q.showErrorToast,K=(0,d.useState)({search:"",one:""}),U=K[0],G=K[1];(0,d.useEffect)((function(){f.Z.get(v.k8).then((function(e){var t=e.data.data;Object.keys(t.actions).reduce((function(e,n){return e[n]=t.actions[n],e[n].id=n,e}),{});T(t.workflows),A(t.orderedWorkflowIds),E(t.orderedWorkflowIds),M(t.createdBy),O(!1)}))}),[]),(0,d.useEffect)((function(){if(!_){var e=N||[],t=U.one,n=void 0===t?{}:t;n&&(e=e.filter((function(e){var t;return B[e].createdBy===(null===(t=U.one)||void 0===t?void 0:t.value)}))),E(e),n||E(N||{})}}),[U]);var J=function(e,t){"Delete Workflow"===e.label&&H(t),"Set as default"===e.label&&function(e){(0,h.H)(e).then((function(t){(0,b.AK)(t,L);var n=N.reduce((function(t,n){var a=B[n];return a.isDefault=e===n,(0,i.Z)((0,r.Z)({},t),(0,o.Z)({},n,a))}),{});T(n)})).catch((function(e){return(0,b.bo)(e,X)}))}(t)};return _?(0,a.jsx)(j.Z,{}):N&&N.length?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.Z,{workflows:B,workflowAuthors:F,searchBoxName:"Search Workflows",filterOneName:"Filter by Owner",filters:U,setFilters:G}),(0,a.jsx)($,{css:{marginTop:"$4"},children:N.filter((function(e){var t,n;return null===(t=B[e])||void 0===t?void 0:t.name.toLowerCase().includes(null===U||void 0===U||null===(n=U.search)||void 0===n?void 0:n.toLowerCase())})).filter((function(e){return null===W||void 0===W?void 0:W.includes(e)})).map((function(e,t){var n=B[e],o=n.isDefault,r=o?S:g;return(0,a.jsx)(k.ZC,{css:{cursor:"pointer"},onClick:function(){return s(e,n)},children:(0,a.jsx)(C.Z,{workflow:n,authors:F,page:"my-workflows",option:(0,a.jsxs)(k.ZC,{children:[o&&(0,a.jsx)(l.Z,{content:"This acts as a default workflow for candidates who have new roles in the bulk CSV upload.",children:(0,a.jsx)(u.Z,{label:"Default",color:"success"})}),(0,a.jsx)(x.Z,{onSelect:function(t){return J(t,e)},options:r,type:"ICON",children:(0,a.jsx)(Z.Oq,{css:{fontSize:"$3",mr:"0",color:"$neutral700"}})})]})})},e)}))}),(0,a.jsx)(w.Z,{isOpen:V,onClose:function(){return H("")},onAction:function(){f.Z.delete("".concat(v.k8,"/").concat(V)).then((function(e){(0,b.AK)(e,L),A((function(e){return e.filter((function(e){return e!==V}))})),T((function(e){var t=(0,r.Z)({},e);return delete t[V],t}))})).catch((function(e){return(0,b.bo)(e,X)}))},name:"Workflow",description:"Are you sure want to delete this Workflow?"})]}):(0,a.jsx)(m.n,{text:"Workflow",onCreate:n,onTemplate:function(){t("workflow-templates")}})}},35314:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return O},default:function(){return R}});var o=n(85893),r=n(11163),i=n(67294),a=n(94076),s=n(61378),c=n(67466),l=n(56141),u=n(84753),d=n(32317),f=n(95854),v=n(70547),h=n(76047),p=n(87710),x=n(13136),w=n(13065),m=n(68298),Z=n(68409),j=n(62899),k=n(1854),C=n(77011),y=n(53905),b=(0,f.zo)(Z.ZC,{flex:1}),g=(0,f.zo)(Z.ZC,{width:"100%",bgColor:"$neutral50",padding:"60px $4",margin:"0 auto"}),S=(0,f.zo)(C.Z,{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",color:"$neutral400",textAlign:"center"});var $=function(e){var t=e.workflowId,n=e.isOpen,r=e.onClose,s=e.onSubmit,c=(0,i.useState)(!0),l=c[0],u=c[1],d=(0,i.useState)([]),f=d[0],Z=d[1];(0,i.useEffect)((function(){if(Z([]),t&&n){u(!0);var e="workflow/templates/".concat(t);a.Z.get(e).then((function(e){var t=e.data.data.actions,n=void 0===t?{}:t;Z(Object.keys(n).map((function(e){return n[e]}))),u(!1)}))}}),[n]);var C=(0,o.jsxs)(v.Z,{variant:"text-l",isBold:!0,children:["Workflow Preview",(0,o.jsxs)(h.Z,{placement:"right",content:(0,o.jsxs)(o.Fragment,{children:["Actions which are not present in the ",(0,o.jsx)("br",{}),"company actions will be duplicated."]}),children:[" ",(0,o.jsx)(y.Z,{})]})]});return(0,o.jsxs)(m.Dialog,{isOpen:n,onClose:r,children:[(0,o.jsx)(m.DialogHeader,{title:C,shouldShowCloseButton:!1}),(0,o.jsx)(m.DialogBody,{children:(0,o.jsx)(p.Z,{alignItems:"flex-start",children:(0,o.jsx)(g,{children:l?(0,o.jsx)(j.z,{children:(0,o.jsx)(x.Z,{})}):(0,o.jsxs)(b,{children:[(0,o.jsx)(k.Z,{title:"Start",type:"start",isDisabled:!0,index:-1,isDefault:!0}),(0,o.jsx)(S,{}),f.map((function(e,t){var n=e||{},r=n.type,a=void 0===r?"":r,s=n.name,c=void 0===s?"":s,l=n.id,u=void 0===l?"":l,d=n.createdAt,f=void 0===d?"":d;return(0,o.jsxs)(i.Fragment,{children:[(0,o.jsx)(k.Z,{title:c,type:a,index:t,id:u,isDefault:!0}),(0,o.jsx)(S,{})]},"".concat(a,"-").concat(u||f))})),(0,o.jsx)(k.Z,{title:"End",type:"end",isDisabled:!0,index:-1,isDefault:!0})]})})})}),(0,o.jsxs)(m.DialogActions,{children:[(0,o.jsx)(w.Z,{variant:"secondary",onClick:r,children:"Close"}),(0,o.jsx)(w.Z,{variant:"primary",onClick:s,children:"Add to Workflows"})]})]})},N=n(72806),A=n(49681),z=n(13728),W=n(50537),E=(0,f.zo)(p.Z,{flexWrap:"wrap",gap:"$3"});
1var D=function(e){e.openDetailView;var t=e.onAddClick,n=(0,i.useState)({}),r=(n[0],n[1]),c=(0,i.useState)([]),l=c[0],u=c[1],d=(0,i.useState)({}),f=d[0],v=d[1],h=(0,i.useState)(!0),p=h[0],x=h[1],w=(0,i.useState)(!1),m=w[0],j=w[1],k=(0,i.useState)(null),C=k[0],y=k[1],b=(0,i.useState)(null),g=b[0],S=b[1];return(0,i.useEffect)((function(){a.Z.get(s.IX).then((function(e){var t=e.data.data;r(t.actions),v(t.workflows),u(t.orderedWorkflowIds),x(!1)}))}),[]),p?(0,o.jsx)(A.Z,{}):(0,o.jsxs)(E,{children:[(0,o.jsx)($,{isOpen:m,workflowId:C,onClose:function(){j(!1),y(null)},onSubmit:function(){return t(C,g)}}),l.map((function(e){var n=f[e];return(0,o.jsx)(Z.ZC,{css:{cursor:"pointer"},onClick:function(){return y(t=e),S(f[t]),void j(!0);var t},children:(0,o.jsx)(z.Z,{workflow:n,page:"workflow-templates",option:(0,o.jsx)(W.Z,{variant:"text","aria-label":"Action card menu",onClick:function(){return t(e,n)},children:(0,o.jsx)(N.pO,{css:{fontSize:"$3",mr:"0",color:"$neutral700"}})})},e)},e)}))]})},B=n(24990),T=n(18542),I=n(27920),_=n(57304);var O=!0,R=function(){var e=(0,r.useRouter)().push,t=(0,i.useState)(I.oq),n=t[0],f=t[1],v=(0,i.useState)(!1),h=v[0],p=v[1],x=(0,B.V6)(),w=x.showSuccessToast,m=x.showErrorToast,Z=(0,_.XU)(),j=Z.resumeTour,k=Z.goNextPage;(0,i.useEffect)((function(){setTimeout((function(){j()}),600)}),[]);var C=function(){p(!0),e("/workflows/new"),k()},y=function(t,n){var o="/workflows/".concat(t);e({pathname:o,query:n},o)},b=function(e,t){a.Z.post("".concat(s.IX,"/").concat(e)).then((function(e){var t,n=e.data.data,o=void 0===n?{}:n;(0,T.AK)(e,w);var r=null===o||void 0===o||null===(t=o.workflow)||void 0===t?void 0:t.id;r&&y(r,o.workflow)})).catch((function(e){return(0,T.bo)(e,m)}))};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.Z,{}),(0,o.jsx)(u.Z,{title:"Workflows",btnText:"New Workflow",isBtnLoading:h,onAddClick:C,buttonId:"add-new-workflow-button"}),(0,o.jsx)(c.Z,{css:{my:"$4"},tabs:I.Pq,activeTab:n,onClick:function(e){var t=e.id;return f(t)}}),"my-workflows"===n?(0,o.jsx)(d.Z,{setCurrentTab:f,openNewWorkflow:C,openDetailView:y}):(0,o.jsx)(D,{openDetailView:b,onAddClick:b})]})}},27920:function(e,t,n){"use strict";n.d(t,{Ip:function(){return a},Pq:function(){return o},_x:function(){return r},oq:function(){return i}});var o=[{displayName:"Company Workflows",id:"my-workflows"},{displayName:"Workflow templates",id:"workflow-templates"}],r=[{displayName:"Company Workflows",id:"my-workflows"}],i="my-workflows",a=function(e,t){return t.map((function(t){return{label:e[t].name,value:t}}))}},68742:function(e,t,n){"use strict";var o=n(87462),r=n(94334),i=n(45987),a=n(67294);n(77250);t.Z=function(e){var t=e.className,n=void 0===t?"":t,s=(0,i.Z)(e,["className"]);return s=(0,r.Z)({},s,{className:"".concat(n," ui-svg-icon")}),a.createElement("svg",(0,o.Z)({viewBox:"0 0 36 36",width:"1em",height:"1em"},s,{fill:"currentColor"}),a.createElement("path",{d:"M18 0c2.2 0 4 1.8 4 4s-1.8 4-4 4-4-1.8-4-4 1.8-4 4-4zm0 14c2.2 0 4 1.8 4 4s-1.8 4-4 4-4-1.8-4-4 1.8-4 4-4zm0 14c2.2 0 4 1.8 4 4s-1.8 4-4 4-4-1.8-4-4 1.8-4 4-4z",fillRule:"evenodd",clipRule:"evenodd"}))}},15697:function(e,t,n){"use strict";var o=n(87462),r=n(94334),i=n(45987),a=n(67294);n(77250);t.Z=function(e){var t=e.className,n=void 0===t?"":t,s=(0,i.Z)(e,["className"]);return s=(0,r.Z)({},s,{className:"".concat(n," ui-svg-icon")}),a.createElement("svg",(0,o.Z)({width:"1em",height:"1em",viewBox:"0 0 22 18"},s,{fill:"currentColor"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.2 1.5c-.333 0-.643.125-.865.333a1.03 1.03 0 00-.335.75v12.834c0 .271.114.542.335.75.222.208.532.333.865.333h15.6c.333 0 .643-.125.865-.333a1.03 1.03 0 00.335-.75V5.333a1.03 1.03 0 00-.335-.75 1.265 1.265 0 00-.865-.333h-8.775a.75.75 0 01-.612-.316L7.687 1.5H3.2zM1.307.74A2.775 2.775 0 013.2 0h4.875a.75.75 0 01.612.316l1.726 2.434H18.8a2.77 2.77 0 011.893.74 2.53 2.53 0 01.807 1.843v10.084c0 .7-.296 1.362-.807 1.842-.51.48-1.191.741-1.893.741H3.2a2.765 2.765 0 01-1.893-.74A2.53 2.53 0 01.5 15.416V2.583c0-.7.296-1.362.8
107-1.842z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 7.25a.75.75 0 01.75.75v6a.75.75 0 01-1.5 0V8a.75.75 0 01.75-.75z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.25 11a.75.75 0 01.75-.75h6a.75.75 0 010 1.5H8a.75.75 0 01-.75-.75z"}))}},89765:function(e,t,n){"use strict";var o=n(87462),r=n(94334),i=n(45987),a=n(67294);n(77250);t.Z=function(e){var t=e.className,n=void 0===t?"":t,s=(0,i.Z)(e,["className"]);return s=(0,r.Z)({},s,{className:"".concat(n," ui-svg-icon")}),a.createElement("svg",(0,o.Z)({viewBox:"0 0 24 24",width:"1em",height:"1em"},s,{fill:"currentColor"}),a.createElement("path",{d:"M12 23C5.9 23 1 18.1 1 12S5.9 1 12 1s11 4.9 11 11-4.9 11-11 11zm0-20c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9z"}),a.createElement("path",{d:"M16 15c-.2 0-.3 0-.4-.1l-4-2c-.4-.2-.6-.5-.6-.9V6c0-.6.4-1 1-1s1 .4 1 1v5.4l3.4 1.7c.5.2.7.8.4 1.3-.1.4-.4.6-.8.6z"}))}}},function(e){e.O(0,[6047,6737,342,5277,4493,3381,6271,6178,871,4667,1832,9774,2888,179],(function(){return t=98571,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.