1 line
24 KiB
JavaScript
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/yiRhnoLiIHAftc7h0kDzlp6H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DeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg=="},63189:(e,a,t)=>{var l=t(24994);a.A=void 0;var o=l(t(79526)),n=t(44414);a.A=(0,o.default)((0,n.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack")},88954:(e,a,t)=>{t.r(a),t.d(a,{default:()=>N});var l=t(89379),o=t(9950),n=t(28429),i=t(93230),s=t(82053),r=t(82223),c=t(16491),d=t(60899),h=t(19647),p=t(29925),A=t(70006),u=t(23266),m=t(77922),x=t(63189),g=t(81831),v=t(95359),j=t(30633),f=t(50027),y=t(26910),C=t(56713),S=t(52351),b=t(99459),k=t(8881),Y=t(4159),W=t.n(Y),F=t(94826),B=t(44414);const N=()=>{const e=(0,n.zy)(),[a,t]=(0,o.useState)(null),Y=(0,n.Zp)(),[N,R]=(0,o.useState)(""),[T,w]=(0,o.useState)(""),[I,J]=(0,o.useState)(""),[M,L]=(0,o.useState)(""),[P,z]=(0,o.useState)({}),[H,D]=(0,o.useState)([]),[K,V]=(0,o.useState)([]),[E,Z]=(0,o.useState)([]),[G,U]=(0,o.useState)([]),[q,O]=(0,o.useState)(),Q=localStorage.getItem("userid");b.A.setApiKey("AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8");const[X,_]=(0,o.useState)(!1);(0,o.useEffect)((()=>{(async e=>{try{let a=await y.A.get("https://jupiter.nearle.app/live/api/v1/partners/getriderdetail/?userid=".concat(e));console.log("riderdataresponse",a.data.details),t(a.data.details),te(a.data.details.applocationid)}catch(a){console.log("fetchmanagerList",a)}})(e.state.riderdata.userid)}),[]),(0,o.useEffect)((()=>{console.log("riderdata",a)}),[a,N]),(0,o.useEffect)((()=>{R(e.state.riderdata.address),w(e.state.riderdata.suburb),J(e.state.riderdata.city),L(e.state.riderdata.state)}),[]),(0,o.useEffect)((()=>{localStorage.getItem("tenantid")&&$(localStorage.getItem("tenantid")),ee(),ae()}),[]),(0,o.useEffect)((()=>{P.applocationid&&te(P.applocationid)}),[P.applocationid]);const $=async e=>{_(!0),await y.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),_(!1)})).catch((e=>{console.log(e),_(!1)}))},ee=async()=>{_(!0),await y.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}))})),D([...a]),_(!1)})).catch((e=>{console.log(e),_(!1)}))},ae=async()=>{_(!0),await y.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}))})),V([...a]),console.log(a),_(!1)})).catch((e=>{console.log(e),_(!1)}))};(0,o.useEffect)((()=>{(async()=>{try{const e=await y.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(Q));console.log("fetchAppLocations",e.data.details),Z(e.data.details)}catch(e){console.log("locationRes",e)}})()}),[]);const te=async e=>{_(!0),await y.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}))})),U([...a]),console.log(a),_(!1)})).catch((e=>{console.log(e),_(!1)}))};(0,o.useEffect)((()=>{selectedImage&&setAvatar(URL.createObjectURL(selectedImage))}),[selectedImage]);const{ref:le}=(0,C.usePlacesWidget)({apiKey:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",onPlaceSelected:e=>{let a,t,l,o;console.log(e),R(e.formatted_address);for(let n=0;n<e.address_components.length;n++)for(let i=0;i<e.address_components[n].types.length;i++)switch(e.address_components[n].types[i]){case"locality":a=e.address_components[n].long_name;break;case"administrative_area_level_1":l=e.address_components[n].long_name;break;case"postal_code":t=e.address_components[n].long_name;break;case"sublocality":o=e.address_components[n].long_name}J(a||""),L(l||""),setZipcode(t||""),w(o||"")},options:{types:["address"]}});return(0,B.jsxs)(B.Fragment,{children:[X&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(S.A,{}),(0,B.jsx)(F.A,{})]}),(0,B.jsx)(f.A,{title:(0,B.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{backgroundColor:"secondary.lighter",width:"100%",height:"100%",p:2},children:[(0,B.jsx)(s.A,{variant:"h3",children:"Edit Rider "}),(0,B.jsx)(r.A,{startIcon:(0,B.jsx)(x.A,{}),variant:"outlined",onClick:()=>{t(null),Y("/nearle/riders")},children:"Back to Riders"})]}),children:(0,B.jsx)(c.A,{sx:{maxHeight:"calc(100vh - 280px)",overflowY:"auto",overflowX:"hidden",scrollbarGutter:"stable",scrollBehavior:"smooth"},children:(0,B.jsxs)(i.A,{display:"flex",spacing:5,children:[(0,B.jsx)(f.A,{title:(0,B.jsx)(s.A,{variant:"h4",sx:{m:2},children:"Contact Information"}),children:(0,B.jsxs)(d.Ay,{container:!0,spacing:3,children:[(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-last-name",children:"First Name"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-last-name",value:null===a||void 0===a?void 0:a.firstname,onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{firstname:e.target.value}))},placeholder:"Name",autoComplete:"off"})]})}),(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-last-name",children:"Last Name"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-last-name",placeholder:"Name",onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{lastname:e.target.value}))},value:null===a||void 0===a?void 0:a.lastname,autoComplete:"off"})]})}),(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-phone",children:"Phone Number"}),(0,B.jsxs)(i.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[(0,B.jsx)(A.A,{defaultValue:"+1",disabled:!0,sx:{cursor:"not-allowed"},children:(0,B.jsx)(u.A,{value:"+1",children:"+91"})}),(0,B.jsx)(p.A,{type:"number",id:"personal-phone",fullWidth:!0,placeholder:"Phone Number",onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{contactno:e.target.value}))},value:null===a||void 0===a?void 0:a.contactno,autoComplete:"off",sx:{cursor:"not-allowed"}})]})]})})," ",(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-email",children:"Email Address"}),(0,B.jsx)(p.A,{type:"email",fullWidth:!0,id:"personal-email",placeholder:"Email Address",onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{email:e.target.value}))},value:null===a||void 0===a?void 0:a.email,autoComplete:"off"})]})}),(0,B.jsx)(d.Ay,{item:!0,xs:12,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-address",children:"Address"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-address",placeholder:"Address",value:N,onChange:e=>{R(e.target.value)},inputRef:le})]})}),(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Location"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-location",placeholder:"Location",onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{suburb:e.target.value})),w(e.target.value)},value:T,autoComplete:"off"})]})}),(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-zipcode",children:"City"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-zipcode",placeholder:"City",onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{city:e.target.value})),J(e.target.value)},value:I,autoComplete:"off"})]})}),(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"State"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-location",placeholder:"State",onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{state:e.target.value})),L(e.target.value)},value:M,autoComplete:"off"})]})}),(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Identification No"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-location",placeholder:"Identification No",onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{identificationno:e.target.value}))},value:null===a||void 0===a?void 0:a.identificationno,autoComplete:"off"})]})}),(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Choose Partner"}),(0,B.jsx)(m.A,{disablePortal:!0,id:"combo-box-demo",options:E,getOptionLabel:e=>"".concat(e.locationname),sx:{width:300,height:"30px",ml:3,zIndex:"100"},onChange:(e,o)=>{o?(console.log(o),O(o.locationname),te(o.applocationid),t((0,l.A)((0,l.A)({},a),{},{partnerid:o.partnerid,applocationid:o.applocationid}))):z({})},renderInput:e=>(0,B.jsx)(p.A,(0,l.A)((0,l.A)({},e),{},{label:q||(null===a||void 0===a?void 0:a.city)}))})]})})]})}),(0,B.jsx)(f.A,{title:(0,B.jsx)(s.A,{variant:"h4",sx:{m:2},children:"Charges"}),children:(0,B.jsxs)(d.Ay,{container:!0,spacing:3,children:[(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Shift Type"}),(0,B.jsx)(m.A,{renderInput:e=>(0,B.jsx)(p.A,(0,l.A)((0,l.A)({},e),{},{label:null!==a&&void 0!==a&&a.starttime&&null!==a&&void 0!==a&&a.endtime?"".concat(null===a||void 0===a?void 0:a.starttime," - ").concat(null===a||void 0===a?void 0:a.endtime):"Choose"})),options:G,onChange:(e,o)=>{o?(console.log("shift",o),t((0,l.A)((0,l.A)({},a),{},{shiftid:o.shiftid,additionalkm:o.additionalkm,additionalcharges:o.additionalcharges,basefare:o.basefare,starttime:o.starttime,endtime:o.endtime})),setBasefare(o.basefare),setAdditionalkms(o.additionalkm),setOthercharges(o.additionalcharges),setShift(o)):(setBasefare(""),setAdditionalkms(""),setOthercharges(""),setShift({}))},freeSolo:!0})]})}),(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Base Fare"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-location",placeholder:"Base Fare",onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{basefare:e.target.value})),setBasefare(e.target.value)},value:null===a||void 0===a?void 0:a.basefare,autoComplete:"off",disabled:!0})]})}),(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Additional Kms"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-location",placeholder:"Additional Kms",onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{additionalkm:e.target.value})),setAdditionalkms(e.target.value)},value:null===a||void 0===a?void 0:a.additionalkm,autoComplete:"off",disabled:!0})]})}),(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Other Charges"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-location",placeholder:"Other Charges",onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{additionalcharges:e.target.value})),setOthercharges(e.target.value)},value:null===a||void 0===a?void 0:a.additionalcharges,autoComplete:"off",disabled:!0})]})})]})}),(0,B.jsx)(f.A,{title:(0,B.jsx)(s.A,{variant:"h4",sx:{m:2},children:"Bank Details"}),children:(0,B.jsxs)(d.Ay,{container:!0,spacing:3,children:[" ",(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Account No"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-location",placeholder:"Account No",value:null===a||void 0===a?void 0:a.accountno,onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{accountno:e.target.value})),setAccountno(e.target.value)},autoComplete:"off"})]})})," ",(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Account Name"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-location",placeholder:"Account Name",value:null===a||void 0===a?void 0:a.accountname,onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{accountname:e.target.value})),setAccountname(e.target.value)},autoComplete:"off"})]})})," ",(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Account Type"}),(0,B.jsx)(m.A,{renderInput:e=>(0,B.jsx)(p.A,(0,l.A)((0,l.A)({},e),{},{label:""==(null===a||void 0===a?void 0:a.accounttype)?"Choose":null===a||void 0===a?void 0:a.accounttype})),options:K,onChange:(e,o)=>{console.log("ac type",o),o?(t((0,l.A)((0,l.A)({},a),{},{accounttype:o.label})),setAccount(o),setAccountType(o.label)):setAccount({})},freeSolo:!0})]})})," ",(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Bank Name"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-location",placeholder:"Bank Name",value:null===a||void 0===a?void 0:a.bankname,onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{bankname:e.target.value})),setBankname(e.target.value)},autoComplete:"off"})]})})," ",(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"IFSC Code"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-location",placeholder:"IFSC Code",value:null===a||void 0===a?void 0:a.ifsccode,onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{ifsccode:e.target.value})),setIfsc(e.target.value)},autoComplete:"off"})]})}),(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Branch"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-location",placeholder:"Branch",value:null===a||void 0===a?void 0:a.branch,onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{branch:e.target.value})),setBranch(e.target.value)},autoComplete:"off"})]})})]})}),(0,B.jsx)(f.A,{title:(0,B.jsx)(s.A,{variant:"h4",sx:{m:2},children:"Vehicle Details"}),children:(0,B.jsxs)(d.Ay,{container:!0,spacing:3,children:[(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Vehicle Name"}),(0,B.jsx)(m.A,{renderInput:e=>(0,B.jsx)(p.A,(0,l.A)((0,l.A)({},e),{},{label:""==(null===a||void 0===a?void 0:a.vehiclename)?"Choose":null===a||void 0===a?void 0:a.vehiclename})),options:H,onChange:(e,o)=>{o?(console.log("vehi",o),setVehicle(o),t((0,l.A)((0,l.A)({},a),{},{vehiclename:o.label,vehicleid:o.apptypeid}))):setVehicle({})},freeSolo:!0})]})})," ",(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Vehicle No"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-location",placeholder:"Vehicle No",onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{vehicleno:e.target.value}))},value:null===a||void 0===a?void 0:a.vehicleno,autoComplete:"off"})]})})," ",(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Model Year"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-location",placeholder:"Model Year",onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{model:e.target.value})),setModelyear(e.target.value)},value:null===a||void 0===a?void 0:a.model,autoComplete:"off"})]})})," ",(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Vehicle Color"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-location",placeholder:"Vehicle Color",onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{color:e.target.value})),setVehiclecolor(e.target.value)},value:null===a||void 0===a?void 0:a.color,autoComplete:"off"})]})})," ",(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"License No"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-location",placeholder:"License No",onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{licenseno:e.target.value}))},value:null===a||void 0===a?void 0:a.licenseno,autoComplete:"off"})]})})," ",(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Insurance No"}),(0,B.jsx)(p.A,{fullWidth:!0,id:"personal-location",placeholder:"Insurance No",onChange:e=>{t((0,l.A)((0,l.A)({},a),{},{insuranceno:e.target.value}))},value:null===a||void 0===a?void 0:a.insuranceno,autoComplete:"off"})]})})," ",(0,B.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:(0,B.jsxs)(i.A,{spacing:1.25,children:[(0,B.jsx)(h.A,{htmlFor:"personal-location",children:"Insurance Expiry Date"}),(0,B.jsx)(g.$,{dateAdapter:v.R,children:(0,B.jsx)(j.l,{label:"Date",value:W()(null===a||void 0===a?void 0:a.insurancedate),onChange:e=>{setExpirydate(W()(e.$d).format("YYYY-MM-DD 00:00:00")),t((0,l.A)((0,l.A)({},a),{},{insurancedate:W()(e.$d).format("YYYY-MM-DD 00:00:00")}))},sx:{width:"100%"}})})]})})]})})]})})}),(0,B.jsx)(c.A,{sx:{position:"sticky",bottom:0,backgroundColor:"secondary.lighter",p:2,zIndex:10,border:" 1px solid ",borderColor:"#E6EBF1",borderTop:"none"},children:(0,B.jsxs)(i.A,{direction:"row",justifyContent:"flex-end",spacing:2,children:[(0,B.jsx)(r.A,{startIcon:(0,B.jsx)(x.A,{}),variant:"outlined",onClick:()=>Y("/nearle/riders"),children:"Back to Riders"}),(0,B.jsx)(r.A,{variant:"contained",onClick:()=>{(async()=>{_(!0),console.log("updated riderData",a),await y.A.put("https://jupiter.nearle.app/live/api/v1/partners/updaterider",{userid:a.userid,contactno:a.contactno,firstname:a.firstname,lastname:a.lastname,email:a.email,address:a.address,suburb:a.suburb,city:a.city,state:a.state,partnerid:a.partnerid,applocationid:a.applocationid,ridersettings:{riderid:a.riderid,userid:a.userid,partnerid:a.partnerid,shiftid:a.shiftid,identificationno:a.identificationno,basefare:a.basefare,additionalkm:a.additionalkm,othercharges:a.othercharges,accountno:a.accountno,accountname:a.accountname,accounttypeid:a.accounttypeid,accounttype:a.accounttype,bankname:a.bankname,ifsccode:a.ifsccode,Branch:a.branch,vehicleid:a.vehicleid,vehiclename:a.vehiclename,vehicleno:a.vehicleno,model:a.model,color:a.color,licenseno:a.licenseno,insurancedate:W()(a.insurancedate).format("YYYY-MM-DD HH:mm:ss")}}).then((e=>{console.log("post response",e),200==e.status?((0,k.M8)("Updated Sucessfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),t(null),Y("/nearle/riders"),_(!1)):((0,k.M8)("Update Failed",{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),_(!1))}))})()},children:"Update"})]})})]})}},94826:(e,a,t)=>{t.d(a,{A:()=>c});var l=t(59254),o=t(46639),n=t(62217),i=t(44414);const s=(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,i.jsxs)(s,{children:[(0,i.jsx)(o.A,{color:"primary",size:80,thickness:6}),(0,i.jsx)(r,{children:(0,i.jsx)("img",{src:n,alt:"Logo",style:{width:"100%",height:"100%"}})})]})}}]); |