PageSourceSearch

https://erepair.boschtools.com/build/assets/profile.page-e0d0734d.js

js boschtools.com collected 2026-09-24 17:09:45 UTC 11,786 bytes, 1 lines download raw bytes

1import{J as s,r as f,u as v,L as B,a as E,j as e,I as m,d as H}from"./app-f32844f3.js";import{N as T}from"./navigation.component-d132ff1f.js";import{B as F}from"./breadcrumbs.component-e2469e6c.js";import{s as A}from"./form-errors.helper-84d39365.js";import{S as u}from"./select.component-b1a0da11.js";import{s as z}from"./urls.helper-556b1d3d.js";import{A as D}from"./Alert-eb1668b9.js";import"./index-dcbb4fba.js";const i={first_name:{"string.empty":"You need to fill this input!","string.max":"First Name must be at most 300 characters long!"},last_name:{"string.empty":"You need to fill this input!","string.max":"Last Name must be at most 300 characters long!"},company_name:{"string.max":"Company Name must be at most 300 characters long!"},phone:{"string.empty":"You need to fill this input!","string.max":"Telephone must be at most 300 characters long!"},po_ref_no:{"string.max":"P.O./Ref. Number must be at most 100 characters long!"},provantage_number:{"string.max":"ProVantage Number must be at most 100 characters long!"},occupation:{"string.max":"Trade/Occupation must be at most 300 characters long!"},address_type:{"string.empty":"You need to fill this input!"},home_street:{"string.empty":"You need to fill this input!","string.max":"Street must be at most 200 characters long!"},home_city:{"string.empty":"You need to fill this input!","string.max":"City must be at most 100 characters long!"},home_zip:{"string.empty":"You need to fill this input!","string.max":"Zip must be at most 100 characters long!"},home_country:{"string.empty":"You need to fill this input!","string.max":"Country must be at most 100 characters long!"},home_province:{"string.empty":"You need to fill this input!","string.max":"Country must be at most 200 characters long!"},business_street:{"string.empty":"You need to fill this input!","string.max":"Street must be at most 200 characters long!"},business_city:{"string.empty":"You need to fill this input!","string.max":"City must be at most 100 characters long!"},business_zip:{"string.empty":"You need to fill this input!","string.max":"Zip must be at most 100 characters long!"},business_country:{"string.empty":"You need to fill this input!","string.max":"Country must be at most 100 characters long!"},business_province:{"string.empty":"You need to fill this input!","string.max":"Country must be at most 200 characters long!"}},O=s.object({first_name:s.string().required().max(300).messages(i.first_name),last_name:s.string().required().max(300).messages(i.last_name),company_name:s.string().allow("").max(300).messages(i.company_name),telephone:s.string().required().max(300).messages(i.phone),po_ref_no:s.string().allow("").max(100).messages(i.po_ref_no),provantage_number:s.string().allow("").max(100).messages(i.po_ref_no),occupation:s.string().allow("").max(300).messages(i.occupation),address_type:s.string().required().allow("Home","Business").messages(i.address_type),home_street:s.string().max(200).when("address_type",{is:"Home",then:s.required(),otherwise:s.allow("")}).messages(i.home_street),home_city:s.string().max(100).when("address_type",{is:"Home",then:s.required(),otherwise:s.allow("")}).messages(i.home_city),home_zip:s.string().max(100).when("address_type",{is:"Home",then:s.required(),otherwise:s.allow("")}).messages(i.home_zip),home_country:s.string().max(100).when("address_type",{is:"Home",then:s.required(),otherwise:s.allow("")}).messages(i.home_country),home_province:s.string().max(200).when("address_type",{is:"Home",then:s.required(),otherwise:s.allow("")}).messages(i.home_province),business_street:s.string().max(200).when("address_type",{is:s.equal("Business"),then:s.required(),otherwise:s.allow("")}).messages(i.business_street),business_city:s.string().max(100).when("address_type",{is:"Business",then:s.required(),otherwise:s.allow("")}).messages(i.business_city),business_zip:s.string().max(100).when("address_type",{is:"Business",then:s.required(),otherwise:s.allow("")}).messages(i.business_zip),business_country:s.string().max(100).when("address_type",{is:"Business",then:s.required(),otherwise:s.allow("")}).messages(i.business_country),business_province:s.string().max(200).when("address_type",{is:"Business",then:s.required(),otherwise:s.allow("")}).messages(i.business_province)}),U=(n,c)=>{f.useEffect(()=>{var l;c&&((l=document.querySelector(n))==null||l.scrollIntoView({behavior:"smooth"}))},[c])},L=()=>{var t,x,_,o,b,y,r,C,q,S,P;const n=v().customer,{updateProfileUrl:c}=v(),{setOverlay:l}=f.useContext(B),{data:j,setData:N,getError:d,post:g,wasSuccessful:h,prevalidated:w,processing:p}=E({first_name:n.first_name,last_name:n.last_name,company_name:n.company_name||"",telephone:n.telep
1hone||"",po_ref_no:n.po_ref_no||"",provantage_number:n.provantage_number||"",occupation:n.occupation||"",address_type:((t=n.home_address)==null?void 0:t.address_type)||"Home",home_street:((x=n.home_address)==null?void 0:x.street)||"",home_city:((_=n.home_address)==null?void 0:_.city)||"",home_province:((o=n.home_address)==null?void 0:o.province)||"",home_zip:((b=n.home_address)==null?void 0:b.zip)||"",home_country:((y=n.home_address)==null?void 0:y.country)||"",business_street:((r=n.business_address)==null?void 0:r.street)||"",business_city:((C=n.business_address)==null?void 0:C.city)||"",business_province:((q=n.business_address)==null?void 0:q.province)||"",business_zip:((S=n.business_address)==null?void 0:S.zip)||"",business_country:((P=n.business_address)==null?void 0:P.country)||""},O),a=Y=>{Y.preventDefault(),g(c,{preserveScroll:!0,errorBag:"profile-form",onError:()=>A()})};return f.useEffect(()=>l(p),[p]),U(".profile-form",h),{data:j,setData:N,getError:d,handleSubmit:a,wasSuccessful:h,prevalidated:w,processing:p}},I=()=>{const n=v().customer,[c,l]=f.useState(!1),{occupations:j,addressTypes:N,countries:d,canadaProvinces:g,unitedStatesProvinces:h,resetPasswordUrl:w,showDashboardUrl:p}=v(),{data:a,setData:t,handleSubmit:x,wasSuccessful:_,getError:o,prevalidated:b,processing:y}=L();return f.useEffect(()=>l(_),[_]),e.jsxs("div",{className:"profile-form",children:[e.jsx("h1",{children:"Update Profile"}),c&&e.jsx(D,{variant:"success",onClose:()=>l(!1),dismissible:!0,children:"Your profile has been updated successfully."}),e.jsxs("div",{className:"profile-box",children:[e.jsx("h2",{children:"Personal information"}),e.jsxs("form",{children:[e.jsx("div",{className:"personal-info-section",children:e.jsxs("div",{className:"form-grid",children:[e.jsxs("div",{className:"form-column",children:[e.jsx("div",{className:"form-field",children:e.jsx(m,{label:"First Name",value:a.first_name,onChange:r=>t("first_name",r),error:o("first_name"),name:"first_name",required:!0})}),e.jsx("div",{className:"form-field",children:e.jsx(m,{label:"Last Name",value:a.last_name,onChange:r=>t("last_name",r),error:o("last_name"),name:"last_name",required:!0})}),e.jsx("div",{className:"form-field",children:e.jsx(m,{label:"Login",value:n.email,name:"login",readonly:!0})}),e.jsx("div",{className:"form-field",children:e.jsx(m,{label:"Email Address",value:n.email,name:"email",readonly:!0})}),e.jsx("div",{className:"form-field",children:e.jsx(m,{label:"Bosch Account No.",value:n.profile_id||"",name:"profile_id",readonly:!0})})]}),e.jsxs("div",{className:"form-column",children:[e.jsxs("div",{className:"form-field",children:[e.jsx(u,{label:"Trade/Occupation",options:j,value:a.occupation,onChange:r=>t("occupation",r),error:o("occupation"),name:"occupation"}),e.jsx(m,{label:"Company Name",value:a.company_name,onChange:r=>t("company_name",r),error:o("company_name"),name:"company_name"})]}),e.jsx("div",{className:"form-field",children:e.jsx(m,{label:"Telephone",value:a.telephone,onChange:r=>t("telephone",r),error:o("telephone"),name:"telephone",required:!0})}),e.jsx("div",{className:"form-field",children:e.jsx(m,{label:"P.O./Ref. Number",value:a.po_ref_no,onChange:r=>t("po_ref_no",r),error:o("po_ref_no"),name:"po_ref_no"})}),e.jsx("div",{className:"form-field",children:e.jsx(m,{label:"ProVantage Number",value:a.provantage_number,onChange:r=>t("provantage_number",r),error:o("provantage_number"),name:"provantage_number"})})]})]})}),e.jsx("h2",{children:"Address"}),e.jsxs("div",{className:"address-section",children:[e.jsx("div",{className:"form-grid",children:e.jsx("div",{className:"form-column",children:e.jsx("div",{className:"form-field",children:e.jsx(u,{label:"Select address type",options:N,value:a.address_type,onCh
1ange:r=>t("address_type",r),name:"address_type",required:!0})})})}),a.address_type==="Home"&&e.jsx("div",{className:"home-address-section",children:e.jsxs("div",{className:"form-grid",children:[e.jsxs("div",{className:"form-column",children:[e.jsx("div",{className:"form-field",children:e.jsx(m,{label:"Street address",value:a.home_street,onChange:r=>t("home_street",r),error:o("home_street"),name:"home_street",required:!0})}),e.jsx("div",{className:"form-field",children:e.jsx(m,{label:"City",value:a.home_city,onChange:r=>t("home_city",r),error:o("home_city"),name:"home_city",required:!0})}),e.jsx("div",{className:"form-field",children:e.jsx(m,{label:"Zip / Postal Code",value:a.home_zip,onChange:r=>t("home_zip",r),error:o("home_zip"),name:"home_zip",required:!0})})]}),e.jsx("div",{className:"form-column",children:e.jsxs("div",{className:"form-field",children:[e.jsx("div",{className:"form-field",children:e.jsx(u,{label:"Country",options:d,value:a.home_country,onChange:r=>t("home_country",r),error:o("home_country"),name:"home_country",required:!0})}),e.jsx("div",{className:"form-field",children:e.jsx(u,{label:"State / Province / Territory",options:a.home_country===d.Canada?g:h,value:a.home_province,onChange:r=>t("home_province",r),error:o("home_province"),name:"home_province",required:!0,disabled:!a.home_country})})]})})]})}),a.address_type==="Business"&&e.jsx("div",{className:"business-address-section",children:e.jsxs("div",{className:"form-grid",children:[e.jsxs("div",{className:"form-column",children:[e.jsx("div",{className:"form-field",children:e.jsx(m,{label:"Street address",value:a.business_street,onChange:r=>t("business_street",r),error:o("business_street"),name:"business_street",required:!0})}),e.jsx("div",{className:"form-field",children:e.jsx(m,{label:"City",value:a.business_city,onChange:r=>t("business_city",r),error:o("business_city"),name:"business_city",required:!0})}),e.jsx("div",{className:"form-field",children:e.jsx(m,{label:"Zip / Postal Code",value:a.business_zip,onChange:r=>t("business_zip",r),error:o("business_zip"),name:"zip",required:!0})})]}),e.jsx("div",{className:"form-column",children:e.jsxs("div",{className:"form-field",children:[e.jsx("div",{className:"form-field",children:e.jsx(u,{label:"Country",options:d,value:a.business_country,onChange:r=>t("business_country",r),error:o("business_country"),name:"business_country",required:!0})}),e.jsx("div",{className:"form-field",children:e.jsx(u,{label:"State / Province / Territory",options:a.business_country===d.Canada?g:h,value:a.business_province,onChange:r=>t("business_province",r),error:o("business_province"),name:"province",required:!0,disabled:!a.business_country})})]})})]})})]}),e.jsx("h2",{children:"Change Bosch ID information"}),e.jsx("div",{className:"reset-password-section",children:e.jsx("a",{href:z(w),className:"secondary-btn",children:"Reset your password"})}),e.jsxs("div",{className:"ctas-section",children:[e.jsx(H,{href:z(p),className:"secondary-btn",children:"Dashboard"}),e.jsx("button",{disabled:!b||y,onClick:x,className:"primary-btn",children:"Update Profile"})]})]})]})]})};function M(){return e.jsxs(e.Fragment,{children:[e.jsx(F,{breadcrumb:"Update Profile"}),e.jsx(T,{}),e.jsx("div",{className:"profile-container",children:e.jsx("div",{className:"profile-wrapper",children:e.jsx(I,{})})})]})}export{M 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.