Files
dailygrubs_console_build/build/static/js/7115.1ce38b5e.chunk.js

1 line
30 KiB
JavaScript

(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[7115],{38215:function(e,r,t){"use strict";t.d(r,{Z:function(){return c}});var i=t(17592),n=t(85281),s=t(46417),l=(0,i.ZP)("div")((function(){return{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"}})),o=(0,i.ZP)("div")((function(){return{position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}})),c=function(){return(0,s.jsxs)(l,{children:[(0,s.jsx)(n.Z,{color:"primary",size:80,thickness:6}),(0,s.jsx)(o,{children:(0,s.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAPnUlEQVR4AdVae3AU9R3/7d4jdyGQQKAhECBAJBSmEAtFSQUjqPgAHGlhRm0lDkWY6Tg+O9qiErR26h8WR8ZWqTMN1ur4qMpDrTyjtDwDJloeCYiBvAgkaZ53l7vb3X4/v9vfZS/Zu9uFwLSfmb3d293f7u/z+z5/399K7CphdW5JrupgBZosZ0ialmu8pklSjUOTamRJbvvjqTUV7CpAYlcIj+SWZHQ55WJZlm7UNK2IXpRhpZ3GWJskSWXUZrPD4Sp77eSva9gVwIATXz35+SJNYWs1phWxAYDEpDKVaZv+fOrZUjaAGDDiK695rpgetpYOc82upw72sMycdJbz/SzmHeKl/ynRay31bbS1s7rjTczXGYj3ihrShnUDNQCXTXzlNS8UyExdbybhSdeNYwXz81nBzflE2pKms7oT51ntiSa276NKVn3wrNktNcGQelNpTUkNuwxcFvFV+S88rKnKy8ZzkOz84uvYvOJZ/PhyAE3Y/+HXbN+HFVwjjJAlR8lr1WueY9wt2MclEYfj8rnkj+nwRnHOLuGWhnbmpfuMKh/3Xn0Atm74IuY8OcGPFY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W8OO8vLww+R5lz5494UT2PBDEY9rSQqOTHAmP91TFdNGChJsyPTdlelztqcMu6i+XvNiIkBQRHlcPHGv6sUbHIKzo56J1AZBkvR5cSFhUVBR2CbD69bIpysvLecdoAHqINOytm0ijJt9J3r+TVBLHXfrGkwsiJRIMLF1i76MBEue7qE0XqTPadYiNnFen3j6Ad5HGYSDwTcslkQYGamVULLrLpH7y6dOnuY1TGctFFR0hcYfhvujinQ6eaNBgYc6sEHm+0WAKqatEWJkwYYI6depUjYhbtuWrBW775GGd1FEXFQA8FFsR8+HRMdFBKocgPrTvRkgnh4l70ijPxtwAzpLnCLpDvSztvFqQ9C8PuAPEINDeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg==",alt:"Logo",style:{width:"100%",height:"100%"}})})]})}},97115:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return oe}});var i=t(74165),n=t(15861),s=t(1413),l=t(29439),o=t(42832),c=t(61113),a=t(66212),d=t(61689),h=t(47131),x=t(69099),u=t(91554),p=t(9019),m=t(51629),Z=t(66835),j=t(23477),f=t(24076),v=t(67478),g=t(57861),y=t(19536),b=t(76088),k=t(16783),S=t(47313),Y=t(19860),C=t(24813),W=t(45987),z=t(70501),D=t(57829),w=t(46417),A=["children","scroll","onScroll","sx"],M=function(e){var r=e.children,t=e.scroll,i=void 0!==t&&t,n=e.onScroll,l=e.sx,c=(0,W.Z)(e,A);return(0,w.jsx)(o.Z,(0,s.Z)((0,s.Z)({spacing:1.25,onScroll:n,sx:(0,s.Z)((0,s.Z)({p:1.5},i&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},c),{},{children:r}))},T=function(e){var r=e.accent,t=void 0===r?"#662582":r,i=e.header,n=e.footer,l=e.selected,o=void 0!==l&&l,c=e.onClick,a=e.children,d=e.sx;return(0,w.jsxs)(z.Z,{elevation:0,onClick:c,sx:(0,s.Z)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:o?t:"#e2e8f0",background:o?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},d),children:[(0,w.jsx)(D.Z,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,w.jsxs)(D.Z,{sx:{p:1.5,pl:2},children:[i,a,n]})]})},R=function(e){var r=e.children,t=e.columns,i=void 0===t?2:t,n=e.sx;return(0,w.jsx)(D.Z,{sx:(0,s.Z)({display:"grid",gridTemplateColumns:"repeat(".concat(i,", minmax(0, 1fr))"),gap:1,mt:1.25},n),children:r})},P=function(e){var r=e.label,t=e.value,i=e.children,n=e.full,s=void 0!==n&&n,l=e.align,o=void 0===l?"left":l;return(0,w.jsxs)(D.Z,{sx:{gridColumn:s?"1 / -1":"auto",minWidth:0,textAlign:o},children:[(0,w.jsx)(c.Z,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:r}),(0,w.jsx)(D.Z,{sx:{mt:.25,minWidth:0},children:void 0!==i?i:(0,w.jsx)(c.Z,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==t&&void 0!==t?t:"\u2014"})})]})},J=t(58467),O=t(10658),K=t.n(O),F=t(97316),H=t(14647),L=t(71049),B=t(62180),I=t(41962),N=t(50581),U=t(11577),G=t(38215),E=t(95569),q=t(73428),V=t(93405),Q=function(e){var r=e.primary,t=e.secondary,i=e.percentage,n=e.color;return(0,w.jsx)(q.Z,{elevation:0,sx:{background:n,position:"relative",color:"#fff","&:hover svg":{opacity:1,transform:"scale(1.1)"}},children:(0,w.jsxs)(V.Z,{children:[(0,w.jsx)(D.Z,{sx:{position:"absolute",right:15,top:25,color:"#fff","& svg":{width:36,height:36,opacity:.5,transition:"all .3s ease-in-out"}},children:(0,w.jsx)(c.Z,{variant:"h2",color:"inherit",children:i?"".concat(i.toString()," %"):""})}),(0,w.jsxs)(p.ZP,{container:!0,spacing:0,children:[(0,w.jsx)(p.ZP,{item:!0,xs:12,children:(0,w.jsx)(c.Z,{variant:"h3",color:"inherit",children:t})}),(0,w.jsx)(p.ZP,{item:!0,xs:12,children:(0,w.jsx)(c.Z,{variant:"subtitle2",color:"inherit",children:r})})]})]})})},X=t(87462),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM482 232c0-4.4 3.6-8 8-8h44c4.4 0 8 3.6 8 8v80c0 4.4-3.6 8-8 8h-44c-4.4 0-8-3.6-8-8v-80zM270 582c0 4.4-3.6 8-8 8h-80c-4.4 0-8-3.6-8-8v-44c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8v44zm90.7-204.5l-31.1 31.1a8.03 8.03 0 01-11.3 0L261.7 352a8.03 8.03 0 010-11.3l31.1-31.1c3.1-3.1 8.2-3.1 11.3 0l56.6 56.6c3.1 3.1 3.1 8.2 0 11.3zm291.1 83.6l-84.5 84.5c5 18.7.2 39.4-14.5 54.1a55.95 55.95 0 01-79.2 0 55.95 55.95 0 010-79.2 55.87 55.87 0 0154.1-14.5l84.5-84.5c3.1-3.1 8.2-3.1 11.3 0l28.3 28.3c3.1 3.1 3.1 8.1 0 11.3zm43-52.4l-31.1-31.1a8.03 8.03 0 010-11.3l56.6-56.6c3.1-3.1 8.2-3.1 11.3 0l31.1 31.1c3.1 3.1 3.1 8.2 0 11.3l-56.6 56.6a8.03 8.03 0 01-11.3 0zM846 582c0 4.4-3.6 8-8 8h-80c-4.4 0-8-3.6-8-8v-44c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8v44z"}}]},name:"dashboard",theme:"filled"},_=t(16141),ee=function(e,r){return S.createElement(_.Z,(0,X.Z)({},e,{ref:r,icon:$}))};var re=S.forwardRef(ee),te=t(22539),ie=t(88960),ne=t(4901),se=t(91635);K().extend(se);var le=function(e){var r=e.list,t=e.aiMode;return r&&0!==r.length?(0,w.jsx)(M,{children:r.map((function(e,r){var i="Economy"==e.ordertype?"success":"Risky"==e.ordertype?"error":"primary";return(0,w.jsx)(T,{header:(0,w.jsxs)(o.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,w.jsxs)(o.Z,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0},children:[(0,w.jsxs)(c.Z,{sx:{fontWeight:800,color:"#94a3b8"},children:["#",r+1]}),1==t&&(0,w.jsx)(a.Z,{size:"small",color:"primary",label:e.zone_name})]}),(0,w.jsx)(a.Z,{size:"small",label:e.ordertype,color:i})]}),children:(0,w.jsxs)(R,{children:[(0,w.jsx)(P,{label:"Tenant",full:!0,children:(0,w.jsx)(d.Z,{title:e.tenantaddress,children:(0,w.jsxs)(o.Z,{children:[(0,w.jsx)(c.Z,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,w.jsx)(c.Z,{noWrap:!0,sx:{fontSize:"11px"},children:e.tenantsuburb}),(0,w.jsx)(c.Z,{noWrap:!0,variant:"body2",children:e.applocation})]})})}),(0,w.jsxs)(P,{label:"Order Location",full:!0,children:[(0,w.jsx)(d.Z,{title:e.locationaddress,placement:"top",children:(0,w.jsx)(c.Z,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,w.jsx)(d.Z,{title:"Order Id",children:(0,w.jsx)(c.Z,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,w.jsxs)(o.Z,{display:"flex",flexDirection:"row",gap:3,children:[(0,w.jsx)(d.Z,{title:"Ordered date",children:(0,w.jsxs)(o.Z,{children:[(0,w.jsx)(c.Z,{noWrap:!0,sx:{fontSize:"12px"},children:K()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,w.jsx)(c.Z,{noWrap:!0,sx:{fontSize:"11px"},children:K()(e.orderdate).utc().format("hh:mm A")})]})}),"-",(0,w.jsx)(d.Z,{title:"Delivery date",children:(0,w.jsxs)(o.Z,{children:[(0,w.jsx)(c.Z,{noWrap:!0,sx:{fontSize:"12px"},children:K()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,w.jsx)(c.Z,{noWrap:!0,sx:{fontSize:"11px"},children:K()(e.deliverydate).utc().format("hh:mm A")})]})})]})]}),(0,w.jsx)(P,{label:"Pickup",children:(0,w.jsxs)(o.Z,{direction:"column",children:[(0,w.jsx)(c.Z,{variant:"caption",children:e.pickupcustomer}),(0,w.jsx)(c.Z,{variant:"caption",children:e.pickupcontactno}),(0,w.jsx)(d.Z,{title:e.pickupaddress,children:(0,w.jsx)(c.Z,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})}),(0,w.jsx)(P,{label:"Delivery",children:(0,w.jsxs)(o.Z,{direction:"column",children:[(0,w.jsx)(c.Z,{variant:"caption",children:e.deliverycustomer}),(0,w.jsx)(c.Z,{variant:"caption",children:e.deliverycontactno}),(0,w.jsx)(d.Z,{title:e.deliveryaddress,children:(0,w.jsx)(c.Z,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})}),e.ordernotes?(0,w.jsx)(P,{label:"Notes",value:e.ordernotes,full:!0}):null,1==t&&(0,w.jsxs)(P,{label:"Rider",full:!0,children:[(0,w.jsx)(c.Z,{sx:{whiteSpace:"nowrap"},children:e.username}),(0,w.jsxs)(c.Z,{children:["ID : ",e.userid]})]}),(0,w.jsx)(P,{label:"Profit",children:(0,w.jsxs)(o.Z,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,w.jsx)(d.Z,{title:"Charges",placement:"top",children:(0,w.jsx)(a.Z,{size:"small",label:"\u20b9 ".concat(e.deliverycharge.toFixed(2)," "),color:"error"})}),(0,w.jsx)(d.Z,{title:"Amount",placement:"left",children:(0,w.jsx)(a.Z,{size:"small",label:"\u20b9 ".concat(e.deliveryamt.toFixed(2)," "),color:"success"})})]})}),(0,w.jsx)(P,{label:"KMS",children:(0,w.jsxs)(o.Z,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,w.jsx)(d.Z,{title:"KMS",placement:"top",children:(0,w.jsx)(a.Z,{size:"small",label:"".concat(e.kms," km"),color:"error"})}),(0,w.jsx)(d.Z,{title:"Cumulative Kms",placement:"right",children:(0,w.jsx)(a.Z,{size:"small",label:"".concat(e.cumulativekms," km"),color:"success"})})]})})]})},r)}))}):(0,w.jsx)(o.Z,{alignItems:"center",sx:{py:4},children:(0,w.jsx)(E.Z,{})})},oe=function(){var e,r,t,W,z,D,A,M=(0,Y.Z)(),T=(0,C.Z)(M.breakpoints.down("md")),R=(0,J.s0)(),P=(0,J.TH)();console.log("location.state",P.state);var O=(0,S.useState)(null),q=(0,l.Z)(O,2),V=q[0],X=q[1],$=(0,S.useState)(null),_=(0,l.Z)($,2),ee=_[0],se=_[1],oe=(0,S.useState)([]),ce=(0,l.Z)(oe,2),ae=ce[0],de=ce[1],he=(0,S.useState)(!1),xe=(0,l.Z)(he,2),ue=xe[0],pe=xe[1],me=null===(e=P.state)||void 0===e?void 0:e.deliverylist,Ze=null===(r=P.state)||void 0===r?void 0:r.zoneData,je=null===(t=P.state)||void 0===t?void 0:t.metaData,fe=null===(W=P.state)||void 0===W?void 0:W.riderToken,ve=null===(z=P.state)||void 0===z?void 0:z.appId,ge=null===(D=P.state)||void 0===D?void 0:D.aiMode,ye=null===(A=P.state)||void 0===A?void 0:A.reassignOrders;(0,S.useEffect)((function(){console.log("aiMode",ge),console.log("riderToken",fe),console.log("zoneData",Ze),console.log("metaData",je),console.log("reassignOrders",ye)}),[]),(0,S.useEffect)((function(){if(null!==me&&void 0!==me&&me.length){var e=me.map((function(e){var r=Number(e.cumulativekms||0),t=Number(e.minkm||0),i=Number(e.baseprice||0),n=Number(e.priceperkm||0);return r<=t?(0,s.Z)((0,s.Z)({},e),{},{deliveryamt:i}):(0,s.Z)((0,s.Z)({},e),{},{deliveryamt:(r-t)*n+i})}));de(e),console.log("finaldeliveryList",e)}}),[me]);var be=(0,I.a)({queryKey:["paymentmodes"],queryFn:L.OA}),ke=be.data,Se=void 0===ke?[]:ke,Ye=be.isLoading,Ce=(0,I.a)({queryKey:["ridersList",ve],queryFn:L.Ye,enabled:0!==ve}),We=Ce.data,ze=void 0===We?[]:We,De=Ce.isLoading,we=(0,N.D)({mutationFn:L.vE,onSuccess:function(){(0,B.y)("Notification sent Successfully","success",2e3)},onError:function(e){(0,B.y)(e.message,"error",2e3)}}),Ae=(0,N.D)({mutationFn:L.wj,onSuccess:function(e,r){console.log("data",e),console.log("varialbles",r),we.mutate((null===V||void 0===V?void 0:V.userfcmtoken)||fe),"accepted"==e.status&&(0,B.y)("Delivery Created Successfully","success",2e3),setTimeout((function(){pe(!1),R("/nearle/orders")}),2e3)},onError:function(e){(0,B.y)(e.message,"error",4e3)}}),Me=function(){var e=(0,n.Z)((0,i.Z)().mark((function e(){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:pe(!0),Ae.mutate({deliveries:ae});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,w.jsxs)(F.Z,{content:!1,title:(0,w.jsxs)(o.Z,{direction:"row",alignItems:"center",spacing:1,sx:{ml:1},children:[(0,w.jsxs)(d.Z,{title:"Back to orders",placement:"top",children:[(0,w.jsx)(h.Z,{onClick:function(){return R("/nearle/orders")},sx:{backgroundColor:"action.hover",color:"text.primary","&:hover":{backgroundColor:"action.selected"}},children:(0,w.jsx)(ne.Tsu,{size:22})})," "]}),(0,w.jsx)(c.Z,{sx:{m:2},variant:"h3",children:"Assign Orders"})]}),secondary:(0,w.jsx)(x.Z,{sx:{m:2},color:"primary",variant:"contained",startIcon:(0,w.jsx)(H.Z,{}),children:"Re-Assign"}),children:[(Ye||De||ue)&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(U.Z,{}),(0,w.jsx)(G.Z,{})]}),(0,w.jsx)(u.Z,{sx:{color:"#fff",zIndex:function(e){return e.zIndex.drawer+1}},open:Ye||De||ue,children:(0,w.jsx)(G.Z,{color:"inherit"})}),1==ge&&(0,w.jsx)(o.Z,{sx:{m:2},children:(0,w.jsxs)(p.ZP,{container:!0,spacing:2,children:[(0,w.jsx)(p.ZP,{item:!0,xs:12,sm:3,children:(0,w.jsx)(Q,{secondary:null===je||void 0===je?void 0:je.total_orders,primary:"Orders",percentage:(0,w.jsx)(re,{}),color:M.palette.success.main,sx:{cursor:"pointer"}})}),(0,w.jsx)(p.ZP,{item:!0,xs:12,sm:3,children:(0,w.jsx)(Q,{secondary:null===je||void 0===je?void 0:je.total_riders,primary:"Riders",percentage:(0,w.jsx)(te.MCF,{}),color:M.palette.warning.main})}),(0,w.jsx)(p.ZP,{item:!0,xs:12,sm:3,children:(0,w.jsx)(Q,{secondary:null===Ze||void 0===Ze?void 0:Ze.length,primary:"Zones",percentage:(0,w.jsx)(ie.$yO,{}),color:M.palette.info.main})}),(0,w.jsx)(p.ZP,{item:!0,xs:12,sm:3,children:(0,w.jsx)(Q,{secondary:null===Ze||void 0===Ze?void 0:Ze.length,primary:"Kilometer",percentage:(0,w.jsx)(ie.$yO,{}),color:M.palette.error.main})})]})}),T?(0,w.jsx)(le,{list:ae,aiMode:ge}):(0,w.jsx)(m.Z,{sx:{maxHeight:"calc(100vh - 250px)",overflow:"auto","&::-webkit-scrollbar":{width:"12px",cursor:"pointer"},"&::-webkit-scrollbar-thumb":{backgroundColor:M.palette.primary.main,borderRadius:"8px",cursor:"pointer"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:M.palette.primary.dark,cursor:"pointer"},"&::-webkit-scrollbar-track":{backgroundColor:M.palette.primary.lighter,cursor:"pointer"}},children:(0,w.jsxs)(Z.Z,{stickyHeader:!0,children:[(0,w.jsx)(j.Z,{children:(0,w.jsxs)(f.Z,{sx:{backgroundColor:"red"},children:[(0,w.jsx)(v.Z,{sx:{position:"sticky !important",backgroundColor:M.palette.secondary.light},children:"#"}),1==ge&&(0,w.jsx)(v.Z,{sx:{position:"sticky !important",backgroundColor:M.palette.secondary.light},children:"Zone "}),(0,w.jsx)(v.Z,{sx:{position:"sticky !important",backgroundColor:M.palette.secondary.light},children:"Tenant "}),(0,w.jsx)(v.Z,{sx:{position:"sticky !important",backgroundColor:M.palette.secondary.light},children:"order Location"}),(0,w.jsx)(v.Z,{sx:{position:"sticky !important",backgroundColor:M.palette.secondary.light},children:"Pickup "}),(0,w.jsx)(v.Z,{sx:{position:"sticky !important",backgroundColor:M.palette.secondary.light},children:"Delivery"}),(0,w.jsx)(v.Z,{sx:{position:"sticky !important",backgroundColor:M.palette.secondary.light},children:"Notes"}),1==ge&&(0,w.jsx)(v.Z,{sx:{position:"sticky !important",backgroundColor:M.palette.secondary.light},children:"Rider"}),(0,w.jsx)(v.Z,{align:"center",sx:{position:"sticky !important",backgroundColor:M.palette.secondary.light},children:"Type"}),(0,w.jsx)(v.Z,{align:"center",sx:{position:"sticky !important",backgroundColor:M.palette.secondary.light},children:"Profit"}),(0,w.jsx)(v.Z,{align:"center",sx:{position:"sticky !important",backgroundColor:M.palette.secondary.light},children:"Charges"}),(0,w.jsx)(v.Z,{align:"center",sx:{position:"sticky !important",backgroundColor:M.palette.secondary.light},children:"KMS"})]})}),(0,w.jsxs)(g.Z,{children:[0==(null===ae||void 0===ae?void 0:ae.length)&&(0,w.jsx)(f.Z,{children:(0,w.jsx)(v.Z,{colSpan:10,children:(0,w.jsx)(E.Z,{})})}),ae&&1==ge?null===ae||void 0===ae?void 0:ae.map((function(e,r){return(0,w.jsx)(S.Fragment,{children:(0,w.jsxs)(f.Z,{sx:{},children:[(0,w.jsx)(v.Z,{children:(0,w.jsxs)(c.Z,{children:[" ",r+1]})}),1==ge&&(0,w.jsx)(v.Z,{children:(0,w.jsx)(a.Z,{color:"primary",label:e.zone_name})}),(0,w.jsx)(v.Z,{children:(0,w.jsxs)(d.Z,{title:e.tenantaddress,children:[(0,w.jsx)(c.Z,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,w.jsxs)(c.Z,{noWrap:!0,sx:{fontSize:"11px"},children:[e.tenantsuburb,(0,w.jsx)("br",{})]}),(0,w.jsx)(c.Z,{noWrap:!0,variant:"body2",children:e.applocation})]})}),(0,w.jsxs)(v.Z,{align:"left",children:[(0,w.jsx)(d.Z,{title:e.locationaddress,placement:"top",children:(0,w.jsx)(c.Z,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,w.jsx)(d.Z,{title:"Order Id",children:(0,w.jsx)(c.Z,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,w.jsxs)(o.Z,{display:"flex",flexDirection:"row",gap:3,children:[(0,w.jsxs)(d.Z,{title:"Ordered date",children:[(0,w.jsx)(c.Z,{noWrap:!0,sx:{fontSize:"12px"},children:K()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,w.jsx)(c.Z,{noWrap:!0,sx:{fontSize:"11px"},children:K()(e.orderdate).utc().format("hh:mm A")})]}),"-",(0,w.jsxs)(d.Z,{title:"Delivery date",children:[(0,w.jsx)(c.Z,{noWrap:!0,sx:{fontSize:"12px"},children:K()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,w.jsx)(c.Z,{noWrap:!0,sx:{fontSize:"11px"},children:K()(e.deliverydate).utc().format("hh:mm A")})]})]})]}),(0,w.jsx)(v.Z,{align:"left",children:(0,w.jsx)(o.Z,{direction:"row",spacing:1,children:(0,w.jsxs)(o.Z,{direction:"column",children:[(0,w.jsx)(c.Z,{variant:"caption",children:e.pickupcustomer}),(0,w.jsx)(c.Z,{variant:"caption",children:e.pickupcontactno}),(0,w.jsx)(d.Z,{title:e.pickupaddress,children:(0,w.jsx)(c.Z,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})})}),(0,w.jsx)(v.Z,{align:"left",children:(0,w.jsx)(o.Z,{direction:"row",spacing:1,children:(0,w.jsxs)(o.Z,{direction:"column",children:[(0,w.jsx)(c.Z,{variant:"caption",children:e.deliverycustomer}),(0,w.jsx)(c.Z,{variant:"caption",children:e.deliverycontactno}),(0,w.jsx)(d.Z,{title:e.deliveryaddress,children:(0,w.jsx)(c.Z,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})})}),(0,w.jsx)(v.Z,{align:"left",children:e.ordernotes}),1==ge&&(0,w.jsxs)(v.Z,{align:"left",children:[(0,w.jsx)(c.Z,{sx:{whiteSpace:"nowrap"},children:e.username}),(0,w.jsxs)(c.Z,{children:["ID : ",e.userid]})]}),(0,w.jsx)(v.Z,{align:"center",children:(0,w.jsx)(a.Z,{size:"small",label:e.ordertype,color:"Economy"==e.ordertype?"success":"Risky"==e.ordertype?"error":"primary"})}),(0,w.jsx)(v.Z,{align:"center",children:(0,w.jsxs)(o.Z,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,w.jsx)(d.Z,{title:"Charges",placement:"top",children:(0,w.jsx)(a.Z,{size:"small",label:"\u20b9 ".concat(e.deliverycharge.toFixed(2)," "),color:"error"})}),(0,w.jsx)(d.Z,{title:"Amount",placement:"left",children:(0,w.jsx)(a.Z,{size:"small",label:"\u20b9 ".concat(e.deliveryamt.toFixed(2)," "),color:"success"})})]})}),(0,w.jsx)(v.Z,{align:"center",children:(0,w.jsxs)(o.Z,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,w.jsx)(d.Z,{title:"KMS",placement:"top",children:(0,w.jsx)(a.Z,{size:"small",label:"".concat(e.kms," km"),color:"error"})}),(0,w.jsx)(d.Z,{title:"Cumulative Kms",placement:"right",children:(0,w.jsx)(a.Z,{size:"small",label:"".concat(e.cumulativekms," km"),color:"success"})})]})})]})},r)})):null===ae||void 0===ae?void 0:ae.map((function(e,r){return(0,w.jsx)(S.Fragment,{children:(0,w.jsxs)(f.Z,{sx:{},children:[(0,w.jsx)(v.Z,{children:(0,w.jsxs)(c.Z,{children:[" ",r+1]})}),(0,w.jsx)(v.Z,{children:(0,w.jsxs)(d.Z,{title:e.tenantaddress,children:[(0,w.jsx)(c.Z,{variant:"body1",noWrap:!0,children:e.tenantname}),(0,w.jsxs)(c.Z,{noWrap:!0,sx:{fontSize:"11px"},children:[e.tenantsuburb,(0,w.jsx)("br",{})]}),(0,w.jsx)(c.Z,{noWrap:!0,variant:"body2",children:e.applocation})]})}),(0,w.jsxs)(v.Z,{align:"left",children:[(0,w.jsx)(d.Z,{title:e.locationaddress,placement:"top",children:(0,w.jsx)(c.Z,{variant:"body1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,w.jsx)(d.Z,{title:"Order Id",children:(0,w.jsx)(c.Z,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,w.jsxs)(o.Z,{display:"flex",flexDirection:"row",gap:3,children:[(0,w.jsxs)(d.Z,{title:"Ordered date",children:[(0,w.jsx)(c.Z,{noWrap:!0,sx:{fontSize:"12px"},children:K()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,w.jsx)(c.Z,{noWrap:!0,sx:{fontSize:"11px"},children:K()(e.orderdate).utc().format("hh:mm A")})]}),"-",(0,w.jsxs)(d.Z,{title:"Delivery date",children:[(0,w.jsx)(c.Z,{noWrap:!0,sx:{fontSize:"12px"},children:K()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,w.jsx)(c.Z,{noWrap:!0,sx:{fontSize:"11px"},children:K()(e.deliverydate).utc().format("hh:mm A")})]})]})]}),(0,w.jsx)(v.Z,{align:"left",children:(0,w.jsx)(o.Z,{direction:"row",spacing:1,children:(0,w.jsxs)(o.Z,{direction:"column",children:[(0,w.jsx)(c.Z,{variant:"caption",children:e.pickupcustomer}),(0,w.jsx)(c.Z,{variant:"caption",children:e.pickupcontactno}),(0,w.jsx)(d.Z,{title:e.pickupaddress,children:(0,w.jsx)(c.Z,{variant:"caption",children:e.pickupsuburb||e.pickupaddress.slice(0,20)})})]})})}),(0,w.jsx)(v.Z,{align:"left",children:(0,w.jsx)(o.Z,{direction:"row",spacing:1,children:(0,w.jsxs)(o.Z,{direction:"column",children:[(0,w.jsx)(c.Z,{variant:"caption",children:e.deliverycustomer}),(0,w.jsx)(c.Z,{variant:"caption",children:e.deliverycontactno}),(0,w.jsx)(d.Z,{title:e.deliveryaddress,children:(0,w.jsx)(c.Z,{variant:"caption",children:e.deliverysuburb||e.deliveryaddress.slice(0,20)})})]})})}),(0,w.jsx)(v.Z,{align:"left",children:e.ordernotes}),(0,w.jsx)(v.Z,{align:"center",children:(0,w.jsx)(a.Z,{size:"small",label:e.ordertype,color:"Economy"==e.ordertype?"success":"Risky"==e.ordertype?"error":"primary"})}),(0,w.jsx)(v.Z,{align:"center",children:(0,w.jsxs)(o.Z,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,w.jsx)(d.Z,{title:"Charges",placement:"top",children:(0,w.jsx)(a.Z,{size:"small",label:"\u20b9 ".concat(e.deliverycharge.toFixed(2)," "),color:"error"})}),(0,w.jsx)(d.Z,{title:"Amount",placement:"left",children:(0,w.jsx)(a.Z,{size:"small",label:"\u20b9 ".concat(e.deliveryamt.toFixed(2)," "),color:"success"})})]})}),(0,w.jsx)(v.Z,{align:"center",children:(0,w.jsxs)(o.Z,{display:"flex",flexDirection:"column",gap:1,sx:{cursor:"pointer"},children:[(0,w.jsx)(d.Z,{title:"KMS",placement:"top",children:(0,w.jsx)(a.Z,{size:"small",label:"".concat(e.kms," km"),color:"error"})}),(0,w.jsx)(d.Z,{title:"Cumulative Kms",placement:"right",children:(0,w.jsx)(a.Z,{size:"small",label:"".concat(e.cumulativekms," km"),color:"success"})})]})})]})},r)}))]})]})}),(0,w.jsx)(y.Z,{}),0==ge&&(0,w.jsxs)(p.ZP,{container:!0,spacing:2,sx:{p:2},children:[(0,w.jsx)(p.ZP,{item:!0,xs:12,sm:6,children:(0,w.jsx)(b.Z,{id:"free-solo-demo",options:Se,renderInput:function(e){return(0,w.jsx)(k.Z,(0,s.Z)((0,s.Z)({},e),{},{label:"Choose Payment"}))},onChange:function(e,r,t){if("clear"!==t){if(r){console.log("Selected:",r),se(r);var i=null===ae||void 0===ae?void 0:ae.map((function(e){return(0,s.Z)((0,s.Z)({},e),{},{paymenttype:r.apptypeid})}));de(i)}}else se(null)}})}),(0,w.jsx)(p.ZP,{item:!0,xs:12,sm:6,children:(0,w.jsx)(b.Z,{id:"free-solo-demo",options:ze,renderInput:function(e){return(0,w.jsx)(k.Z,(0,s.Z)((0,s.Z)({},e),{},{label:"Choose Rider"}))},onChange:function(e,r,t){if("clear"!==t){if(r){X(r),console.log("Selected:",r);var i=null===ae||void 0===ae?void 0:ae.map((function(e){return(0,s.Z)((0,s.Z)({},e),{},{userid:r.userid,userfcmtoken:r.userfcmtoken})}));de(i)}}else X(null)}})})]}),(0,w.jsx)(y.Z,{}),(0,w.jsxs)(o.Z,{display:"flex",flexDirection:{xs:"column",sm:"row"},gap:2,alignItems:{xs:"stretch",sm:"center"},justifyContent:"end",sx:{p:2},children:[(0,w.jsx)(x.Z,{fullWidth:T,variant:"contained",color:"secondary",startIcon:(0,w.jsx)(H.Z,{}),onClick:function(){R("/nearle/orders")},children:"Back"}),(0,w.jsx)(x.Z,{fullWidth:T,sx:{my:{xs:0,sm:2}},variant:"contained",disabled:0===ge&&(!V||!ee),onClick:Me,children:"Finalise"})]})]})}},14647:function(e,r,t){"use strict";var i=t(64836);r.Z=void 0;var n=i(t(45045)),s=t(46417),l=(0,n.default)((0,s.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack");r.Z=l},91635:function(e){e.exports=function(){"use strict";var e="minute",r=/[+-]\d\d(?::?\d\d)?/g,t=/([+-]|\d\d)/g;return function(i,n,s){var l=n.prototype;s.utc=function(e){return new n({date:e,utc:!0,args:arguments})},l.utc=function(r){var t=s(this.toDate(),{locale:this.$L,utc:!0});return r?t.add(this.utcOffset(),e):t},l.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var o=l.parse;l.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),o.call(this,e)};var c=l.init;l.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var a=l.utcOffset;l.utcOffset=function(i,n){var s=this.$utils().u;if(s(i))return this.$u?0:s(this.$offset)?a.call(this):this.$offset;if("string"==typeof i&&(i=function(e){void 0===e&&(e="");var i=e.match(r);if(!i)return null;var n=(""+i[0]).match(t)||["-",0,0],s=n[0],l=60*+n[1]+ +n[2];return 0===l?0:"+"===s?l:-l}(i),null===i))return this;var l=Math.abs(i)<=16?60*i:i,o=this;if(n)return o.$offset=l,o.$u=0===i,o;if(0!==i){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(l+c,e)).$offset=l,o.$x.$localOffset=c}else o=this.utc();return o};var d=l.format;l.format=function(e){var r=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,r)},l.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var h=l.toDate;l.toDate=function(e){return"s"===e&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var x=l.diff;l.diff=function(e,r,t){if(e&&this.$u===e.$u)return x.call(this,e,r,t);var i=this.local(),n=s(e).local();return x.call(i,n,r,t)}}}()}}]);