PageSourceSearch

https://www.hachmolog.com/assets/VolunteerPartnerSignupView-DSAn5kPI.js

js hachmolog.com collected 2026-09-24 14:15:33 UTC 12,047 bytes, 1 lines download raw bytes

1import{i as S}from"./vendor-validator-CzLPc2u2.js";import{_ as x,L as q,X as D,n as b,N as U,s as M,E as T}from"./index-i_39S9TT.js";import{F as C}from"./FormPageTemplate-wQ1gAoC_.js";import{u as R}from"./vendor-maz-ui-CcIfur3Z.js";import{e as d,w,h as F}from"./vendor-vue-runtime-dom-ngu7FkgX.js";import{ak as i,G as y,aN as E,J as t,i as I,O as f,I as n,F as N,ap as P,H as l,aP as m,ar as h}from"./vendor-vue-runtime-core-O0r61XkH.js";import{Q as p,q as c}from"./vendor-vue-shared-C_oE6NXO.js";import"./vendor-vue-compiler-dom-BjqiHA0M.js";import"./vendor-vue-compiler-core-B_m9pfJg.js";import"./vendor-vue-select-Cn2oH4dd.js";import"./vendor-vue-star-rating-D42Atl4Q.js";import"./vendor-vue-BfDmC2hc.js";import"./vendor-vuex-DawOPd79.js";import"./vendor-vue-devtools-api-Cow_pXkh.js";import"./vendor-vue-reactivity-_PYbVOMb.js";import"./vendor-ionic-vue-Cp6ESLlK.js";import"./vendor-ionic-core-DDVmzL1A.js";import"./vendor-ionicons-CnTsVUQ5.js";import"./vendor-gleap-C_nLUrYA.js";import"./vendor-posthog-js-BcP-dMRa.js";import"./vendor-vue-router-BrjMN5S_.js";import"./vendor-axios-D8dNGRK6.js";import"./vendor-err-code-Btjngwyv.js";import"./vendor-promise-retry-CvXhdAiW.js";import"./vendor-retry-Drt1HQ7J.js";import"./vendor-case-DCoxfN6b.js";import"./vendor-dayjs-CMAHqsIS.js";import"./vendor-lodash-es-Dr2nHDXK.js";import"./vendor-exponential-backoff-CTCpx--5.js";import"./vendor-xstate-gZzxgXGH.js";import"./vendor-socket-io-client-DrXE8q1S.js";import"./vendor-engine-io-client-C-_nnA9b.js";import"./vendor-engine-io-parser-DPmA-eyr.js";import"./vendor-socket-io-component-emitter-Dkula2eQ.js";import"./vendor-socket-io-parser-SgV_gTLD.js";import"./vendor-vueuse-core-C1QNX1u6.js";import"./vendor-vueuse-shared-DO1b_29_.js";import"./vendor-vuelidate-validators-H9iLFjxf.js";import"./vendor-vuelidate-core-Bd16nddI.js";import"./vendor-neoconfetti-vue-CCbt6K7L.js";import"./vendor-vue-draggable-resizable-X1h3rUy6.js";import"./vendor-vuetify-DDTyW1fq.js";import"./vendor-libphonenumber-js-CDO7CG9b.js";const L={name:"volunteer-partner-signup-view",components:{FormPageTemplate:C,Loader:q,MazPhoneNumberInput:R},beforeRouteEnter(o,e,u){const v=o.params.partnerId;U.getVolunteerPartner(v).then(s=>{const a=s.data.volunteerPartner;return a?a.deactivated?(M.captureEvent(T.VOLUNTEER_VISITED_DEACTIVATED_PARTNER,{partner:v}),u("/sign-up")):u(g=>g.setVolunteerPartner(a)):u("/sign-up")}).catch(s=>(s?.response?.status!==404&&b.noticeError(s),u("/sign-up")))},data(){return{volunteerPartner:{name:"",requiredEmailDomains:[]},formStep:"step-1",formData:{email:"",password:"",firstName:"",lastName:"",phone:"",terms:!1},phoneInputInfo:{},errors:[],invalidInputs:[],serverErrorMsg:"",isRegistering:!1}},computed:{hasEmailValidation(){const o=this.volunteerPartner.requiredEmailDomains;return o&&o.length},welcomeTitle(){const o=this.hasEmailValidation?"Employee":"Volunteer";return`Welcome ${this.volunteerPartner.name} ${o}!`},emailInputLabel(){return this.hasEmailValidation?"What's your work email?":"What's your email?"}},methods:{setVolunteerPartner(o){this.volunteerPartner=o},isValidPartnerEmail(o){const e=this.volunteerPartner.requiredEmailDomains;if(!(e&&e.length))return!0;const u=o.split("@")[1];return u&&e.indexOf(u)>=0},onPhoneInputUpdate(o){this.phoneInputInfo=o},formStepTwo(){this.errors=[],this.invalidInputs=[],this.serverErrorMsg="",this.formData.email?S(this.formData.email)?this.isValidPartnerEmail(this.formData.email)||(this.volunteerPartner.requiredEmailDomains.length<5?this.errors.push(`This page currently only accepts the following domains: ${this.volunteerPartner.requiredEmailDomains.join(", ")}. If you work at ${this.volunteerPartner.name} but don’t have this email domain, please contact our team at [email protected]!`):this.errors.push("You must use your company email address"),this.invalidInputs.push("inputEmail")):(this.errors.push(this.formData.email+" is not a valid email address."),this.invalidInputs.push("inputEmail")):(this.errors.push("An email address is required."),this.invalidInputs.push("inputEmail")),this.formData.password||(this.errors.push("A password is required."),this.invalidInputs.push("inputPassword")),!this.errors.length&&D.checkReg
1ister({email:this.formData.email,password:this.formData.password}).then(()=>{this.formStep="step-2",this.serverErrorMsg=""}).catch(o=>{this.serverErrorMsg=o?.response?.data?.err??"Failed: Please try again.",o?.response?.status!==409&&o?.response?.status!==422&&b.noticeError(o)})},submitSignupForm(){this.errors=[],this.invalidInputs=[],(!this.formData.firstName||!this.formData.lastName)&&this.errors.push("You must enter your first and last name."),this.formData.firstName||this.invalidInputs.push("firstName"),this.formData.lastName||this.invalidInputs.push("lastName"),this.formData.phone?(!this.phoneInputInfo.isValid||!this.phoneInputInfo.e164)&&(this.errors.push(this.formData.phone+" is not a valid phone number."),this.invalidInputs.push("phone")):(this.errors.push("You must enter a phone number."),this.invalidInputs.push("phone")),this.formData.terms||this.errors.push("You must read and accept the user agreement and volunteer agreement."),this.errors.length||this.register()},register(){this.serverErrorMsg="",!this.isRegistering&&(this.isRegistering=!0,D.registerPartnerVolunteer({volunteerPartnerOrg:this.$route.params.partnerId,inviteCode:this.$route.params.inviteCode,partnerUserId:this.$route.query.uid,email:this.formData.email,password:this.formData.password,firstName:this.formData.firstName,lastName:this.formData.lastName,phone:this.phoneInputInfo.e164,terms:this.formData.terms}).then(()=>{this.isRegistering=!1,this.$router.push("/verify")}).catch(o=>{this.isRegistering=!1,this.serverErrorMsg=o?.response?.data?.err??"Failed: Please try again.",o?.response?.status!==409&&o?.response?.status!==422&&b.noticeError(o)}))}}},O={class:"uc-form"},A={class:"uc-row justify-between mb-16"},Y={key:0,class:"step-errors"},z={class:"step-header"},W={class:"step-header__title","data-testid":"vp-signup-title"},B={class:"step-header__subtitle"},j={class:"uc-column"},G={for:"inputEmail",class:"uc-form-label"},H={class:"uc-column"},J={key:1},Q={key:0,class:"step-errors"},X={"data-testid":"vp-signup-errors"},K={class:"uc-column"},Z={class:"uc-column"},$={class:"uc-row name-fields"},ee={class:"uc-column"},te={class:"uc-column"},se={class:"uc-column"},re={class:"uc-form-checkbox"},oe=["disabled"],ie={key:2},ne={key:2,class:"uc-form-body"};function ae(o,e,u,v,s,a){const g=h("router-link"),V=h("maz-phone-number-input"),k=h("loader"),_=h("form-page-template");return i(),y(_,null,{default:E(()=>[t("div",O,[t("div",A,[I(g,{to:"/login",class:"uc-form-header-link"},{default:E(()=>[...e[11]||(e[11]=[f("Log In",-1)])]),_:1}),e[12]||(e[12]=t("div",{class:"uc-form-header-link--active"},"Sign Up",-1))]),s.formStep==="step-1"?(i(),n("form",{key:0,autocomplete:"off",class:"uc-form-body",onSubmit:e[3]||(e[3]=w(r=>a.formStepTwo(),["prevent"]))},[s.errors.length?(i(),n("div",Y,[e[13]||(e[13]=t("h5",null,"Please correct the following problems:",-1)),t("ul",null,[(i(!0),n(N,null,P(s.errors,r=>(i(),n("li",{key:r},p(r),1))),128))])])):l("",!0),t("div",z,[t("div",W,p(a.welcomeTitle),1),t("div",B,[f(" Not with "+p(s.volunteerPartner.name)+"? ",1),e[14]||(e[14]=t("a",{href:"https://upchieve.org/volunteer"},"Click here",-1))])]),t("div",j,[t("label",G,p(a.emailInputLabel),1),m(t("input",{id:"inputEmail",type:"email",class:c(["uc-form-input",{"uc-form-input--invalid":s.invalidInputs.indexOf("inputEmail")>-1}]),"onUpdate:modelValue":e[0]||(e[0]=r=>s.formData.email=r),required:"",autofocus:"",autocomplete:"off","data-testid":"vp-signup-email"},null,2),[[d,s.formData.email]])]),t("div",H,[e[15]||(e[15]=t("label",{for:"inputEmail",class:"uc-form-label"},"Create a password",-1)),m(t("input",{id:"inputPassword",type:"password",class:c(["uc-form-input",{"uc-form-input--invalid":s.invalidInputs.indexOf("inputPassword")>-1}]),"onUpdate:modelValue":e[1]||(e[1]=r=>s.formData.password=r),required:"",autocomplete:"new-password","data-testid":"vp-signup-password"},null,2),[[d,s.formData.password]]),e[16]||(e[16]=t("p",{class:"uc-form-subtext"}," Must contain at least one number, one uppercase letter, and one lowercase letter. ",-1))]),t("button",{class:"uc-form-button",type:"submit",onClick:e[2]||(e[2]=w(r=>a.formStepTwo(),["prevent"])),"data-testid":"vp-signup-step1-continue-btn"}," Continue "),s.serverErrorMsg!==""?(i(),n("div",J,p(s.serverErrorMsg),
11)):l("",!0)],32)):l("",!0),s.formStep==="step-2"?(i(),n("form",{key:1,autocomplete:"off",class:"uc-form-body",onSubmit:e[10]||(e[10]=w(r=>a.submitSignupForm(),["prevent"]))},[s.errors.length?(i(),n("div",Q,[e[17]||(e[17]=t("h5",null,"Please correct the following problems:",-1)),t("ul",X,[(i(!0),n(N,null,P(s.errors,r=>(i(),n("li",{key:r},p(r),1))),128))])])):l("",!0),e[26]||(e[26]=t("div",{class:"step-header"},[t("div",{class:"step-header__title","data-testid":"vp-signup-step-2-title"}," Finish creating your account "),t("div",{class:"step-header__subtitle"}," You’re just a few minutes away from helping low-income students! ")],-1)),t("div",K,[e[21]||(e[21]=t("label",{for:"username",class:"d-none"},"Username",-1)),m(t("input",{type:"text",class:"d-none",id:"username","onUpdate:modelValue":e[4]||(e[4]=r=>s.formData.email=r),autocomplete:"off"},null,512),[[d,s.formData.email]]),e[22]||(e[22]=t("label",{for:"password",class:"d-none"},"Password",-1)),m(t("input",{type:"password",class:"d-none",id:"password","onUpdate:modelValue":e[5]||(e[5]=r=>s.formData.password=r),autocomplete:"new-password"},null,512),[[d,s.formData.password]]),t("div",Z,[e[20]||(e[20]=t("label",{for:"firstName",class:"uc-form-label"},"What's your name?",-1)),t("div",$,[t("div",ee,[m(t("input",{id:"firstName",type:"text",class:c(["uc-form-input",{"uc-form-input--invalid":s.invalidInputs.indexOf("firstName")>-1}]),"onUpdate:modelValue":e[6]||(e[6]=r=>s.formData.firstName=r),required:"",autofocus:"",autocomplete:"off","data-testid":"vp-signup-first-name"},null,2),[[d,s.formData.firstName]]),e[18]||(e[18]=t("p",{class:"uc-form-subtext"},"First Name",-1))]),t("div",te,[m(t("input",{id:"lastName",type:"text",class:c(["uc-form-input",{"uc-form-input--invalid":s.invalidInputs.indexOf("lastName")>-1}]),"onUpdate:modelValue":e[7]||(e[7]=r=>s.formData.lastName=r),required:"",autocomplete:"off","data-testid":"vp-signup-last-name"},null,2),[[d,s.formData.lastName]]),e[19]||(e[19]=t("p",{class:"uc-form-subtext"},"Last Name",-1))])])])]),t("div",se,[e[23]||(e[23]=t("label",{for:"phoneNumber",class:"uc-form-label"},"What's your cell phone number?",-1)),I(V,{id:"phoneNumber",class:"phone-input",modelValue:s.formData.phone,"onUpdate:modelValue":e[8]||(e[8]=r=>s.formData.phone=r),required:"true","show-code-on-list":"",onUpdate:a.onPhoneInputUpdate},null,8,["modelValue","onUpdate"]),e[24]||(e[24]=t("p",{class:"uc-form-subtext"}," UPchieve notifies volunteers of incoming student requests via text. You can customize when you receive requests. ",-1))]),t("div",re,[m(t("input",{id:"userAgreement","onUpdate:modelValue":e[9]||(e[9]=r=>s.formData.terms=r),type:"checkbox",required:"","data-testid":"vp-signup-user-agreement"},null,512),[[F,s.formData.terms]]),e[25]||(e[25]=t("label",{for:"userAgreement"},[f(" I have read and accept the "),t("a",{href:"https://upchieve.org/legal",target:"_blank"},"user agreement"),f(" and "),t("a",{href:"https://upchieve.org/legal#volunteer-agreement",target:"_blank"},"volunteer agreement"),f(". ")],-1))]),t("button",{class:"uc-form-button",type:"submit",disabled:s.isRegistering?!0:null,"data-testid":"vp-signup-complete-button"}," Sign Up ",8,oe),s.isRegistering?(i(),y(k,{key:1,class:"register-loader"})):l("",!0),s.serverErrorMsg!==""?(i(),n("div",ie,p(s.serverErrorMsg),1)):l("",!0)],32)):l("",!0),s.formStep==="success"?(i(),n("div",ne," You've been sent a verification email! Please check your inbox to finish creating your account. ")):l("",!0)])]),_:1})}const Ke=x(L,[["render",ae],["__scopeId","data-v-65aebcc4"]]);export{Ke as default};

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.