"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[8954],{5303:(e,t,a)=>{a.d(t,{Ay:()=>A,ft:()=>m});var l=a(22555),n=a(85672),o=a(17488),s=a(86270),i=a(12010),r=a(56691),c=a(65908);const d="https://nominatim.openstreetmap.org/search",h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[],a=(e,a)=>{e&&t.push({long_name:e,short_name:e,types:a})};return a(e.house_number,["street_number"]),a(e.road||e.pedestrian,["route"]),a(e.suburb||e.neighbourhood||e.quarter,["sublocality_level_1","sublocality"]),a(e.city_district||e.county,["administrative_area_level_3"]),a(e.city||e.town||e.village,["locality"]),a(e.state,["administrative_area_level_1"]),a(e.country,["country"]),a(e.postcode,["postal_code"]),t},p=e=>{var t;return{formatted_address:e.display_name,name:(null===(t=e.display_name)||void 0===t?void 0:t.split(",")[0])||"",geometry:{location:{lat:()=>parseFloat(e.lat),lng:()=>parseFloat(e.lon)}},address_components:h(e.address)}},u=(e,t)=>{const a=new URLSearchParams({q:e,format:"json",addressdetails:"1",limit:"5"});if(null!==t&&void 0!==t&&t.lat&&null!==t&&void 0!==t&&t.lng){const e=.5;a.set("viewbox","".concat(t.lng-e,",").concat(t.lat+e,",").concat(t.lng+e,",").concat(t.lat-e))}return a};async function m(e){let{bias:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return null;try{const a=u(e,t);a.set("limit","1");const l=await fetch("".concat(d,"?").concat(a.toString()),{headers:{Accept:"application/json"}});if(!l.ok)return null;const n=await l.json();return null!==n&&void 0!==n&&n.length?p(n[0]):null}catch(a){return console.error("geocodeAddress error:",a),null}}const A=e=>{let{id:t,label:a,placeholder:h="Search address",value:m,onChange:A,onPlaceSelected:v,bias:x,sx:g,textFieldSx:f,fullWidth:j=!0,disabled:y,inputRef:C,TextFieldProps:b={}}=e;const[S,k]=(0,n.useState)(m||""),[W,F]=(0,n.useState)([]),[Y,w]=(0,n.useState)(!1);(0,n.useEffect)((()=>{void 0!==m&&m!==S&&k(m||"")}),[m]);const R=(0,n.useMemo)((()=>(0,r.A)(((e,t,a)=>{if(!e)return void a([]);const l=u(e,t);fetch("".concat(d,"?").concat(l.toString()),{headers:{Accept:"application/json"}}).then((e=>e.ok?e.json():[])).then((e=>a(e||[]))).catch((()=>a([])))}),500)),[]);return(0,n.useEffect)((()=>{let e=!0;return S?(w(!0),R(S,x,(t=>{e&&(w(!1),F(t))})),()=>{e=!1}):(F([]),void w(!1))}),[S,null===x||void 0===x?void 0:x.lat,null===x||void 0===x?void 0:x.lng,R]),(0,c.jsx)(o.A,{id:t,freeSolo:!0,fullWidth:j,disabled:y,sx:g,options:W,filterOptions:e=>e,getOptionLabel:e=>"string"===typeof e?e:e.display_name||"",isOptionEqualToValue:(e,t)=>e.place_id===(null===t||void 0===t?void 0:t.place_id),inputValue:S,onInputChange:(e,t)=>{k(t),null===A||void 0===A||A(t)},onChange:(e,t)=>{t&&"string"!==typeof t&&(k(t.display_name||""),null===v||void 0===v||v(p(t)))},renderInput:e=>{var t,n,o,r;return(0,c.jsx)(s.A,(0,l.A)((0,l.A)((0,l.A)({},e),b),{},{inputRef:C,label:a,placeholder:h,sx:f,autoComplete:"off",InputProps:(0,l.A)((0,l.A)((0,l.A)({},e.InputProps),b.InputProps),{},{startAdornment:null!==(t=null===(n=b.InputProps)||void 0===n?void 0:n.startAdornment)&&void 0!==t?t:e.InputProps.startAdornment,endAdornment:(0,c.jsxs)(c.Fragment,{children:[Y?(0,c.jsx)(i.A,{color:"inherit",size:16}):null,null!==(o=null===(r=b.InputProps)||void 0===r?void 0:r.endAdornment)&&void 0!==o?o:e.InputProps.endAdornment]})})}))}})}},62217:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAPnUlEQVR4AdVae3AU9R3/7d4jdyGQQKAhECBAJBSmEAtFSQUjqPgAHGlhRm0lDkWY6Tg+O9qiErR26h8WR8ZWqTMN1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cmPgu798Wv/Xz0CM3h2mdwd0wnwjn9QzatSoEJXKw1pEZeMTYxagq73w9FB7Suw8XlVVvaRi+A/yuO64bfR9t2eljL09xeEtYAOAQNhfcabrm9J/XtyGPIKn1Lp6B3X19tN6gJ/m29ymSUgKUlMzh2aEncUDmdRe1tXeaPce/dilbxgAOT99evbEQdOuHebJvsHrSC2gpec0Ky/RmNrlV3wVneHWrw427/hHc7C+k/IJEFZ1KSOjDFDIEtLmSRb1LUR94/dZeY+tVROoPDaQo1TQTS9PoSlfik4cA0B9c7mpc1z6GAByghISoZkjivI8MuVRjqEjU52DRuossXir+UJdFHcCXfW+b09VtR9tMnReoefxNJqeCbsF6R7KygL03B56N8/OWK/3tkTaNnHWa/M8zrNIru8iOik0GeADQGHFTabh0q85qL/8Kwu0xSBgTwPB6BiLGMZn83SZzmuQMAhTWz5voEeGoNcgTtWUHiqW8OO8vLww+R5lz5494UT2PBDEY9rSQqOTHAmP91TFdNGChJsyPTdlelztqcMu6i+XvNiIkBQRHlcPHGv6sUbHIKzo56J1AZBkvR5cSFhUVBR2CbD69bIpysvLecdoAHqINOytm0ijJt9J3r+TVBLHXfrGkwsiJRIMLF1i76MBEue7qE0XqTPadYiNnFen3j6Ad5HGYSDwTcslkQYGamVULLrLpH7y6dOnuY1TGctFFR0hcYfhvujinQ6eaNBgYc6sEHm+0WAKqatEWJkwYYI6depUjYhbtuWrBW775GGd1FEXFQA8FFsR8+HRMdFBKocgPrTvRkgnh4l70ijPxtwAzpLnCLpDvSztvFqQ9C8PuAPEINDeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg=="},88954:(e,t,a)=>{a.r(t),a.d(t,{default:()=>I});var l=a(22555),n=a(85672),o=a(96515),s=a(69039),i=a(76264),r=a(71392),c=a(2866),d=a(80911),h=a(48738),p=a(1939),u=a(29882),m=a(86270),A=a(51422),v=a(77865),x=a(17488),g=a(70775),f=a(65293),j=a(12557),y=a(91939),C=a(59008),b=a(66157),S=a(5303),k=a(52351),W=a(13659),F=a(46077),Y=a.n(F),w=a(94826),R=a(65908);const I=()=>{const e=(0,s.A)(),t=(0,i.A)(e.breakpoints.down("md")),a=(0,o.zy)(),[F,I]=(0,n.useState)(null),N=(0,o.Zp)(),[B,P]=(0,n.useState)(""),[T,J]=(0,n.useState)(""),[M,L]=(0,n.useState)(""),[V,E]=(0,n.useState)(""),[D,z]=(0,n.useState)({}),[K,Z]=(0,n.useState)([]),[G,H]=(0,n.useState)([]),[O,U]=(0,n.useState)([]),[q,Q]=(0,n.useState)([]),[X,_]=(0,n.useState)(),$=localStorage.getItem("userid"),[ee,te]=(0,n.useState)(!1);(0,n.useEffect)((()=>{(async e=>{try{let t=await b.A.get("https://jupiter.nearle.app/live/api/v1/partners/getriderdetail/?userid=".concat(e));console.log("riderdataresponse",t.data.details),I(t.data.details),oe(t.data.details.applocationid)}catch(t){console.log("fetchmanagerList",t)}})(a.state.riderdata.userid)}),[]),(0,n.useEffect)((()=>{console.log("riderdata",F)}),[F,B]),(0,n.useEffect)((()=>{P(a.state.riderdata.address),J(a.state.riderdata.suburb),L(a.state.riderdata.city),E(a.state.riderdata.state)}),[]),(0,n.useEffect)((()=>{localStorage.getItem("tenantid")&&ae(localStorage.getItem("tenantid")),le(),ne()}),[]),(0,n.useEffect)((()=>{D.applocationid&&oe(D.applocationid)}),[D.applocationid]);const ae=async e=>{te(!0),await b.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/tenants/gettenantinfo/?tenantid=").concat(e)).then((e=>{console.log(e),e.data.status&&setTenantinfo(e.data.details),te(!1)})).catch((e=>{console.log(e),te(!1)}))},le=async()=>{te(!0),await b.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapptypes?tag=vehicle")).then((e=>{console.log("fetchvehicle",e);let t=[];e.data.map((e=>{t.push((0,l.A)((0,l.A)({},e),{},{label:e.typename}))})),Z([...t]),te(!1)})).catch((e=>{console.log(e),te(!1)}))},ne=async()=>{te(!0),await b.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getapptypes?tag=accounttype")).then((e=>{console.log(e);let t=[];e.data.map((e=>{t.push((0,l.A)((0,l.A)({},e),{},{label:e.typename}))})),H([...t]),console.log(t),te(!1)})).catch((e=>{console.log(e),te(!1)}))};(0,n.useEffect)((()=>{(async()=>{try{const e=await b.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat($));console.log("fetchAppLocations",e.data.details),U(e.data.details)}catch(e){console.log("locationRes",e)}})()}),[]);const oe=async e=>{te(!0),await b.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getridershifts/?applocationid=").concat(e)).then((e=>{console.log("fetchridershifts",e);let t=[];e.data.details.map((e=>{t.push((0,l.A)((0,l.A)({},e),{},{label:e.shiftname}))})),Q([...t]),console.log(t),te(!1)})).catch((e=>{console.log(e),te(!1)}))};(0,n.useEffect)((()=>{selectedImage&&setAvatar(URL.createObjectURL(selectedImage))}),[selectedImage]);return(0,R.jsxs)(R.Fragment,{children:[ee&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(k.A,{}),(0,R.jsx)(w.A,{})]}),(0,R.jsx)(C.A,{title:(0,R.jsxs)(r.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"stretch",sm:"center"},spacing:{xs:1.5,sm:0},sx:{backgroundColor:"secondary.lighter",width:"100%",height:"100%",p:2},children:[(0,R.jsx)(c.A,{variant:"h3",children:"Edit Rider "}),(0,R.jsx)(d.A,{startIcon:(0,R.jsx)(g.A,{}),variant:"outlined",fullWidth:t,onClick:()=>{I(null),N("/nearle/riders")},children:"Back to Riders"})]}),children:(0,R.jsx)(h.A,{sx:{maxHeight:"calc(100vh - 280px)",overflowY:"auto",overflowX:"hidden",scrollbarGutter:"stable",scrollBehavior:"smooth"},children:(0,R.jsxs)(r.A,{display:"flex",spacing:{xs:2.5,sm:5},children:[(0,R.jsx)(C.A,{title:(0,R.jsx)(c.A,{variant:"h4",sx:{m:2},children:"Contact Information"}),children:(0,R.jsxs)(p.Ay,{container:!0,spacing:{xs:2,sm:3},children:[(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-last-name",children:"First Name"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-last-name",value:null===F||void 0===F?void 0:F.firstname,onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{firstname:e.target.value}))},placeholder:"Name",autoComplete:"off"})]})}),(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-last-name",children:"Last Name"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-last-name",placeholder:"Name",onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{lastname:e.target.value}))},value:null===F||void 0===F?void 0:F.lastname,autoComplete:"off"})]})}),(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-phone",children:"Phone Number"}),(0,R.jsxs)(r.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[(0,R.jsx)(A.A,{defaultValue:"+1",disabled:!0,sx:{cursor:"not-allowed"},children:(0,R.jsx)(v.A,{value:"+1",children:"+91"})}),(0,R.jsx)(m.A,{type:"number",id:"personal-phone",fullWidth:!0,placeholder:"Phone Number",onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{contactno:e.target.value}))},value:null===F||void 0===F?void 0:F.contactno,autoComplete:"off",sx:{cursor:"not-allowed"}})]})]})})," ",(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-email",children:"Email Address"}),(0,R.jsx)(m.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Email Address",onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{email:e.target.value}))},value:null===F||void 0===F?void 0:F.email,autoComplete:"off"})]})}),(0,R.jsx)(p.Ay,{item:!0,xs:12,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-address",children:"Address"}),(0,R.jsx)(S.Ay,{id:"personal-address",fullWidth:!0,placeholder:"Address",value:B,onChange:P,onPlaceSelected:e=>{let t,a,l;P(e.formatted_address);for(let n=0;n{I((0,l.A)((0,l.A)({},F),{},{suburb:e.target.value})),J(e.target.value)},value:T,autoComplete:"off"})]})}),(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-zipcode",children:"City"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-zipcode",placeholder:"City",onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{city:e.target.value})),L(e.target.value)},value:M,autoComplete:"off"})]})}),(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"State"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"State",onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{state:e.target.value})),E(e.target.value)},value:V,autoComplete:"off"})]})}),(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Identification No"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Identification No",onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{identificationno:e.target.value}))},value:null===F||void 0===F?void 0:F.identificationno,autoComplete:"off"})]})}),(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Choose Partner"}),(0,R.jsx)(x.A,{disablePortal:!0,id:"combo-box-demo",options:O,getOptionLabel:e=>"".concat(e.locationname),sx:{width:{xs:"100%",sm:300},height:"30px",ml:{xs:0,sm:3},zIndex:"100"},onChange:(e,t)=>{t?(console.log(t),_(t.locationname),oe(t.applocationid),I((0,l.A)((0,l.A)({},F),{},{partnerid:t.partnerid,applocationid:t.applocationid}))):z({})},renderInput:e=>(0,R.jsx)(m.A,(0,l.A)((0,l.A)({},e),{},{label:X||(null===F||void 0===F?void 0:F.city)}))})]})})]})}),(0,R.jsx)(C.A,{title:(0,R.jsx)(c.A,{variant:"h4",sx:{m:2},children:"Charges"}),children:(0,R.jsxs)(p.Ay,{container:!0,spacing:{xs:2,sm:3},children:[(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Shift Type"}),(0,R.jsx)(x.A,{renderInput:e=>(0,R.jsx)(m.A,(0,l.A)((0,l.A)({},e),{},{label:null!==F&&void 0!==F&&F.starttime&&null!==F&&void 0!==F&&F.endtime?"".concat(null===F||void 0===F?void 0:F.starttime," - ").concat(null===F||void 0===F?void 0:F.endtime):"Choose"})),options:q,onChange:(e,t)=>{t?(console.log("shift",t),I((0,l.A)((0,l.A)({},F),{},{shiftid:t.shiftid,additionalkm:t.additionalkm,additionalcharges:t.additionalcharges,basefare:t.basefare,starttime:t.starttime,endtime:t.endtime})),setBasefare(t.basefare),setAdditionalkms(t.additionalkm),setOthercharges(t.additionalcharges),setShift(t)):(setBasefare(""),setAdditionalkms(""),setOthercharges(""),setShift({}))},freeSolo:!0})]})}),(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Base Fare"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Base Fare",onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{basefare:e.target.value})),setBasefare(e.target.value)},value:null===F||void 0===F?void 0:F.basefare,autoComplete:"off",disabled:!0})]})}),(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Additional Kms"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Additional Kms",onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{additionalkm:e.target.value})),setAdditionalkms(e.target.value)},value:null===F||void 0===F?void 0:F.additionalkm,autoComplete:"off",disabled:!0})]})}),(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Other Charges"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Other Charges",onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{additionalcharges:e.target.value})),setOthercharges(e.target.value)},value:null===F||void 0===F?void 0:F.additionalcharges,autoComplete:"off",disabled:!0})]})})]})}),(0,R.jsx)(C.A,{title:(0,R.jsx)(c.A,{variant:"h4",sx:{m:2},children:"Bank Details"}),children:(0,R.jsxs)(p.Ay,{container:!0,spacing:{xs:2,sm:3},children:[" ",(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Account No"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Account No",value:null===F||void 0===F?void 0:F.accountno,onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{accountno:e.target.value})),setAccountno(e.target.value)},autoComplete:"off"})]})})," ",(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Account Name"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Account Name",value:null===F||void 0===F?void 0:F.accountname,onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{accountname:e.target.value})),setAccountname(e.target.value)},autoComplete:"off"})]})})," ",(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Account Type"}),(0,R.jsx)(x.A,{renderInput:e=>(0,R.jsx)(m.A,(0,l.A)((0,l.A)({},e),{},{label:""==(null===F||void 0===F?void 0:F.accounttype)?"Choose":null===F||void 0===F?void 0:F.accounttype})),options:G,onChange:(e,t)=>{console.log("ac type",t),t?(I((0,l.A)((0,l.A)({},F),{},{accounttype:t.label})),setAccount(t),setAccountType(t.label)):setAccount({})},freeSolo:!0})]})})," ",(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Bank Name"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Bank Name",value:null===F||void 0===F?void 0:F.bankname,onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{bankname:e.target.value})),setBankname(e.target.value)},autoComplete:"off"})]})})," ",(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"IFSC Code"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"IFSC Code",value:null===F||void 0===F?void 0:F.ifsccode,onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{ifsccode:e.target.value})),setIfsc(e.target.value)},autoComplete:"off"})]})}),(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Branch"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Branch",value:null===F||void 0===F?void 0:F.branch,onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{branch:e.target.value})),setBranch(e.target.value)},autoComplete:"off"})]})})]})}),(0,R.jsx)(C.A,{title:(0,R.jsx)(c.A,{variant:"h4",sx:{m:2},children:"Vehicle Details"}),children:(0,R.jsxs)(p.Ay,{container:!0,spacing:{xs:2,sm:3},children:[(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Vehicle Name"}),(0,R.jsx)(x.A,{renderInput:e=>(0,R.jsx)(m.A,(0,l.A)((0,l.A)({},e),{},{label:""==(null===F||void 0===F?void 0:F.vehiclename)?"Choose":null===F||void 0===F?void 0:F.vehiclename})),options:K,onChange:(e,t)=>{t?(console.log("vehi",t),setVehicle(t),I((0,l.A)((0,l.A)({},F),{},{vehiclename:t.label,vehicleid:t.apptypeid}))):setVehicle({})},freeSolo:!0})]})})," ",(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Vehicle No"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Vehicle No",onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{vehicleno:e.target.value}))},value:null===F||void 0===F?void 0:F.vehicleno,autoComplete:"off"})]})})," ",(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Model Year"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Model Year",onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{model:e.target.value})),setModelyear(e.target.value)},value:null===F||void 0===F?void 0:F.model,autoComplete:"off"})]})})," ",(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Vehicle Color"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Vehicle Color",onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{color:e.target.value})),setVehiclecolor(e.target.value)},value:null===F||void 0===F?void 0:F.color,autoComplete:"off"})]})})," ",(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"License No"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"License No",onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{licenseno:e.target.value}))},value:null===F||void 0===F?void 0:F.licenseno,autoComplete:"off"})]})})," ",(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Insurance No"}),(0,R.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Insurance No",onChange:e=>{I((0,l.A)((0,l.A)({},F),{},{insuranceno:e.target.value}))},value:null===F||void 0===F?void 0:F.insuranceno,autoComplete:"off"})]})})," ",(0,R.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,R.jsxs)(r.A,{spacing:1.25,children:[(0,R.jsx)(u.A,{htmlFor:"personal-location",children:"Insurance Expiry Date"}),(0,R.jsx)(f.$,{dateAdapter:j.R,children:(0,R.jsx)(y.l,{label:"Date",value:Y()(null===F||void 0===F?void 0:F.insurancedate),onChange:e=>{setExpirydate(Y()(e.$d).format("YYYY-MM-DD 00:00:00")),I((0,l.A)((0,l.A)({},F),{},{insurancedate:Y()(e.$d).format("YYYY-MM-DD 00:00:00")}))},sx:{width:"100%"}})})]})})]})})]})})}),(0,R.jsx)(h.A,{sx:{position:"sticky",bottom:0,backgroundColor:"secondary.lighter",p:2,zIndex:10,border:" 1px solid ",borderColor:"#E6EBF1",borderTop:"none"},children:(0,R.jsxs)(r.A,{direction:{xs:"column-reverse",sm:"row"},justifyContent:"flex-end",spacing:2,children:[(0,R.jsx)(d.A,{startIcon:(0,R.jsx)(g.A,{}),variant:"outlined",fullWidth:t,onClick:()=>N("/nearle/riders"),children:"Back to Riders"}),(0,R.jsx)(d.A,{variant:"contained",fullWidth:t,onClick:()=>{(async()=>{te(!0),console.log("updated riderData",F),await b.A.put("https://jupiter.nearle.app/live/api/v1/partners/updaterider",{userid:F.userid,contactno:F.contactno,firstname:F.firstname,lastname:F.lastname,email:F.email,address:F.address,suburb:F.suburb,city:F.city,state:F.state,partnerid:F.partnerid,applocationid:F.applocationid,ridersettings:{riderid:F.riderid,userid:F.userid,partnerid:F.partnerid,shiftid:F.shiftid,identificationno:F.identificationno,basefare:F.basefare,additionalkm:F.additionalkm,othercharges:F.othercharges,accountno:F.accountno,accountname:F.accountname,accounttypeid:F.accounttypeid,accounttype:F.accounttype,bankname:F.bankname,ifsccode:F.ifsccode,Branch:F.branch,vehicleid:F.vehicleid,vehiclename:F.vehiclename,vehicleno:F.vehicleno,model:F.model,color:F.color,licenseno:F.licenseno,insurancedate:Y()(F.insurancedate).format("YYYY-MM-DD HH:mm:ss")}}).then((e=>{console.log("post response",e),200==e.status?((0,W.M8)("Updated Sucessfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),I(null),N("/nearle/riders"),te(!1)):((0,W.M8)("Update Failed",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),te(!1))}))})()},children:"Update"})]})})]})}},94826:(e,t,a)=>{a.d(t,{A:()=>c});var l=a(60308),n=a(12010),o=a(62217),s=a(65908);const i=(0,l.Ay)("div")((()=>({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2001,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.7)",padding:"20px",borderRadius:"10px"}))),r=(0,l.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),c=()=>(0,s.jsxs)(i,{children:[(0,s.jsx)(n.A,{color:"primary",size:80,thickness:6}),(0,s.jsx)(r,{children:(0,s.jsx)("img",{src:o,alt:"Logo",style:{width:"100%",height:"100%"}})})]})}}]);