1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2434],{62514:function(e,n,r){"use strict";r(67294);var t=r(68527),i=(r(87456),r(71470)),s=r(45376),o=r(85893);n.Z=function(e){var n=e.children;return(0,o.jsxs)(t.xu,{minHeight:"100%",bg:"bodyBg",children:[(0,o.jsx)(i.Z,{title:"Profile Settings"}),(0,o.jsx)(s.Z,{bg:"white",children:n})]})}},19782:function(e,n,r){"use strict";r.d(n,{Z:function(){return U}});var t=r(59499),i=r(67294),s=r(97375),o=r(37496),u=r(68527),a=r(15193),l=r(84304),c=r(45376),d=r(14416),h=r(97763),f=r(4612),g=r(87536),v=r(2559),x=r(29024),m=r(33244),j=r(85893);function p(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function b(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?p(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var O={variant:"filled",fontSize:"sm",focusBorderColor:"#da2267",bg:"white",rounded:"md",mb:"1rem"},y=function(e){var n=e.isDisabled,r=void 0!==n&&n,t=e.close,s=void 0===t?function(){}:t,o=e.emailSignatureData,l=e.setSignatureData,c=void 0===l?function(){}:l,p=(0,d.v9)((function(e){var n;return null===e||void 0===e||null===(n=e.user)||void 0===n?void 0:n.id})),y=(0,g.cI)({mode:"all"}),w=y.watch,P=y.control,S=y.reset,k=y.setValue,E=y.trigger,_=y.handleSubmit,C=y.register,Z=y.formState.errors,D=(0,m.bK)({url:"/other/email_signature",method:"POST"}),z=(0,m.bK)({url:"/other/email_signature",method:"PUT"}),T=(0,i.useCallback)((function(e){S({name:null===e||void 0===e?void 0:e.name,signature:null===e||void 0===e?void 0:e.signature})}),[o,S]),L=function(){c({}),S({name:"",signature:""}),s()};return(0,i.useEffect)((function(){"undefined"!==typeof o.id&&T(o)}),[o]),(0,i.useEffect)((function(){(D.response||z.response)&&L()}),[D.response,z.response]),(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)(u.xu,{w:"100%",as:"form",onSubmit:_((function(e){null!==o&&void 0!==o&&o.id?z.execute({slug:null===o||void 0===o?void 0:o.id,data:e}):D.execute({data:b(b({},e),{},{accountId:p,createdBy:p})})})),children:[(0,j.jsxs)(a.hE,{w:"100%",children:[(0,j.jsx)(a.zx,{ml:"auto",type:"submit",children:null!==o&&void 0!==o&&o.id?"Modify":"Save"}),(0,j.jsx)(a.zx,{onClick:L,variant:"primary",children:"Close"})]}),(0,j.jsxs)(u.xu,{w:["100%","100%","45%","45%"],children:[(0,j.jsx)(x.l,{label:"Title",isRequired:!0}),(0,j.jsx)(f.II,b(b({disabled:r,placeholder:"Primary Signature",errors:Z},C("name",{required:"Title is required.",minLength:{message:"Title should have at least 2 characters.",value:2},maxLength:{message:"Title can have a maximum of 60 characters.",value:60}})),{},{isRequired:!0},O)),(0,j.jsx)(h.Z,{name:"name",errors:Z}),(0,j.jsx)(x.l,{label:"Signature",isRequired:!0}),(0,j.jsx)(v.LD,{placeholder:"Regards, John Doe",name:"signature",watch:w,control:P,register:C,setValue:k,trigger:E,rules:{required:"Signature is required.",minLength:{value:3,message:"The signature has to be at least 10 characters."}},errors:Z})]})]})})},w=r(50029),P=r(87794),S=r.n(P),k=r(87611),E=r(88767);function _(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function C(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?_(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var Z=function(){var e=(0,w.Z)(S().mark((function e(n){var r;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k.Z.get("/other/email_signature",n);case 2:return r=e.sent,e.abrupt("return",null===r||void 0===r?void 0:r.data);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),D=r(51649),z=r(53990),T=r(5434),L=r(14607),I={open:!1,data:{}},U=function(){var e,n,r=(0,i.useState)(null),h=r[0],f=r[1],g=(0,i.useState)({}),v=g[0],x=g[1],p=(0,i.useState)(I),b=p[0],O=p[1],w=(0,s.qY)(),P=w.isOpen,S=w.onToggle,k=(0,d.v9)((function(e){var n;return null===e||void 0===e||null===(n=e.user)||void 0===n?void 0:n.id})),_=(0,m.bK)({url:"/other/email_signature",method:"DELETE"}),U=(0,m.bK)({url:"/other/email_signature",method:"PUT"}),q=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,E.useQuery)(["email-signature",n],(function(){return Z(C({params:n},r))}),C({select:function(e){return null===e||void 0===e?void 0:e.content}},e))}({enabled:!!k},(e={"filter[accountId]":k},(0,t.Z)(e,"sort[createdAt]",-1),(0,t.Z)(e,"page[limit]",100),(0,t.Z)(e,"page[number]",1),e)),A=q.data,K=q.refetch;q.isLoading||_.isLoading||U.isLoading;return(0,i.useEffect)((function(){(_.response||U.response)&&(K(),O(I))}),[_.response,U.response]),(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(L.Z,{heading:"Are you sure you want to delete this signature?",subheading:"You cannot undo this.",isOpen:b.open,onClose:function(){return O(I)},onConfirm:function(){var e;_.execute({slug:null===b||void 0===b||null===(e=b.data)||void 0===e?void 0:e.id})},isLoading:_.isLoading}),(0,j.jsxs)(c.Z,{bg:"bodyBg",children:[(0,j.jsxs)(o.UO,{in:!P,animateOpacity:!0,children:[(0,j.jsx)(u.kC,{children:(0,j.jsx)(a.zx,{ml:"auto",onClick:S,children:"Add Signature"})}),(0,j.jsx)(u.kC,{children:(0,j.jsx)(u.MI,{columns:4,spacing:4,w:"100%",p:"1rem",children:null===A||void 0===A||null===(n=A.data)||void 0===n?void 0:n.map((function(e,n){return(0,j.jsxs)(u.xu,{p:"2",rounded:"md",bg:"white",h:"fit-content",boxShadow:"0px 0px 20px 0px ".concat(1===(null===e||void 0===e?void 0:e.status)?"var(--chakra-colors-green-500)":"var(--chakra-colors-gray)"),transition:"all 0.4s",children:[(0,j.jsxs)(u.Ug,{justify:"space-between",children:[(0,j.jsx)(u.X6,{size:"xs",children:null===e||void 0===e?void 0:e.name}),(0,j.jsxs)(u.Ug,{border:"1px solid var(--chakra-colors-blue-100)",p:"0.3rem",rounded:"full",children:[(0,j.jsx)(u.Ct,{h:"fit-content",rounded:"full",colorScheme:1===(null===e||void 0===e?void 0:e.status)?"green":"blue",children:1===(null===e||void 0===e?void 0:e.status)?"ACTIVE":"INACTIVE"}),(0,j.jsx)(l.r,{size:"sm",id:"status",onChange:function(n){U.execute({slug:null===e||void 0===e?void 0:e.id,data:{status:n.target.checked?1:0}})},isChecked:1===(null===e||void 0===e?void 0:e.status)})]}),(0,j.jsxs)(a.hE,{size:"xs",children:[(0,j.jsx)(a.hU,{size:"xs",variant:"ghost",bg:"blue.500",rounded:"full",icon:(0,j.jsx)(T.U$P,{size:"0.8rem",color:"white"}),onClick:function(){x(e),S()}}),(0,j.jsx)(a.hU,{size:"xs",variant:"ghost",bg:"red.500",rounded:"full",icon:(0,j.jsx)(z._51,{size:"0.8rem",color:"white"}),onClick:function(){O({open:!0,data:e})}})]})]}),(0,j.jsx)(o.UO,{startingHeight:"10rem",in:e.id===h,children:(0,j.jsx)(u.xu,{p:"1rem",fontSize:"0.75rem",dangerouslySetInnerHTML:{__html:null===e||void 0===e?void 0:e.signature}})}),(0,j.jsx)(a.zx,{size:"md",w:"100%",variant:"ghost",onClick:function(){return f(e.id===h?null:e.id)},mt:"1rem",children:e.id===h?(0,j.jsx)(D.Vmf,{}):(0,j.jsx)(D.OId,{})})]},e.id)}))})})]}),(0,j.jsx)(o.UO,{in:P,animateOpacity:!0,children:(0,j.jsx)(y,{close:function(){S(),K()},emailSignatureData:v,setSignatureData:x})})]})]})}},74210:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return d}});r(67294);var t=r(46376),i=r(60946),s=r(62514),o=r(341),u=r(19782),a=r(85893),l=function(){return(0,a.jsx)(s.Z,{children:(0,a.jsxs)(i.mQ,{isLazy:!0,children:[(0,a.jsxs)(i.td,{children:[(0,a.jsx)(i.OK,{children:"Profile"}),(0,a.jsx)(i.OK,{children:"Email Signature"})]}),(0,a.jsxs)(i.nP,{children:[(0,a.jsx)(i.x4,{children:(0,a.jsx)(o.ZP,{})}),(0,a.jsx)(i.x4,{children:(0,a.jsx)(u.Z,{})})]})]})})},c=r(7951),d=function(){return(0,a.jsx)(t.Z,{withAuth:!0,children:(0,a.jsx)(c.Z,{children:(0,a.jsx)(l,{})})})}},74662:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/recruiter/settings",function(){return r(74210)}])}},function(e){e.O(0,[4980,1228,2013,5937,5445,260,3874,4617,3662,955,9866,3609,994,6556,6158,2678,2876,3259,1664,9521,2688,7694,6376,9450,2064,9774,2888,179],(function(){return n=74662,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
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.