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