Files
Express_console_build/build/static/js/8954.4813af23.chunk.js

1 line
24 KiB
JavaScript

"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[8954],{62217:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAPnUlEQVR4AdVae3AU9R3/7d4jdyGQQKAhECBAJBSmEAtFSQUjqPgAHGlhRm0lDkWY6Tg+O9qiErR26h8WR8ZWqTMN1ur4qMpDrTyjtDwDJloeCYiBvAgkaZ53l7vb3X4/v9vfZS/Zu9uFwLSfmb3d293f7u/z+z5/399K7CphdW5JrupgBZosZ0ialmu8pklSjUOTamRJbvvjqTUV7CpAYlcIj+SWZHQ55WJZlm7UNK2IXpRhpZ3GWJskSWXUZrPD4Sp77eSva9gVwIATXz35+SJNYWs1phWxAYDEpDKVaZv+fOrZUjaAGDDiK695rpgetpYOc82upw72sMycdJbz/SzmHeKl/ynRay31bbS1s7rjTczXGYj3ihrShnUDNQCXTXzlNS8UyExdbybhSdeNYwXz81nBzflE2pKms7oT51ntiSa276NKVn3wrNktNcGQelNpTUkNuwxcFvFV+S88rKnKy8ZzkOz84uvYvOJZ/PhyAE3Y/+HXbN+HFVwjjJAlR8lr1WueY9wt2MclEYfj8rnkj+nwRnHOLuGWhnbmpfuMKh/3Xn0Atm74IuY8OcGPFYk99kbVM98xm7BFnDyttHLyb3MlRdsjSWycOA+VLv79YpY5Ork6V5efY59s/JJVHznH/+dMymLz7v0Rm71oWtK2GIDSJ7ew6kMxJlCjytI8u+Qddm4+93bPBIfqiiG96KG5RPouljokuZT3b/2avf7EB6ylsZ1dM2MsG5OfxU7RAFSWVbMAObUphRMTtsc7CpdMh6c3kqe8gN117Yh5W4627GljFmGZ+C/ynx/flzSkDPW2Aqj2+lV/Y5mj0tljG3/GFhQXspkLpnBJVx85yyq/OGWJPAANgzkd2/utOMXJzxp965vlF3YFrPRHZtYgSZq6vi/p2TT6VrF+1Vt8/yiRhnoLiI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vFqQ9C8PuAPEINDeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg=="},88954:(e,a,t)=>{t.r(a),t.d(a,{default:()=>T});var l=t(89379),n=t(9950),o=t(28429),s=t(14857),i=t(47223),r=t(93230),c=t(82053),d=t(82223),h=t(16491),p=t(60899),A=t(19647),m=t(29925),u=t(70006),x=t(23266),g=t(77922),v=t(63189),j=t(81831),f=t(95359),y=t(30633),C=t(50027),b=t(26910),S=t(56713),k=t(52351),W=t(99459),Y=t(8881),F=t(4159),N=t.n(F),R=t(94826),B=t(44414);const T=()=>{const e=(0,s.A)(),a=(0,i.A)(e.breakpoints.down("md")),t=(0,o.zy)(),[F,T]=(0,n.useState)(null),w=(0,o.Zp)(),[I,J]=(0,n.useState)(""),[M,P]=(0,n.useState)(""),[z,D]=(0,n.useState)(""),[K,L]=(0,n.useState)(""),[V,H]=(0,n.useState)({}),[E,Z]=(0,n.useState)([]),[G,U]=(0,n.useState)([]),[q,O]=(0,n.useState)([]),[Q,X]=(0,n.useState)([]),[_,$]=(0,n.useState)(),ee=localStorage.getItem("userid");W.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const[ae,te]=(0,n.useState)(!1);(0,n.useEffect)((()=>{(async e=>{try{let a=await b.A.get("https://jupiter.nearle.app/live/api/v1/partners/getriderdetail/?userid=".concat(e));console.log("riderdataresponse",a.data.details),T(a.data.details),se(a.data.details.applocationid)}catch(a){console.log("fetchmanagerList",a)}})(t.state.riderdata.userid)}),[]),(0,n.useEffect)((()=>{console.log("riderdata",F)}),[F,I]),(0,n.useEffect)((()=>{J(t.state.riderdata.address),P(t.state.riderdata.suburb),D(t.state.riderdata.city),L(t.state.riderdata.state)}),[]),(0,n.useEffect)((()=>{localStorage.getItem("tenantid")&&le(localStorage.getItem("tenantid")),ne(),oe()}),[]),(0,n.useEffect)((()=>{V.applocationid&&se(V.applocationid)}),[V.applocationid]);const le=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)}))},ne=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 a=[];e.data.map((e=>{a.push((0,l.A)((0,l.A)({},e),{},{label:e.typename}))})),Z([...a]),te(!1)})).catch((e=>{console.log(e),te(!1)}))},oe=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 a=[];e.data.map((e=>{a.push((0,l.A)((0,l.A)({},e),{},{label:e.typename}))})),U([...a]),console.log(a),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(ee));console.log("fetchAppLocations",e.data.details),O(e.data.details)}catch(e){console.log("locationRes",e)}})()}),[]);const se=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 a=[];e.data.details.map((e=>{a.push((0,l.A)((0,l.A)({},e),{},{label:e.shiftname}))})),X([...a]),console.log(a),te(!1)})).catch((e=>{console.log(e),te(!1)}))};(0,n.useEffect)((()=>{selectedImage&&setAvatar(URL.createObjectURL(selectedImage))}),[selectedImage]);const{ref:ie}=(0,S.usePlacesWidget)({apiKey:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",onPlaceSelected:e=>{let a,t,l,n;console.log(e),J(e.formatted_address);for(let o=0;o<e.address_components.length;o++)for(let s=0;s<e.address_components[o].types.length;s++)switch(e.address_components[o].types[s]){case"locality":a=e.address_components[o].long_name;break;case"administrative_area_level_1":l=e.address_components[o].long_name;break;case"postal_code":t=e.address_components[o].long_name;break;case"sublocality":n=e.address_components[o].long_name}D(a||""),L(l||""),setZipcode(t||""),P(n||"")},options:{types:["address"]}});return(0,B.jsxs)(B.Fragment,{children:[ae&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(k.A,{}),(0,B.jsx)(R.A,{})]}),(0,B.jsx)(C.A,{title:(0,B.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,B.jsx)(c.A,{variant:"h3",children:"Edit Rider "}),(0,B.jsx)(d.A,{startIcon:(0,B.jsx)(v.A,{}),variant:"outlined",fullWidth:a,onClick:()=>{T(null),w("/nearle/riders")},children:"Back to Riders"})]}),children:(0,B.jsx)(h.A,{sx:{maxHeight:"calc(100vh - 280px)",overflowY:"auto",overflowX:"hidden",scrollbarGutter:"stable",scrollBehavior:"smooth"},children:(0,B.jsxs)(r.A,{display:"flex",spacing:{xs:2.5,sm:5},children:[(0,B.jsx)(C.A,{title:(0,B.jsx)(c.A,{variant:"h4",sx:{m:2},children:"Contact Information"}),children:(0,B.jsxs)(p.Ay,{container:!0,spacing:{xs:2,sm:3},children:[(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-last-name",children:"First Name"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-last-name",value:null===F||void 0===F?void 0:F.firstname,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{firstname:e.target.value}))},placeholder:"Name",autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-last-name",children:"Last Name"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-last-name",placeholder:"Name",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{lastname:e.target.value}))},value:null===F||void 0===F?void 0:F.lastname,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-phone",children:"Phone Number"}),(0,B.jsxs)(r.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[(0,B.jsx)(u.A,{defaultValue:"+1",disabled:!0,sx:{cursor:"not-allowed"},children:(0,B.jsx)(x.A,{value:"+1",children:"+91"})}),(0,B.jsx)(m.A,{type:"number",id:"personal-phone",fullWidth:!0,placeholder:"Phone Number",onChange:e=>{T((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,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-email",children:"Email Address"}),(0,B.jsx)(m.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Email Address",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{email:e.target.value}))},value:null===F||void 0===F?void 0:F.email,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-address",children:"Address"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-address",placeholder:"Address",value:I,onChange:e=>{J(e.target.value)},inputRef:ie})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Location"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Location",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{suburb:e.target.value})),P(e.target.value)},value:M,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-zipcode",children:"City"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-zipcode",placeholder:"City",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{city:e.target.value})),D(e.target.value)},value:z,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"State"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"State",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{state:e.target.value})),L(e.target.value)},value:K,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Identification No"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Identification No",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{identificationno:e.target.value}))},value:null===F||void 0===F?void 0:F.identificationno,autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Choose Partner"}),(0,B.jsx)(g.A,{disablePortal:!0,id:"combo-box-demo",options:q,getOptionLabel:e=>"".concat(e.locationname),sx:{width:{xs:"100%",sm:300},height:"30px",ml:{xs:0,sm:3},zIndex:"100"},onChange:(e,a)=>{a?(console.log(a),$(a.locationname),se(a.applocationid),T((0,l.A)((0,l.A)({},F),{},{partnerid:a.partnerid,applocationid:a.applocationid}))):H({})},renderInput:e=>(0,B.jsx)(m.A,(0,l.A)((0,l.A)({},e),{},{label:_||(null===F||void 0===F?void 0:F.city)}))})]})})]})}),(0,B.jsx)(C.A,{title:(0,B.jsx)(c.A,{variant:"h4",sx:{m:2},children:"Charges"}),children:(0,B.jsxs)(p.Ay,{container:!0,spacing:{xs:2,sm:3},children:[(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Shift Type"}),(0,B.jsx)(g.A,{renderInput:e=>(0,B.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,a)=>{a?(console.log("shift",a),T((0,l.A)((0,l.A)({},F),{},{shiftid:a.shiftid,additionalkm:a.additionalkm,additionalcharges:a.additionalcharges,basefare:a.basefare,starttime:a.starttime,endtime:a.endtime})),setBasefare(a.basefare),setAdditionalkms(a.additionalkm),setOthercharges(a.additionalcharges),setShift(a)):(setBasefare(""),setAdditionalkms(""),setOthercharges(""),setShift({}))},freeSolo:!0})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Base Fare"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Base Fare",onChange:e=>{T((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,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Additional Kms"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Additional Kms",onChange:e=>{T((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,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Other Charges"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Other Charges",onChange:e=>{T((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,B.jsx)(C.A,{title:(0,B.jsx)(c.A,{variant:"h4",sx:{m:2},children:"Bank Details"}),children:(0,B.jsxs)(p.Ay,{container:!0,spacing:{xs:2,sm:3},children:[" ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Account No"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Account No",value:null===F||void 0===F?void 0:F.accountno,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{accountno:e.target.value})),setAccountno(e.target.value)},autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Account Name"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Account Name",value:null===F||void 0===F?void 0:F.accountname,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{accountname:e.target.value})),setAccountname(e.target.value)},autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Account Type"}),(0,B.jsx)(g.A,{renderInput:e=>(0,B.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,a)=>{console.log("ac type",a),a?(T((0,l.A)((0,l.A)({},F),{},{accounttype:a.label})),setAccount(a),setAccountType(a.label)):setAccount({})},freeSolo:!0})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Bank Name"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Bank Name",value:null===F||void 0===F?void 0:F.bankname,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{bankname:e.target.value})),setBankname(e.target.value)},autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"IFSC Code"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"IFSC Code",value:null===F||void 0===F?void 0:F.ifsccode,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{ifsccode:e.target.value})),setIfsc(e.target.value)},autoComplete:"off"})]})}),(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Branch"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Branch",value:null===F||void 0===F?void 0:F.branch,onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{branch:e.target.value})),setBranch(e.target.value)},autoComplete:"off"})]})})]})}),(0,B.jsx)(C.A,{title:(0,B.jsx)(c.A,{variant:"h4",sx:{m:2},children:"Vehicle Details"}),children:(0,B.jsxs)(p.Ay,{container:!0,spacing:{xs:2,sm:3},children:[(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Vehicle Name"}),(0,B.jsx)(g.A,{renderInput:e=>(0,B.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:E,onChange:(e,a)=>{a?(console.log("vehi",a),setVehicle(a),T((0,l.A)((0,l.A)({},F),{},{vehiclename:a.label,vehicleid:a.apptypeid}))):setVehicle({})},freeSolo:!0})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Vehicle No"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Vehicle No",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{vehicleno:e.target.value}))},value:null===F||void 0===F?void 0:F.vehicleno,autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Model Year"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Model Year",onChange:e=>{T((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,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Vehicle Color"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Vehicle Color",onChange:e=>{T((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,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"License No"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"License No",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{licenseno:e.target.value}))},value:null===F||void 0===F?void 0:F.licenseno,autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Insurance No"}),(0,B.jsx)(m.A,{fullWidth:!0,id:"personal-location",placeholder:"Insurance No",onChange:e=>{T((0,l.A)((0,l.A)({},F),{},{insuranceno:e.target.value}))},value:null===F||void 0===F?void 0:F.insuranceno,autoComplete:"off"})]})})," ",(0,B.jsx)(p.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(r.A,{spacing:1.25,children:[(0,B.jsx)(A.A,{htmlFor:"personal-location",children:"Insurance Expiry Date"}),(0,B.jsx)(j.$,{dateAdapter:f.R,children:(0,B.jsx)(y.l,{label:"Date",value:N()(null===F||void 0===F?void 0:F.insurancedate),onChange:e=>{setExpirydate(N()(e.$d).format("YYYY-MM-DD 00:00:00")),T((0,l.A)((0,l.A)({},F),{},{insurancedate:N()(e.$d).format("YYYY-MM-DD 00:00:00")}))},sx:{width:"100%"}})})]})})]})})]})})}),(0,B.jsx)(h.A,{sx:{position:"sticky",bottom:0,backgroundColor:"secondary.lighter",p:2,zIndex:10,border:" 1px solid ",borderColor:"#E6EBF1",borderTop:"none"},children:(0,B.jsxs)(r.A,{direction:{xs:"column-reverse",sm:"row"},justifyContent:"flex-end",spacing:2,children:[(0,B.jsx)(d.A,{startIcon:(0,B.jsx)(v.A,{}),variant:"outlined",fullWidth:a,onClick:()=>w("/nearle/riders"),children:"Back to Riders"}),(0,B.jsx)(d.A,{variant:"contained",fullWidth:a,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:N()(F.insurancedate).format("YYYY-MM-DD HH:mm:ss")}}).then((e=>{console.log("post response",e),200==e.status?((0,Y.M8)("Updated Sucessfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),T(null),w("/nearle/riders"),te(!1)):((0,Y.M8)("Update Failed",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),te(!1))}))})()},children:"Update"})]})})]})}},94826:(e,a,t)=>{t.d(a,{A:()=>c});var l=t(59254),n=t(46639),o=t(62217),s=t(44414);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%"}})})]})}}]);