PageSourceSearch

https://elevatestaffing.ai/static/js/8620.23f16a83.chunk.js

js elevatestaffing.ai collected 2026-10-05 13:38:01 UTC 30,859 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkrecruitment=self.webpackChunkrecruitment||[]).push([[8620],{83167:(e,t,a)=>{a.d(t,{d:()=>r});var s=a(89379),i=a(80045),n=a(9950),o=a(59222),l=a(44414);const d=["className"],r=n.forwardRef(((e,t)=>{let{className:a}=e,n=(0,i.A)(e,d);return(0,l.jsx)(o.bL,(0,s.A)((0,s.A)({className:"signatureContainer peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-[#7c3aed] data-[state=unchecked]:bg-[#d7dbe4] ".concat(a||"").trim()},n),{},{ref:t,children:(0,l.jsx)(o.zi,{className:"pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"})}))}));r.displayName=o.bL.displayName},78620:(e,t,a)=>{a.r(t),a.d(t,{default:()=>ce});var s=a(9950),i=a(8152),n=a(11722);const o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABTVJREFUaAXtWFtoXEUYnrRpsvvPyU3yogj1QkFBnyqCFWEfKpJk/kkU98kH6yVaKAVFCoUK3TcR1KIEbYjmzD9JKa74EMU+CNqSYqp4SbXRxhobHxQvRH1obUtLXDln95w9Z/dcZrMJ+LCBMLMz//f93//P/TDW+mtloJWBVgb+VxnoHbF7AfUBjvoMIF0EpMtc0DxIepwNHOtME5sZmrrPGqLDgLTsYAHpCpe0yFHZHUP6jjS8458L2s+RzgHSPyD1JY70FaB6ihUKmxLxmRH7Ji7oe45UivoHSUuZwSNbI0nyxayFaiIKF2wDqcfY9vEtURyuf9TfBu3DdbXs2ERh2XUD092A+nwYEBnIYr98sStI4mZN0rwBtpwYqWZ7c3ZvkIPl7IwzagYcC3VYh8jC6b0GYFcADOsDQecc1aumWM8OkCZCHEPqOa8vrQShdwexbp0LdSYN6PVbUs96BB0P6tu99gbL1ezQ5A6Px0I6ZYwX9IWH80tjsLs+1DUPyIWmxrDVaQlCjbk8uUI7F+rfBnh+9/z7ZQNgZxqtekCeuOiqYqP59WI5gOPtXNC1aJtIjhXPv19yob40JhD0qe84Zscy5Aom4rQhxkng575wrwLCLpgSANLTLm77+BaOatUUF2Xn+5fq+aj+6Da9y8NVy3wxy1GdiwZUhxGQlli+2OEBAemHNEx8v1rweFi+uJmjOhtv62lQy4yxNh8XrDiHRMpevJAZeSN0kFhSjaU79ZyHS0uo10P+B49sTfF/Fh6Yuj6IiayD1KMg6KRzDQBUF0DQJ1zQvqijPDs8tWOtAXTeb2+rE5ArtIOwR7lQs+WriONfzWXR3styhfY6+/VosJAONxpEF+pX1sP3unD07RzvAaSTpkGAoDlWKkXP47Uq6ttZ7AFJBwF1/HYq1Lx7jOfsTJ2ffNGypDZYD+qQs2Br8f3yrS6QUwcB6bOERHwNw3rPDfg+hPCVxbuUACxfwip7voVqKe5W2IH2bYA0yYX6hiP9xZFWygtTH+oWdHfIceVHxb/JRdLTcb7qP1/MAlIj4JK7dQ7bd0aJWUtbz0OTt6TsPp5wv7SQvmP5/Gbm7Dimma/Yvd0vZ0LX6bWIrsPImS6O+qOGtAjaz5zXljFIqKNRi899xQ3SkxzpmJNJ9xVWc8UAVFdB0E+WoBku6VGWO16/jhhrA9TvmeqxkOYYd558Nc5ifi/XLR7GGAh7N0f6OwbjD3lE/7L7TK0ZivKT1ux0B0kXnACSnPh9nSPq1pCvQmETCJNdJ4VfTr9Ue0CC1HeZ6jIMQL8ZEs8Y45JeNnWSbqdfqOMXajodRyWjAKpbVtkNoH7ChLwhG6keCQbRLextXFDqIyc9AKk/DhI38Pj2p59ZIOoXNvBa6LMNF3QiDesE4Bw2sc5A6D3BADjau5Lsm+nLCno45EvY+1L4/mAc1YdJRtkBdW+Q1JI0k2TfTB9IeifoKyvoniQ+QHqXZVDfDKhX4gxrhxWQfo6zbbbdfSwFInDWXiynoD/9tekaCn2Uo/oNBF0M/gf43CpHuhpLmjAVDTFXgv768sWeoBanzgX9Ckgf+OKDAJO6oZDYNZWGN9HQlE2agGb7mxJnAnaHsfmpEjdCl0w0NGXDUSV8PY7fjg1H5kRT4kzAHPUzhmLishzfPqweM9HQnE2+aHGkRr6ixQsOTEUL9Y9RV/XmxMagnS2s0RdU4qgJOp0dmLgxxt1GNZfauoQede4rIOhyosBApj0793sTqlMc1bMbpbDF28pAKwOtDGx8Bv4DLey2KdMFaQkAAAAASUVORK5CYII=";var l=a(67233),d=a(5587),r=a(99954),c=a(89244),m=a(89379);const u="styles_bodyHeaer__-gPP9",h="styles_actionButtonBig__5Xbgi",p="styles_oauth-btn__NRRSk",g="styles_oauth-btn__icon__75Gxa",v="styles_ceaContainer__UEp7l",f="styles_ceaTitle__G+18v",w="styles_ceaList__eQLgs",x="styles_ceaCard__1CbEg",_="styles_ceaCardHeader__FT53D",y="styles_ceaAccountInfo__tToQg",b="styles_ceaAccountDetails__cG5j6",
1j="styles_ceaMailIcon__OqbBZ",A="styles_ceaEmailText__OI-bZ",N="styles_ceaStatusBadge__Y4JGQ",C="styles_ceaCheckIcon__6wx75",S="styles_ceaActiveBadge__s+-B-",E="styles_ceaErrorIcon__2hjnS",k="styles_ceaErrorBadge__EtoJn",D="styles_ceaActions__fCBc2",R="styles_ceaTestBtn__UA5L-",T="styles_ceaDisconnectBtn__3EHir",F="styles_ceaShieldIcon__Aw8mt",I="styles_ceaUnplugIcon__XOAK5",L="styles_ceaCardFooter__XEtVL";var B=a(13876),O=a(41509),P=a(97352),H=(a(94999),a(20966),a(85923)),U=a(54241),z=a(59469),M=a(81946),Q=a(2185),X=a(16339),q=a(97488),Y=a(26910),W=a(4280),Z=a(388),J=a(45833),G=a(58888),V=a(64967),K=a(38228),$=a(83167),ee=a(10427),te=a(44414);const ae="https://rp-api.elevatestaffing.ai/authenticate-users-with-email-provider-v3";function se(e){return(Array.isArray(e)?e:[]).filter((e=>{let{category_name:t}=e;return t!==ee.mg})).map((e=>{let{category_name:t,config_id:a,email_addresses:s,is_enabled:i}=e;return{category_name:t,config_id:a,email_addresses:s}}))}const ie=function(e){let{hideSettingsTab:t=!1}=e;const[a,i]=(0,s.useState)(1),[n,o]=(0,s.useState)({}
1),[l,d]=(0,s.useState)([]),[r,c]=(0,s.useState)(!1),[ie,ne]=(0,s.useState)({}),[oe,le]=(0,s.useState)([]),[de,re]=(0,s.useState)({}),[ce,me]=(0,s.useState)([]),[ue,he]=(0,s.useState)(!1),[pe,ge]=(0,s.useState)(!1),[ve,fe]=(0,s.useState)([]),[we,xe]=(0,s.useState)(!1),[_e,ye]=(0,s.useState)(""),[be,je]=(0,s.useState)(""),[Ae,Ne]=(0,s.useState)(""),[Ce,Se]=(0,s.useState)(!1),[Ee,ke]=(0,s.useState)(null),[De,Re]=(0,s.useState)(!0),[Te,Fe]=(0,s.useState)(!0),[Ie,Le]=(0,s.useState)(!1),[Be,Oe]=(0,s.useState)(""),{user:Pe}=(0,P.A)();null===Pe||void 0===Pe||Pe.email,(0,s.useEffect)((()=>{null!==ie&&void 0!==ie&&ie.org_logo_file&&(0,K.j)(null===ie||void 0===ie?void 0:ie.org_logo_file).then((function(e){je(e)})).catch((e=>{}))}),[null===ie||void 0===ie?void 0:ie.org_logo_file]);let He=(0,s.useId)();(0,s.useEffect)((()=>{localStorage.removeItem("isscrape"),null!==Pe&&void 0!==Pe&&Pe.email&&(ze(),Me(),Ue())}),[null===Pe||void 0===Pe?void 0:Pe.email]),(0,s.useEffect)((()=>{qe()}),[ie.org_zipcode]),(0,s.useEffect)((()=>{const e=null===ve||void 0===ve?void 0:ve.integrations;if((null!==de&&void 0!==de&&de.email_address||null!==de&&void 0!==de&&de.email_addressScrape)&&null!==e&&void 0!==e&&e.length){let t=!1,a=!1;if(e.forEach((e=>{e.email_address===(null===de||void 0===de?void 0:de.email_address)&&(t=!0),e.email_address===(null===de||void 0===de?void 0:de.email_addressScrape)&&(a=!0)})),t||a){xe(!0);const e="\n        ".concat(t?"The email address <b>".concat(null===de||void 0===de?void 0:de.email_address,"</b> is already associated with the Rate Confirmation Scraping Account"):"","\n    ").concat(a?"The email address <b>".concat(null===de||void 0===de?void 0:de.email_addressScrape,"</b> is already associated with the Outgoing Email Account"):"","\n      ");ye(e)}else xe(!1),o((e=>(0,m.A)((0,m.A)({},e),{},{email_address:"",email_addressScrape:""})))}else xe(!1)}),[null===de||void 0===de?void 0:de.email_address,null===de||void 0===de?void 0:de.email_addressScrape,ve]);const Ue=()=>{const e={action:"list_integrations",requesting_user_email:null===Pe||void 0===Pe?void 0:Pe.email};Y.A.post(ae,e,{headers:{"Content-Type":"application/json"}}).then((e=>{let{data:t}=e;fe(t)})).catch((e=>{console.error(e)}))},ze=()=>{let e={action:"org_data",admin_email:null===Pe||void 0===Pe?void 0:Pe.email};c(!0),B.A.CompanyDetails(e).then((e=>{var t,a;(c(!1),null!==e&&void 0!==e&&null!==(t=e.data)&&void 0!==t&&t[0])&&ne(null===e||void 0===e||null===(a=e.data)||void 0===a?void 0:a[0])})).catch((e=>{c(!1),console.log(e)}))},Me=()=>{let e={action:"retrieve_emails",admin_email:null===Pe||void 0===Pe?void 0:Pe.email};c(!0),Fe(!0),Oe(""),B.A.CompanyDetails(e).then((e=>{c(!1),le(se(e.data)),me(se(e.data)),Qe(e.data)})).catch((e=>{c(!1),Oe("Couldn't load this setting."),console.log(e)})).finally((()=>Fe(!1)))},Qe=e=>{const t=(Array.isArray(e)?e:[]).find((e=>(null===e||void 0===e?void 0:e.category_name)===ee.mg)),a=(0,ee.d)(e);ke(t?{config_id:t.config_id,is_enabled:a}:null),Re(a),(0,ee.yC)(null===Pe||void 0===Pe?void 0:Pe.email,a)}
1,Xe=async e=>{if(Ie)return;const t=De;Re(e),Le(!0),Oe("");try{null!==Ee&&void 0!==Ee&&Ee.config_id?await B.A.CompanyDetails({action:"update_emails",admin_email:null===Pe||void 0===Pe?void 0:Pe.email,update:{config_id:Ee.config_id,is_enabled:e}}):e||await B.A.CompanyDetails({action:"create_email_config",admin_email:null===Pe||void 0===Pe?void 0:Pe.email,config_data:[{category_name:ee.mg,email_addresses:"",is_enabled:!1,description:"Email employees when the employer changes their profile details"}]});const t=await B.A.CompanyDetails({action:"retrieve_emails",admin_email:null===Pe||void 0===Pe?void 0:Pe.email,category_names:[ee.mg]}),a=(0,ee.d)(null===t||void 0===t?void 0:t.data);if(Qe(null===t||void 0===t?void 0:t.data),a!==e)throw new Error("The change didn't save. Please try again.");H.oR.success(e?"Employees will be emailed when you change their details.":"Employee change emails turned off.")}catch(a){Re(t);const e=(Array.isArray(null===a||void 0===a?void 0:a.details)?a.details[0]:"")||(null===a||void 0===a?void 0:a.error)||(null===a||void 0===a?void 0:a.message)||"Couldn't save this setting.";Oe(e),H.oR.error(e)}finally{Le(!1)}},qe=()=>{if(5==String(ie.org_zipcode).length){let e={zip_code:ie.org_zipcode};c(!0),B.A.zipCodeInfo(e).then((e=>{if(c(!1),e){var t,a,s;let i=null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.city,n=null===e||void 0===e||null===(a=e.data)||void 0===a?void 0:a.state,o=null===e||void 0===e||null===(s=e.data)||void 0===s?void 0:s.country;i&&(ie.org_city=i),n&&(ie.org_state=n),o&&(ie.org_country=o),ne((0,m.A)({},ie))}})).catch((e=>{c(!1),console.log(e)}))}},Ye=(e,t)=>{n[e]="",re((a=>(0,m.A)((0,m.A)({},a),{},{[e]:t})))},We=(e,t,a,s,i)=>{var n;return(0,te.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"8px 12px",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"8px",marginBottom:"6px"},children:[(0,te.jsx)("div",{style:{width:28,height:28,borderRadius:6,background:"#f1f5f9",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:(0,te.jsx)("span",{className:"material-symbols-outlined",style:{fontSize:"15px",color:"#64748b"},children:"mail"})}),(0,te.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,te.jsx)("div",{style:{fontSize:"11px",fontWeight:600,color:"#334155",marginBottom:2},children:e}),i?(0,te.jsx)("div",{className:"tw-text-[11px] tw-text-slate-500 tw-mb-1",children:i}):null,(0,te.jsx)("input",{id:"uid".concat(He).concat(t),className:"tw-w-full tw-text-xs tw-text-slate-800 tw-bg-slate-50 tw-border tw-border-slate-200 tw-rounded tw-px-2 tw-py-1.5 tw-outline-none focus:tw-border-indigo-400 focus:tw-bg-white tw-transition-colors",value:(null===(n=oe.find((e=>e.category_name===t)))||void 0===n?void 0:n.email_addresses)||"",onChange:e=>((e,t)=>{le((a=>-1!==a.findIndex((t=>t.category_name===e))?a.map((a=>a.category_name===e?(0,m.A)((0,m.A)({},a),{},{email_addresses:t}):a)):[...a,{category_name:e,email_addresses:t}]))})(t,e.target.value),placeholder:s||a})]})]},t)},Ze=(e,t)=>{let a=((null===ve||void 0===ve?void 0:ve.integrations)||[]).filter((t=>e?"Email to scrap rate confirmations"==t.purpose:"Email to scrap rate confirmations"!=t.purpose));return(0,te.jsxs)("div",{className:v,children:[(0,te.jsxs)("h4",{className:"d-flex align-items-center gap-2 ".concat(f),children:[null!==t&&void 0!==t?t:(0,te.jsx)(U.A,{className:"me-2"}),e||"Connected Sending Accounts"]}),(0,te.jsx)("div",{className:w,children:a.map(((t,a)=>"Email to use to send all emails to consultants"==(null===t||void 0===t?void 0:t.purpose)||e?(0,te.jsx)(te.Fragment,{children:(0,te.jsxs)("div",{className:x,children:[(0,te.jsxs)("div",{className:_,children:[(0,te.jsxs)("div",{className:y,children:[(0,te.jsxs)("div",{className:b,children:[(0,te.jsx)(Z.A,{className:j}),(0,te.jsx)("span",{className:A,children:t.email_address})]}),(0,te.jsx)("div",{className:N,children:"active"===t.status?(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)(J.A,{className:C}),(0,te.jsx)("span",{className:S,children:"Active"})]}):(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)(z.A,{className:E}),(0,te.jsx)("span",{className:"".concat(k," capitalize"),children:t.status||"Error"})]})})]}),(0,te.jsxs)("div",{className:D,children:[(0,te.jsxs)("button",{type:"button",onClick:()=>(e=>{const t={action:"test_connection",requesting_user_email:null===Pe||void 0===Pe?void 0:Pe.email,integration_id:null===e||void 0===e?void 0:e.integration_id};c(!0),Y.A.post(ae,t,{headers:{"Content-Type":"application/json"}}).then((e=>{let{data:t}=e;t.success?H.oR.success(t.message):H.oR.error(t.message||(null===t||void 0===t?void 0:t.error_details)),Ue(),c(!1)})).catch((e=>{var t,a,s,i;c(!1),H.oR.error((null===e||void 0===e||null===(t=e.response)||void 0===t||null===(a=t.data)||void 0===a?void 0:a.error)||(null===e||void 0===e||null===(s=e.response)||void 0===s||null===(i=s.data)||void 0===i?void 0:i.message)||(null===e||void 0===e?void 0:e.message)),console.log("Health Check Error:",e)}))})(t),className:R,children:[(0,te.jsx)(M.A,{className:F}),"Test Connection"]}),"disconnected"==t.status?(0,te.jsx)(te.Fragment,{}):(0,te.jsxs)("button",{type:"button",onClick:()=>((e,t,a)=>{const s={action:"disconnect_email",requesting_user_email:null===Pe||void 0===Pe?void 0:Pe.email,email_address:e,provider:t,auth_type:a};c(!0),Y.A.post(ae,s,{headers:{"Content-Type":"application/json"}}).then((e=>{console.log(e,"response from api");let t=e.data;c(!1),Ue(),H.oR.success(null===t||void 0===t?void 0:t.message)})).catch((e=>{c(!1),console.log(e,"err response from api"),H.oR.error("Disconnect error: ".concat(e))}))})(t.email_address,t.provider,t.auth_type),className:T,children:[(0,te.jsx)(G.A,{className:I}),"Disconnect"]})]})]}),(0,te.jsxs)("div",{className:"capitalize ".concat(L),children:[(0,te.jsxs)("span",{children:["Provider: ",t.provider]}),(0,te.jsxs)("span",{children:["Auth: ",t.auth_type]}),(0,te.jsxs)("span",{children:["Connected: ",(0,V.CP)(t.created_at)]}),(0,te.jsxs)("span",{children:["Connected: ",(0,V.CP)(t.updated_at)]})]})]},a)}):(0,te.jsx)(te.Fragment,{}
1)))})]})},Je=e=>{if(!de["email_address"+(e?"Scrape":"")])return(0,te.jsx)(te.Fragment,{});let t=e?"Scrape":"";return(0,te.jsx)("div",{children:(0,te.jsx)("div",{className:"mb-4",children:de["oauth2_config"+t]&&!we?(0,te.jsxs)("div",{onClick:()=>{},className:"mt-3 ".concat(h),children:[(0,te.jsx)(M.A,{className:"icon-sm me-1 flex-shrink-0",style:{width:"20px",minWidth:"20px",color:"#4864dc"}}),(0,te.jsxs)("div",{className:"d-flex flex-column gap-2",children:[(0,te.jsx)("div",{className:"fw-500 mb-2",children:"OAuth2 Setup Required"}),(0,te.jsxs)("button",{onClick:()=>ge(t||!0),type:"button",className:p,children:[(0,te.jsx)(X.HaR,{className:g}),"Setup OAuth Credentials"]})]})]}):(0,te.jsx)(te.Fragment,{})})})},Ge=(e,t,a)=>{let s=String(e).replaceAll(" ","_"),i=e?"Scrape":"";return(0,te.jsxs)("div",{children:[(0,te.jsxs)("div",{className:"d-flex align-items-center gap-1 mb-4 flex-wrap",style:{lineHeight:"0.9"},children:[null!==a&&void 0!==a?a:(0,te.jsx)(U.A,{className:"me-2 mt-1"})," ",(0,te.jsxs)("div",{children:[(0,te.jsx)("h4",{className:"mb-0 pb-0 ".concat(f),children:null!==e&&void 0!==e?e:"Outgoing Email Account"}),(0,te.jsx)("div",{className:"fontgray mt-0 pt-0",children:null!==t&&void 0!==t?t:"Configure an email account to send outgoing emails from the system"})]})]}),(0,te.jsxs)("div",{children:[(0,te.jsxs)("div",{className:"mb-3",children:[(0,te.jsx)("label",{htmlFor:"uid".concat(He,"oauth2_").concat(s),className:"form-label fw-500 font14 mb-1",style:{color:"#020817"},children:"Provider"}),(0,te.jsxs)("select",{id:"uid".concat(He,"oauth2_").concat(s),className:"form-select",style:{boxShadow:"unset",fontSize:"14px"},value:e?de.oauth2_configScrape:de.oauth2_config||"",onChange:t=>{t.target.value||Ye(e?"email_addressScrape":"email_address",""),Ye(e?"oauth2_configScrape":"oauth2_config",t.target.value)},children:[(0,te.jsx)("option",{value:"",children:"Select OAuth2 Configuration"}),(0,te.jsx)("option",{value:"google",children:"Gmail / Google Workspace"}),(0,te.jsx)("option",{value:"microsoft",children:"Office 365 Enterprise"})]}),n["oauth2_config"+i]&&(0,te.jsx)("div",{className:"text-danger font12",children:n["oauth2_config"+i]}),(0,te.jsx)("div",{className:"form-text mt-1",children:"Choose your email provider for authentication"})]}),(o="From Email Address",l="email_address"+i,d="From Email Address",r="Enter a single email address to use as the sender for outgoing emails",c=!de["oauth2_config"+i],c?(0,te.jsx)(te.Fragment,{}):(0,te.jsxs)("div",{className:"mb-3",children:[(0,te.jsx)("label",{htmlFor:"uid".concat(He).concat(l),className:"form-label fw-500 font14 mb-1",style:{color:"#020817"},children:o}),(0,te.jsxs)("div",{className:"d-flex align-items-center position-relative",children:[(0,te.jsx)("span",{className:"material-symbols-outlined fontgray position-absolute my-auto mt-1",style:{fontVariationSettings:"'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48",fontSize:"18px",left:"10px"},children:"mail"}),(0,te.jsx)("input",{id:"uid".concat(He).concat(l),className:"form-control font14 fw-400",style:{boxShadow:"unset",paddingLeft:"35px"},value:de[l]||"",onChange:e=>Ye(l,e.target.value),placeholder:d})]}),n[l]?(0,te.jsxs)("div",{className:"text-danger",children:[n[l]," "]}):(0,te.jsx)(te.Fragment,{}),(0,te.jsx)("div",{className:"font12 fontgray my-1",children:r})]},l)),Je(!!e)]}),de["email_address"+i]?(0,te.jsx)("div",{className:"d-flex align-items-center justify-content-end gap-2",children:(0,te.jsxs)("div",{className:"themeButtonoutline",onClick:()=>re({}),children:[(0,te.jsx)("span",{class:"material-symbols-outlined",children:"close"}),"cancel"]})}):(0,te.jsx)(te.Fragment,{})]});var o,l,d,r,c},Ve=()=>{var e;let t=null===ve||void 0===ve||null===(e=ve.integrations)||void 0===e?void 0:e.filter((e=>"Email to use to send all emails to consultants"===e.purpose));return(0,te.jsxs)("div",{className:"border rounded p-2 mb-2",children:[(0,te.jsxs)("div",{className:"mb-2",children:[(0,te.jsx)("div",{className:"h6 ".concat(u," mb-0"),children:"Outgoing Email Account"}),(0,te.jsx)("div",{className:"fontgray font12",children:"Connect your email provider for sending automated emails"})]}),null!==t&&void 0!==t&&t.length?Ze():Ge()]})},Ke=()=>{var e;let t=null===ve||void 0===ve||null===(e=ve.integrations)||void 0===e?void 0:e.filter((e=>"Email to scrap rate confirmations"==e.purpose));return(0,te.jsx)("div",{className:"border rounded p-2 mb-2",children:null!==t&&void 0!==t&&t.length?Ze("Connected Scraping Accounts",(0,te.jsx)(Q.A,{className:"me-2 mt-1"})):Ge("Rate Confirmation Scraping","Connect an inbox to extract rate confirmations",(0,te.jsx)(Q.A,{className:"me-2 mt-1"}))})},$e=[{id:1,title:"Email Configuration",bodyTitle:"Email Configuration",description:"Configure the email addresses to receive copies of different types of communications. Multiple email addresses can be added using commas (e.g., [email protected], [email protected]).",renderData:()=>(0,te.jsxs)("div",{className:"cm-email-config",children:[Ve(),Ke(),(0,te.jsxs)("div",{className:"border rounded p-2 mb-2",children:[(0,te.jsxs)("div",{className:"mb-2",children:[(0,te.jsx)("div",{className:"h6 ".concat(u," mb-0"),children:"Notification Recipients"}),(0,te.jsx)("div",{className:"fontgray font12",children:"Set email addresses to receive copies of automated communications"})]}),We("Receive copy of vendor follow-up emails","vendor_followup","Receive copy of vendor follow-up emails","Enter comma-separated email addresses to receive vendor follow-up emails"),We("Copy of weekly work status & reminder emails","work_status","Copy of weekly work status & reminder emails","Enter comma-separated email addresses to receive work status and reminder emails"),We("Bench candidates calls and applications","bench_candidates_updates","Bench candidates calls and applications","Enter comma-separated email addresses to receive bench candidate communications"),We("Copy of on-boarding emails","onboarding","Copy of on-boarding emails","Enter comma-separated email addresses to receive on-boarding email copies"),We("Copy of HR Tickets","hr_tickets","Copy of HR Tickets","Enter comma-separated email addresses to receive copies of HR tickets.","Also notified when employees change their address, contact or bank details."),We("Copy of Invoicing emails","invoicing_emails","Copy of Invoicing emails","Enter comma-separated email addresses to receive copies of Invoicing emails."),(0,te.jsxs)("div",{className:"signatureContainer tw-flex tw-items-center tw-gap-2.5 tw-px-3 tw-py-2 tw-bg-white tw-border tw-border-slate-200 tw-rounded-lg tw-mb-1.5","aria-busy":Te||Ie,children:[(0,te.jsx)("div",{className:"tw-w-7 tw-h-7 tw-rounded-md tw-bg-slate-100 tw-flex tw-items-center tw-justify-center tw-shrink-0",children:(0,te.jsx)("span",{className:"material-symbols-outlined",style:{fontSize:"15px",color:"#64748b"},children:"notifications"})}),(0,te.jsxs)("div",{className:"tw-flex-1 tw-min-w-0",children:[(0,te.jsx)("label",{htmlFor:"uid".concat(He,"empChangeSwitch"),className:"tw-block tw-m-0 tw-text-[11px] tw-font-semibold tw-text-slate-700 tw-cursor-pointer",children:"Email employees when we change their details"}),(0,te.jsx)("div",{className:"tw-text-[11px] tw-text-slate-500",children:Be?(0,te.jsx)("span",{className:"tw-text-rose-600",children:Be}):Te?"Loading\u2026":De?"Employees get an email when your team updates their address, contact or bank details. Recruiters can still skip it per save.":"Off \u2014 employees are not emailed about changes your team makes."})]}),Ie?(0,te.jsx)("span",{className:"material-symbols-outlined tw-animate-spin tw-text-slate-400",style:{fontSize:"16px"},children:"progress_activity"}):null,(0,te.jsx)($.d,{id:"uid".concat(He,"empChangeSwitch"),checked:De,disabled:Te||Ie,onCheckedChange:Xe,"aria-label":"Email employees when we change their details"})]})]}),(0,te.jsx)("div",{className:"d-flex mt-2",children:(0,te.jsxs)("div",{className:"themeButton ms-auto",onClick:null===tt||void 0===tt?void 0:tt.onSubmit,style:{fontSize:"13px",padding:"6px 14px"},children:[(0,te.jsx)("span",{class:"material-symbols-outlined",style:{fontSize:"16px"},children:"save"}),"Save Configuration"]})})]}),onSubmit:()=>{const{dataNew:e,dataUpdate:t,dataDelete:a}=(e=>{const t=ce.reduce(((e,t)=>{let{category_name:a,email_addresses:s,config_id:i}=t;return e[a]={email_addresses:s,config_id:i},e}),{}),a=e.reduce(((e,t)=>(e[t.category_name]=t,e)),{}),s=[],i=[],n=[];
1for(const o of e){const e=t[o.category_name];e?o.email_addresses!==e.email_addresses&&i.push({config_id:e.config_id,category_name:o.category_name,email_addresses:o.email_addresses||null}):o.email_addresses&&s.push(o)}for(const[o,{config_id:l}]of Object.entries(t))a[o]||n.push({config_id:l,category_name:o});return{dataNew:s,dataUpdate:i,dataDelete:n}})(oe),s=[];if(a.length){const e=(0,m.A)({action:"delete_email_config",admin_email:null===Pe||void 0===Pe?void 0:Pe.email,config_data:a},1===a.length&&{config_id:a[0].config_id});s.push(B.A.CompanyDetails(e).then((e=>H.oR.success(e.message||"Deleted Successfully"))).catch((e=>H.oR.error(e.error))))}if(e.length){const t={action:"create_email_config",admin_email:null===Pe||void 0===Pe?void 0:Pe.email,config_data:e};s.push(B.A.CompanyDetails(t).then((e=>H.oR.success(e.message||"Created Successfully"))).catch((e=>H.oR.error(e.error))))}if(t.length){let e={action:"update_emails",admin_email:null===Pe||void 0===Pe?void 0:Pe.email,update:1===t.length?t[0]:t};e=1==t.length?{action:"update_emails",admin_email:null===Pe||void 0===Pe?void 0:Pe.email,update:t[0]}:{action:"update_emails",admin_email:null===Pe||void 0===Pe?void 0:Pe.email,updates:t},s.push(B.A.CompanyDetails(e).then((e=>H.oR.success(e.message||"Email configuration updated successfully"))).catch((e=>H.oR.error(e.error))))}s.length&&(c(!0),Promise.all(s).then((()=>{Me()})).finally((()=>{c(!1)})))}},{id:2,title:"Settings",bodyTitle:"Company Settings",description:"Configure general company information and system settings.",renderData:()=>(0,te.jsx)(W.A,{}),showHeader:!1}],et=t?$e.filter((e=>2!==e.id)):$e,tt=et.find((e=>e.id===a));return pe?(0,te.jsx)("div",{className:"w-100",children:(0,te.jsx)(q.A,{isscrape:!0!==pe,goBakc:()=>ge(!1),emailConfData:de})}):(0,te.jsxs)("div",{className:"w-100 tw-bg-white tw-rounded-xl tw-border tw-border-slate-200 tw-shadow-sm tw-p-2 md:tw-p-3",children:[et.length<=1?null:(0,te.jsx)("div",{className:"tw-mb-3 tw-overflow-x-auto tw-overflow-y-hidden tw-scroll-smooth",children:(0,te.jsx)("div",{className:"tw-flex tw-items-center tw-gap-2 tw-w-max tw-min-w-full tw-whitespace-nowrap tw-pr-1",children:et.map((e=>(0,te.jsxs)("div",{className:"pointer tw-inline-flex tw-flex-shrink-0 tw-items-center tw-gap-2 tw-rounded-lg tw-px-4 tw-py-2 tw-text-sm tw-font-medium tw-whitespace-nowrap tw-transition-all ".concat(a===e.id?"tw-bg-indigo-600 tw-text-white tw-shadow-md tw-shadow-indigo-200":"tw-bg-white tw-border tw-border-slate-200 tw-text-slate-600 hover:tw-text-slate-900 hover:tw-border-slate-300 hover:tw-shadow-sm"),onClick:()=>{i(e.id)},children:[(0,te.jsx)("span",{className:"tw-w-2 tw-h-2 tw-rounded-full ".concat(a===e.id?"tw-bg-white/60":"tw-bg-indigo-400")}),(0,te.jsx)("div",{children:e.title})]},e.id)))})}),tt.showHeader?(0,te.jsxs)("div",{className:"my-3",children:[(0,te.jsx)("div",{className:"d-flex align-items-center gap-2 pointer h4 ".concat(u),children:(0,te.jsx)("div",{children:tt.bodyTitle})}),(0,te.jsx)("div",{className:"font12 fontgray",children:tt.description})]}):"",(0,te.jsx)("div",{children:tt.renderData()}),(0,te.jsx)(O.vZ,{show:r}),(0,te.jsx)(O.pT,{deleteTitle:"Okay",show:ue,hideCancel:!0,result:()=>{he(!1)},title:"Sender Email Configuration",text:"<b>Two-Factor Authentication must be disabled on this email account.</b>"}),(0,te.jsx)(O.pT,{deleteTitle:"Okay",show:_e,hideCancel:!0,result:()=>{ye(!1)},title:"Duplicate Email",text:_e})]})},{titles:ne,details:oe}=l.A,le=[{id:"Teams_Management",label:"Teams Management",icon:o,countTitle:"Teams",addheading:"+ Add Team",Component:d.A},{id:"Titles_Management",label:"Titles Management",icon:ne,countTitle:"Titles",addheading:"+ Add Title",Component:r.A},{id:"Recruiters_Management",label:"Recruiters Management",icon:o,countTitle:"Recruiters",addheading:"+ Add Recruiter",Component:c.A},{id:"Organization_Management",label:"Organization Management",icon:oe,Component:ie},,],de=()=>(0,te.jsx)(te.Fragment,{});const re=function(){var e;const t=new URLSearchParams(window.location.search).get("tab")||le[0].id,[a,o]=(0,s.useState)(t),[l,d]=(0,s.use
1State)({});(0,n.A)("companyManagement",(e=>{const t={Teams:"Teams_Management",Titles:"Titles_Management",Recruiters:"Recruiters_Management",Organization:"Organization_Management"};t[e]&&o(t[e])}));let r=le.find((e=>(null===e||void 0===e?void 0:e.id)==a));r||(r=le[0]);const c=(null===(e=r)||void 0===e?void 0:e.Component)||de,[,m]=(0,s.useState)(0);(0,s.useEffect)((()=>{const e=()=>m((e=>e+1));return window.addEventListener("permissions-updated",e),window.addEventListener("storage",e),()=>{window.removeEventListener("permissions-updated",e),window.removeEventListener("storage",e)}}),[]);const u=function(){var e,t;const a=sessionStorage.getItem("permissions");if(!a)return null;const{data:s,timestamp:i}=JSON.parse(a);return"edit"==String(null===s||void 0===s||null===(e=s.modules)||void 0===e||null===(t=e.companyManagement)||void 0===t?void 0:t.accessLevel).toLocaleLowerCase()}();return(0,s.useEffect)((()=>{o(t)}),[t]),(0,te.jsxs)("div",{className:"signatureContainer homepageFontfamily tw-space-y-4 w-100 tw-bg-[#F1F3F7] tw-min-h-screen tw-pb-6",children:[(0,te.jsx)(i.Ay,{light:!0,title:"Company Management",subtitle:r.label,helperSlug:"companyManagement",actions:(0,te.jsxs)(te.Fragment,{children:[r.countTitle?(0,te.jsxs)("span",{className:"tw-inline-flex tw-items-center tw-rounded-full tw-bg-slate-100 tw-border tw-border-slate-200 tw-px-2 tw-py-0.5 tw-text-[10px] tw-font-semibold tw-text-slate-600",children:[r.countTitle,": ",l.count||0]}):(0,te.jsx)(te.Fragment,{}),r.addheading&&u?(0,te.jsx)(i.O1,{label:r.addheading.replace("+ ",""),onClick:()=>{l.action&&l.action()}}):null]})}),(0,te.jsxs)("div",{className:"tw-px-2 lg:tw-px-4",children:[(0,te.jsx)("div",{className:"tw-mb-3 tw-overflow-x-auto tw-overflow-y-hidden tw-scroll-smooth",children:(0,te.jsx)("div",{className:"tw-flex tw-items-center tw-gap-2 tw-w-max tw-min-w-full tw-whitespace-nowrap tw-pr-1",children:le.map(((e,t)=>(0,te.jsxs)("button",{type:"button",className:"tw-inline-flex tw-flex-shrink-0 tw-items-center tw-gap-2 tw-rounded-lg tw-px-4 tw-py-2 tw-text-sm tw-font-medium tw-whitespace-nowrap tw-transition-all ".concat(a===e.id?"tw-bg-indigo-600 tw-text-white tw-shadow-md tw-shadow-indigo-200":"tw-bg-white tw-border tw-border-slate-200 tw-text-slate-600 hover:tw-text-slate-900 hover:tw-border-slate-300 hover:tw-shadow-sm"),onClick:()=>(e=>{o(e);const t="".concat(window.location.pathname,"?tab=").concat(e);window.history.pushState(null,"",t)})(e.id),children:[(0,te.jsx)("span",{className:"tw-w-2 tw-h-2 tw-rounded-full ".concat(a===e.id?"tw-bg-white/60":"tw-bg-indigo-400")}),(0,te.jsx)("span",{className:"p-0 m-0",children:e.label})]},t)))})}),(0,te.jsx)("div",{className:"py-0 px-0",children:(0,te.jsx)(c,{editPermitions:u,callback:d})})]})]})};const ce=function(){return(0,te.jsx)("div",{children:(0,te.jsx)(re,{})})}},10427:(e,t,a)=>{a.d(t,{F8:()=>d,GE:()=>m,_Y:()=>u,d:()=>p,ef:()=>v,mg:()=>o,yC:()=>g});var s=a(89379),i=a(9950),n=a(13876);const o="employee_change_notifications",l=["primary_contact","secondary_contact","candidate_address1","candidate_address2","candidate_city","candidate_state","candidate_zipcode","candidate_country","emergency_name","emergency_number","emergency_email","linkedin_url","portfolio_url"],d={primary_contact:"Primary phone",secondary_contact:"Secondary phone",candidate_address1:"Address line 1",candidate_address2:"Address line 2",candidate_city:"City",candidate_state:"State",candidate_zipcode:"ZIP / PIN code",candidate_country:"Country",emergency_name:"Emergency contact name",emergency_number:"Emergency contact phone",emergency_email:"Emergency contact email",linkedin_url:"LinkedIn URL",portfolio_url:"Portfolio URL",direct_deposit_accounts:"Bank accounts"},r=new Set(["primary_contact","secondary_contact","emergency_number"]),c=(e,t)=>{const a=String(null!==t&&void 0!==t?t:"").trim();return r.has(e)?a.replace(/\D/g,""):a},m=(e,t)=>l.some((a=>t&&a in t&&c(a,null===e||void 0===e?void 0:e[a])!==c(a,t[a]))),u=(e,t)=>null!==e&&void 0!==e&&e.modify&&"boolean"===typeof(null===t||void 0===t?void 0:t.notifyEmployee)?(0,s.A)((0,s.A)({},e),{},{notify_employee:t.notifyEmployee}):e,h=new Map,p=e=>{return!((t=(e||[]).find((e=>
1(null===e||void 0===e?void 0:e.category_name)===o)))&&(!1===t.is_enabled||"false"===String(t.is_enabled).toLowerCase()));var t},g=(e,t)=>{e&&h.set(e,{at:Date.now(),promise:Promise.resolve(!!t)})},v=e=>{const[t,a]=(0,i.useState)(null);return(0,i.useEffect)((()=>{let t=!0;return(e=>{if(!e)return Promise.resolve(!0);const t=h.get(e);if(t&&Date.now()-t.at<3e5)return t.promise;const a=n.A.CompanyDetails({action:"retrieve_emails",admin_email:e,category_names:[o]}).then((e=>p(null===e||void 0===e?void 0:e.data))).catch((()=>(h.delete(e),!0)));return h.set(e,{at:Date.now(),promise:a}),a})(e).then((e=>{t&&a(e)})),()=>{t=!1}}),[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.