1"use strict";(self.webpackChunkdentalpost_web=self.webpackChunkdentalpost_web||[]).push([[5414],{14569:function(e,t,n){var i=n(96540),a=n(55268),s=n(65378),o=n(64500),r=n(74512),l=n(63780),c=n(64356),p=n(74848);t.A=e=>{const t=(0,i.useContext)(o.F).userAuth.isAuthenticated,n=(0,i.useContext)(r.Rs).user,d=(0,i.useContext)(o.F).updateRedirectPath,u=i.useState(!1),m=u[0],f=u[1];return(0,i.useEffect)(()=>{if(!t&&m){d(location.pathname);const e=(0,c.U)(s.QWL,location.search);(0,a.navigate)(e)}else m||f(!0)},[t,m]),(0,i.useEffect)(()=>{if((0,r.$5)(n)&&null===n.position){const e=(0,c.U)(s.z1,location.search);(0,a.navigate)(e)}},[n]),m?t?(0,p.jsx)(e.component,Object.assign({},e)):(0,p.jsx)(l.A,{}):null}},18221:function(e,t,n){n.d(t,{E$:function(){return a},Lv:function(){return d},Sy:function(){return i},Xq:function(){return c},Y9:function(){return r},bq:function(){return u},fB:function(){return l},fR:function(){return s},mW:function(){return p},o0:function(){return g},u2:function(){return f},wt:function(){return o},xL:function(){return m}});const i=/^[0-9a-zA-Z- ]{5,10}$/,a=96,s=96,o=96,r=96,l=96,c=96,p=1e3,d=96,u=96,m=45,f=96,g=96},33962:function(e,t,n){var i=n(96540),a=n(64500),s=n(16477),o=n(98027),r=n(65594),l=n(15298),c=n(74353),p=n.n(c),d=n(74848);t.A=e=>{const t=i.useContext(a.F),n=t.urlParams,c=t.jobToApply,u=t.fetchJobToApply,m=t.resetJobToApply;return i.useEffect(()=>{!n.jobId||c&&("jobKey"in c?(null==c?void 0:c.jobKey)===n.jobId:c.jobId===n.jobId)?c&&!n.jobId&&m():u(Number(n.jobId))},[n.jobId]),!c||e.jobId&&("jobKey"in c&&c.jobKey!==e.jobId||"id"in c&&c.id!==Number(e.jobId))?null:"appliedDate"in c&&c.appliedDate?(0,d.jsx)("div",{className:"bg-solids-primary-green-10 text-dark py-2 px-3 w-100 d-flex flex-wrap align-items-center mb-4 gap-2",children:(0,d.jsxs)("span",{className:"text-success fw-bold lead",children:[(0,d.jsx)(o.CMH,{})," Application Submitted"," ",p()(c.appliedDate).format("MMM DD, YYYY")]})}):(0,d.jsxs)("div",{className:"bg-solids-primary-green-10 text-dark py-2 px-3 w-100 d-flex align-items-center mb-4 gap-2",children:[(0,d.jsx)(s.A,{color:"success",className:"py-2 m-2",children:"Applying"}),(0,d.jsxs)("span",{children:[(0,d.jsx)("span",{className:"fw-bold",children:(0,r.gS)(c)?l.$k[c.position]:c.position})," ",(0,d.jsxs)("span",{className:"text-muted",children:["at ",c.employerName]})]})]})}},36365:function(e,t,n){var i=n(55268),a=n(30221),s=n(74848);t.A=function(e){const t=(0,i.useStaticQuery)(o);if(a.DF)return null;let n=[{name:"description",content:e.description||t.site.siteMetadata.description},{property:"og:site_name",content:e.site_name||"DentalPost"},{property:"og:title",content:e.og_title||e.title},{property:"og:description",content:e.og_description||e.description||t.site.siteMetadata.description},{property:"og:type",content:e.type||"website"},{property:"og:url",content:e.siteUrl},{property:"twitter:title",content:e.tw_title||e.title},{property:"twitter:description",content:e.tw_description||e.description||t.site.siteMetadata.description},{property:"twitter:site",content:"@DentalPost"},{property:"apple-itunes-app",content:"app-id=504971545"}];return(e.og_image||e.image)&&n.push({property:"og:image",content:"https://www.dentalpost.net"+(e.og_image||e.image)}),(e.tw_image||e.image)&&(n.push({property:"twitter:card",content:"summary_large_image"}),n.push({property:"twitter:image",content:"https://www.dentalpost.net"+(e.tw_image||e.image)})),e.image||e.og_image||e.tw_image||!t.file||(n.push({property:"og:image",content:"https://www.dentalpost.net"+t.file.publicURL}),n.push({property:"twitter:card",content:"summary_large_image"}),n.push({property:"twitter:image",content:"https://www.dentalpost.net"+t.file.publicURL}),n.push({property:"og:image:width",content:"316px"}),n.push({property:"og:image:height",content:"200px"})),e.no_index&&n.push({property:"robots",content:"noindex"}),e.meta&&e.meta.length>0&&n.concat(e.meta),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("html",{lang:"en"}),(0,s.jsx)("title",{children:e.title||"DentalPost"}),n.map(e=>(0,s.jsx)("meta",{name:e.name,property:e.property,content:e.content},e.name?e.name:e.property)),e.children]})};const o="1826510244"},44834:function(e,t,n){var i=n(96540),a=n(23239),s=n(27592),o=n(48210),r=n(74848);t.A=e=>{var t;const n=i.useState(null!==(t=e.defaultChecked)&&void 0!==t?t:e.checked),l=n[0],c=n[1];return i.useEffect(()=>{"boolean"==typeof e.checked&&c(e.checked)},[e.checked]),(0,r.jsx)(a.A,{check:!0,row:!0,className:"ps-0",children:(0,r.jsxs)(s.A,{check:!0,className:"d-flex gap-2",children:[(0,r.jsx)(o.A,Object.assign({},e,{id:"radio-"+e.name+(e.value?"-"+e.value:""),"data-testid":e.name,type:"radio",checked:l,value:e.value,onChange:e.onChange?e.onChange:e=>c(e.target.checked)})),e.label&&(0,r.jsx)("span",{children:e.label})]})})}},45079:function(e,t,n){var i=n(96540),a=n(5556),s=n.n(a),o=n(46942),r=n.n(o),l=n(56331),c=["className","cssModule","type","size","color","children","tag"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},p.apply(this,arguments)}function d(e,t){if(null==e)return{};var n,i,a=function(e,t){if(null==e)return{};var n,i,a={},s=Object.keys(e);for(i=0;i<s.length;i++)n=s[i],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u={tag:l.Wx,type:s().oneOf(["border","grow"]),size:s().oneOf(["sm"]),color:s().oneOf(["primary","secondary","success","danger","warning","info","light","dark"]),className:s().string,cssModule:s().object,children:s().string};function m(e){var t=e.className,n=e.cssModule,a=e.type,s=void 0===a?"border":a,o=e.size,u=e.color,m=e.children,f=void 0===m?"Loading...":m,g=e.tag,h=void 0===g?"div"
1:g,b=d(e,c),y=(0,l.qO)(r()(t,!!o&&"spinner-".concat(s,"-").concat(o),"spinner-".concat(s),!!u&&"text-".concat(u)),n);return i.createElement(h,p({role:"status"},b,{className:y}),f&&i.createElement("span",{className:(0,l.qO)("visually-hidden",n)},f))}m.propTypes=u,t.A=m},63780:function(e,t,n){var i=n(45079),a=n(74848);t.A=e=>(0,a.jsxs)("div",{className:"d-flex align-items-center text-center py-5",children:[(0,a.jsx)(i.A,{color:"primary",className:"me-3"}),(0,a.jsx)("p",{className:"mb-0",children:e.message||"Loading..."})]})},64356:function(e,t,n){n.d(t,{U:function(){return i}});const i=(e,t)=>{const n=new URLSearchParams(t).toString();return n?e+"?"+n:e}},64904:function(e,t,n){n.d(t,{hv:function(){return s},k7:function(){return i},lB:function(){return a}});n(46942);const i=(e,t)=>!(!t.touched[e]||!t.errors[e]),a=[{value:"NONE",label:"None"},{value:"DAILY",label:"Daily"},{value:"WEEKLY",label:"Weekly"}],s=[{value:0,label:"All Jobs in Zone"},{value:100,label:"100 Mile Limit"},{value:50,label:"50 Mile Limit"},{value:40,label:"40 Mile Limit"},{value:30,label:"30 Mile Limit"},{value:20,label:"20 Mile Limit"},{value:10,label:"10 Mile Limit"}]},71346:function(e,t,n){n.r(t),n.d(t,{Head:function(){return _}});var i=n(96540),a=n(36365),s=n(55268),o=n(65378),r=n(17917),l=n(53370),c=n(23239),p=n(85052),d=n(85045),u=n(21582),m=n(98027),f=n(38790),g=n(12138),h=n(64904),b=n(74512),y=n(14569),x=n(46266),j=n(64356),v=n(33962),A=n(44834),w=n(18221),N=n(7425),k=n(12664),S=n(74848);const z=k.Ik({position:k.Yj().required("Position is required."),zip:k.Yj().trim().required("Zip Code is required.").matches(w.Sy,"Please enter a valid zip code."),emailAlerts:k.Yj().required()}),O=e=>{const t=(0,i.useContext)(b.Rs),n=t.user,a=t.updateUser,y=t.fetchUser,w=(0,i.useMemo)(()=>{var e,t;return{position:(0,b.$5)(n)&&null!==(e=n.position)&&void 0!==e?e:"",zip:(0,b.$5)(n)&&null!==(t=n.zip)&&void 0!==t?t:"",emailAlerts:(0,b.$5)(n)?n.emailAlerts:"DAILY"}},[n]);function k(t){y("staff"),u.Ay.Events.trackEvent({actionType:u.FS,category:u.fO,label:u.uc,payload:{distinctId:t.data.username,position:t.data.position,zip:t.data.zip,emailAlerts:t.data.emailAlerts}});const n=(0,j.U)(o.qvR,e.location.search);(0,s.navigate)(n)}const O=(0,N.Wx)({initialValues:w,enableReinitialize:!0,validationSchema:z,validateOnMount:!0,onSubmit:async(e,t)=>{let i=t.setStatus,s=t.setSubmitting;if((0,b.$5)(n))try{if(null===n.position){const t=await d.A.Staff.updateJobPreferences({emailAlerts:e.emailAlerts,positionCode:e.position,zip:e.zip,specialty:"General",username:n.username});a(Object.assign({},n,{position:t.data.position,zip:t.data.zip,emailAlerts:t.data.emailAlerts})),k(t)}else{const t=await x.A.all([d.A.Staff.updateBasicInfo({body:{name:n.firstName+" "+n.lastName,phone:n.phone,position:e.position,specialties:n.specialties}}),d.A.Staff.updateLocationInfo({body:{address:n.address,address2:n.address2,city:n.city,state:n.state,zip:e.zip}}),d.A.Staff.updateEmailAlerts({emailAlerts:e.emailAlerts,radius:0})]),i=t[0],s=t[1],o=t[2],r=Object.assign({},n,{position:i.data.position,zip:s.data.zip,emailAlerts:o.data.emailAlerts});a(r),k({data:r})}}catch(r){var o;const e=r;i(Array.isArray(r)?r.map(e=>e.message).join(", "):null!==(o=null==e?void 0:e.message)&&void 0!==o?o:"Something went wrong. Please try again."),s(!1)}}});return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(v.A,{}),(0,S.jsxs)("div",{className:"text-center px-3 mx-auto mb-5",style:{maxWidth:"600px"},children:[(0,S.jsxs)(r.A,{color:"link",onClick:()=>{"undefined"!=typeof window&&window.history.back()},className:"w-100 text-left",children:[(0,S.jsx)(m._Jj,{})," Back"]}),(0,S.jsx)("h1",{className:"fw-bold",children:"Set Your Job Preferences"}),(0,S.jsx)("p",{className:"fw-bolder px-4",children:"Choose your desired job preferences so we can send you the most relevant opportunities."}),(0,S.jsx)("div",{className:"my-4",children:(0,S.jsxs)(l.A,{noValidate:!0,onSubmit:O.handleSubmit,children:[(0,S.jsxs)("fieldset",{disabled:O.isSubmitting,children:[(0,S.jsx)(f.A,{position:O.values.position,updatePosition:e=>O.setFieldValue("position",e),required:!0}),(0,S.jsx)(g.A,{zip:O.values.zip,updateZip:e=>O.setFieldValue("zip",e),onBlur:()=>
1O.setFieldTouched("zip"),invalid:O.touched.zip&&!!O.errors.zip,formFeedback:O.errors.zip,required:!0}),(0,S.jsx)("p",{className:"text-left",children:"Receive daily or weekly email messages of job openings"}),(0,S.jsx)(c.A,{className:"text-left d-flex gap-3",children:h.lB.map(e=>(0,S.jsx)(A.A,{name:"emailAlerts",value:e.value,checked:e.value===O.values.emailAlerts,onChange:e=>O.setFieldValue("emailAlerts",e.target.value),label:e.label},e.value))}),(0,S.jsx)(r.A,{type:"submit",color:"primary",className:"my-2 w-100",disabled:!O.isValid||O.isSubmitting,children:"Continue"})]}),(0,S.jsx)(p.A,{fade:!1,color:"danger",isOpen:!!O.status,toggle:()=>O.setStatus(void 0),children:O.status})]})})]})]})};function _(){return(0,S.jsx)(a.A,{title:"Set Job Preferences"})}t.default=e=>(0,S.jsx)(y.A,Object.assign({component:O},e))}}]); 2//# sourceMappingURL=component---src-pages-app-set-preferences-tsx-747f0427e11bc832503f.js.map
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.