1 line
52 KiB
JavaScript
1 line
52 KiB
JavaScript
"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2851],{1367:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(89379),i=(r(9950),r(16491)),o=r(93230),l=r(82053),s=r(44414);const a=e=>{let{sx:t,title:r,children:a,starticon:c}=e;return(0,s.jsx)(i.A,{sx:(0,n.A)({},t),children:(0,s.jsxs)(o.A,{direction:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:1,children:[(0,s.jsxs)(o.A,{children:[c&&c,(0,s.jsx)(l.A,{variant:"h3",children:r})]}),a]})})}},22851:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Se});var n=r(89379),i=r(85571),o=r(8881),l=r(24513),s=r(36256),a=r(9950),c=r(13838),d=r(4159),h=r.n(d),u=r(26910),x=r(47659),p=r(14857),A=r(31222),v=r(51778),g=r(36150),m=r(60010),j=r(55158),f=r(60899),b=r(82917),y=r(93230),w=r(77922),S=r(2235),k=r(41413),C=r(82053),D=r(25277),W=r(29925),L=r(48159),P=r(47223),M=r(84142),Y=r(1320),R=r(15769),E=r(69780),z=r(9213),F=r(21671),O=r(93038),T=r(34075),I=r(83274),N=r(25333),K=r(17239),q=r(23266),H=r(33738),J=r(16491),B=r(96583),G=r(28170),U=r(82223),Z=r(40033),V=r(79739),Q=r(29277),X=r(50027),_=r(37476),$=r(56712),ee=r(81417),te=r(96600),re=r(53132),ne=r(94289),ie=r(57326),oe=r(50624),le=r(55916),se=r(52351),ae=r(67562),ce=r(49883),de=(r(94826),r(81425)),he=r(56311),ue=r(1367),xe=r(20466),pe=r(96646),Ae=r(59212),ve=r(58691),ge=r(44414),me=r(36220);h().extend(me);const je=[{id:"all",label:"All Batches",range:"Across the day",color:"#7c3aed",iconKey:"all"},{id:"morning",label:"Morning Batch",range:"12 AM to 8 AM",color:"#0ea5e9",iconKey:"morning",startHour:0,endHour:8},{id:"afternoon",label:"Afternoon Batch",range:"9 AM to 12 PM",color:"#f59e0b",iconKey:"afternoon",startHour:9,endHour:12},{id:"evening",label:"Evening Batch",range:"4 PM to 7 PM",color:"#6366f1",iconKey:"evening",startHour:16,endHour:19}],fe={all:A.lB9,morning:A.N3N,afternoon:A.aSE,evening:A.giK},be=()=>{const e=h()(),t=e.hour()+e.minute()/60;for(const r of je)if("all"!==r.id&&t>=r.startHour&&t<r.endHour)return r.id;return"all"},ye=["assigntime"],we=e=>{let t=null;for(const o of ye)if(null!==e&&void 0!==e&&e[o]){t=e[o];break}if(!t)return null;const r=String(t).trim();if(/^\d{4}-\d{2}-\d{2}$/.test(r))return null;const n=h()(t);if(!n.isValid())return null;const i=n.hour()+n.minute()/60;for(const o of je)if("all"!==o.id&&i>=o.startHour&&i<o.endHour)return o.id;return null},Se=()=>{var e;const t=localStorage.getItem("userid"),r=(0,p.A)(),d=(0,a.useRef)(),me=(0,a.useRef)(),[ye,Se]=(0,a.useState)([]),[ke,Ce]=(0,a.useState)(!1),[De,We]=(0,a.useState)("All"),[Le,Pe]=(0,a.useState)(0),[Me,Ye]=(0,a.useState)(h()().format("YYYY-MM-DD")),[Re,Ee]=(0,a.useState)(h()().format("YYYY-MM-DD")),[ze,Fe]=(0,a.useState)("Pending"),[Oe,Te]=(0,a.useState)(0),[Ie,Ne]=(0,a.useState)(!1),[Ke,qe]=(0,a.useState)("Today"),[He,Je]=(0,a.useState)(""),[Be,Ge]=(0,a.useState)(),[Ue,Ze]=(0,a.useState)(),[Ve,Qe]=(0,a.useState)(""),[Xe,_e]=(0,a.useState)({}),[$e,et]=(0,a.useState)(""),[tt,rt]=(0,a.useState)(""),[nt,it]=(0,a.useState)("pending"),[ot,lt]=(0,a.useState)("delivered"),st=(0,a.useRef)(null),at=(0,a.useRef)(null),[ct,dt]=a.useState(0),[ht,ut]=a.useState(50),[xt,pt]=a.useState(),[At,vt]=(0,a.useState)(null),[gt,mt]=(0,a.useState)(null),[jt,ft]=(0,a.useState)(""),[bt,yt]=(0,a.useState)(""),[wt,St]=a.useState(null),[kt,Ct]=(0,a.useState)(null),[Dt,Wt]=(0,a.useState)(!1),[Lt,Pt]=a.useState(null),[Mt,Yt]=(0,a.useState)(""),[Rt,Et]=(0,a.useState)(!1),[zt,Ft]=(0,a.useState)(!1),[Ot,Tt]=(0,a.useState)(""),[It,Nt]=(0,a.useState)(null),[Kt,qt]=(0,a.useState)(0),[Ht,Jt]=(0,a.useState)(0),[Bt,Gt]=(0,a.useState)(null),[Ut,Zt]=(0,a.useState)(null),[Vt,Qt]=(0,a.useState)(0),[Xt,_t]=(0,a.useState)(be),$t=localStorage.getItem("roleid");(0,a.useEffect)((()=>{qt(0),Gt(null),Jt(0),Zt(null)}),[Le]),(0,a.useEffect)((()=>{Jt(0),Zt(null)}),[Kt]);const er=Boolean(wt),tr=()=>{St(null)},{mutate:rr}=(0,v.n)({mutationFn:e=>{let{selectedRow:t,cancelFeed:r}=e;return(0,de.zF)(t,r)},onSuccess:()=>{xr("Delivery Cancelled Successfully","success"),Et(!1),Hr(),wr(),Lr()},onError:e=>{xr(e.message,"error")}}),{data:nr,isLoading:ir,isError:or,error:lr}=(0,g.I)({queryKey:["tenantlist",Le],queryFn:()=>(0,de.Mn)(Le),enabled:0!==Le}),{data:sr,isLoading:ar,isError:cr,error:dr}=(0,g.I)({queryKey:["gettenantlocations",Kt],queryFn:()=>(0,de.DL)(Kt),enabled:0!==Kt}),hr=(0,v.n)({mutationFn:de.k3,onSuccess:()=>{(0,o.M8)("Notification sent Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})},onError:e=>{(0,o.M8)(e.message,{variant:"error",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})}}),ur=(0,v.n)({mutationFn:e=>{let{selectedRider:t,selectedRow:r}=e;return(0,de.R_)(t,r)},onSuccess:(e,t)=>{let{selectedRider:r,selectedRow:n}=t;Wt(!1),Ft(!1),"Success"===e.data.message&&(i.A.info("Rider changed successfully for order ID ".concat(null===n||void 0===n?void 0:n.orderid,". New Rider: ").concat(null===r||void 0===r?void 0:r.firstname," ").concat(null===r||void 0===r?void 0:r.lastname)),xr("Rider Changed Successfully","success")),Hr(),wr(),Lr(),hr.mutate(r.userfcmtoken)},onError:(e,t)=>{let{selectedRider:r,selectedRow:n}=t;i.A.error("Failed to change rider for order ID ".concat(null===n||void 0===n?void 0:n.orderid,":"),e),xr(e.message,"error"),Wt(!1)}}),xr=(e,t)=>{(0,o.M8)(e,{variant:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3})},{data:pr}=(0,g.I)({queryKey:["orderdetails",gt],queryFn:()=>(0,de.z3)(gt),enabled:!!gt}),Ar=()=>{Ce(!1)},{data:vr,isLoading:gr,isError:mr,error:jr,fetchNextPage:fr,hasNextPage:br,isFetchingNextPage:yr,refetch:wr}=(0,m.q)({queryKey:["fetchdeliveries",Le,t,nt,Me,Re,ht,bt,Kt,Ht,Vt],queryFn:de.tL,getNextPageParam:e=>{var t;return null!==(t=e.nextPage)&&void 0!==t?t:void 0}}),{data:Sr,fetchNextPage:kr,hasNextPage:Cr,isFetchingNextPage:Dr,isLoading:Wr,refetch:Lr}=(null===vr||void 0===vr||vr.pages.flatMap((e=>e.rows)),(0,m.q)({queryKey:["fetchdeliveries-batchcounts",Le,t,"all",Me,Re,200,"",Kt,Ht,Vt],queryFn:de.tL,getNextPageParam:e=>{var t;return null!==(t=e.nextPage)&&void 0!==t?t:void 0}})),Pr=(0,a.useMemo)((()=>((null===Sr||void 0===Sr?void 0:Sr.pages)||[]).flatMap((e=>e.rows||[]))),[Sr]);(0,a.useEffect)((()=>{Cr&&!Dr&&kr()}),[Cr,Dr,kr,Pr.length]);const Mr=Cr||Dr,Yr=(0,a.useMemo)((()=>{const e=String(nt||"").toLowerCase(),t=String(bt||"").trim().toLowerCase();return Pr.filter((r=>{if("all"!==Xt&&we(r)!==Xt)return!1;const n=String(r.orderstatus||"").toLowerCase();if(e&&n!==e)return!1;if(t){if(![r.deliverycustomer,r.deliveryaddress,r.deliverysuburb,r.pickupcustomer,r.pickupaddress,r.pickupsuburb,r.orderid,r.tenantname,r.ridername,r.username].map((e=>String(e||"").toLowerCase())).join(" ").includes(t))return!1}return!0}))}),[Pr,Xt,nt,bt]),Rr=(0,a.useMemo)((()=>{const e={uncoveredLength:0,assignedLength:0,arrivedLength:0,pickedLength:0,activeLength:0,skippedLength:0,coveredLength:0,cancelLength:0};return Pr.forEach((t=>{if("all"!==Xt&&we(t)!==Xt)return;switch(String(t.orderstatus||"").toLowerCase()){case"pending":e.uncoveredLength+=1;break;case"accepted":case"assigned":e.assignedLength+=1;break;case"arrived":e.arrivedLength+=1;break;case"picked":e.pickedLength+=1;break;case"active":e.activeLength+=1;break;case"skipped":e.skippedLength+=1;break;case"delivered":e.coveredLength+=1;break;case"cancelled":case"canceled":e.cancelLength+=1}})),e}),[Pr,Xt]),Er=(0,a.useMemo)((()=>{const e={all:Pr.length};return je.forEach((t=>{"all"!==t.id&&(e[t.id]=0)})),Pr.forEach((t=>{const r=we(t);r&&(e[r]=(e[r]||0)+1)})),e}),[Pr]);(0,a.useEffect)((()=>{if(!Cr)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&kr()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return d.current&&e.observe(d.current),()=>{d.current&&e.unobserve(d.current)}}),[Cr,kr]);const{data:zr,isLoading:Fr,isError:Or,error:Tr}=(0,g.I)({queryKey:["fetchpercentageaPI",Le],queryFn:()=>(0,de.RG)(Le)});(0,a.useEffect)((()=>{zr&&console.log("percentageData",zr)}),[zr]);const{data:Ir={},isLoading:Nr,isError:Kr,error:qr,refetch:Hr}=(0,g.I)({queryKey:["fetchCountData",Le,t,Me,Re,ht,bt,Kt,Ht,Vt,ze],queryFn:()=>(0,de.qB)(Le,t,Me,Re,ht,bt,Kt,Ht,Vt)});(0,a.useEffect)((()=>{console.log("countData",Ir),0===Oe&&Ir&&pt(Ir.uncoveredLength)}),[Ir]);const{data:Jr=[],isLoading:Br,isError:Gr,error:Ur}=(0,g.I)({queryKey:["ridersList",Le],queryFn:de.Sd,enabled:Boolean(Le),onError:e=>{(0,xe.k)(e.message,"error",2e3)}}),Zr=(0,v.n)({mutationFn:e=>(0,de.wT)(e),onSuccess:e=>{console.log(e),e.data.status&&(xr("Updated Successfully","success"),Ze(""),Qe(""),Ce(!1),wr(),Hr(),Lr())},onError:e=>{console.log(e),xr(e.message,"success")}}),Vr=mr?"Error fetching percentages: ".concat(null===jr||void 0===jr?void 0:jr.message):Or?"Error fetching percentages: ".concat(null===Tr||void 0===Tr?void 0:Tr.message):Kr?"Error fetching percentages: ".concat(null===qr||void 0===qr?void 0:qr.message):Gr?"Error fetching percentages: ".concat(null===Ur||void 0===Ur?void 0:Ur.message):or?"Error tenant list: ".concat(null===lr||void 0===lr?void 0:lr.message):cr?"Error location list: ".concat(null===dr||void 0===dr?void 0:dr.message):null;return Vr?(console.log("errorMessage",Vr),(0,xe.k)(Vr,"error",2e3),null):(0,ge.jsxs)(ge.Fragment,{children:[(Nr||Fr||Wr||ir||ar||Br)&&(0,ge.jsx)(ge.Fragment,{children:(0,ge.jsx)(se.A,{})}),(0,ge.jsx)(j.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:Nr||Fr||gr||ir||ar||Br}),(0,ge.jsx)(ue.A,{title:"Deliveries",children:(0,ge.jsx)(Ae.A,{ref:st,locaName:De,setAppId:Pe,setLocoName:We,setPage:dt,sx:{width:{xs:"100%",custom450:300},zIndex:"100"}})}),(0,ge.jsx)(f.Ay,{container:!0,spacing:2,sx:{mt:"1px"},children:[{label:"Created orders",value:null===zr||void 0===zr?void 0:zr.uncoveredOrders,percentage:null===zr||void 0===zr?void 0:zr.percentage1,color:r.palette.info.main},{label:"Pending orders",value:null===zr||void 0===zr?void 0:zr.assignedOrders,percentage:null===zr||void 0===zr?void 0:zr.percentage2,color:r.palette.warning.main},{label:"Delivered orders",value:null===zr||void 0===zr?void 0:zr.pickedOrders,percentage:null===zr||void 0===zr?void 0:zr.percentage3,color:r.palette.success.main},{label:"Cancelled Orders",value:null===zr||void 0===zr?void 0:zr.coveredOrders,percentage:null===zr||void 0===zr?void 0:zr.percentage4,color:r.palette.error.main}].map(((e,t)=>{var r;return(0,ge.jsx)(f.Ay,{item:!0,xs:12,custom400:6,sm:3,sx:{cursor:"pointer"},children:(0,ge.jsx)(x.A,{primary:e.label,secondary:Fr?(0,ge.jsx)(b.A,{sx:{width:"30px"},animation:"wave"}):e.value,percentage:null===(r=e.percentage)||void 0===r?void 0:r.toString(),color:e.color})},t)}))}),(0,ge.jsxs)(y.A,{direction:"row",justifyContent:"space-between",alignItems:"center",gap:3,sx:{flexWrap:"wrap",my:2},children:[(0,ge.jsxs)(y.A,{direction:"row",flexWrap:"wrap",gap:1.5,alignItems:"center",children:[(()=>{const e=je.find((e=>e.id===Xt))||je[0],t=fe[e.iconKey]||A.VP9;return(0,ge.jsx)(w.A,{disableClearable:!0,size:"small",openOnFocus:!0,selectOnFocus:!0,filterOptions:e=>e,options:je,value:e,onChange:(e,t)=>t&&_t(t.id),getOptionLabel:e=>e.label,isOptionEqualToValue:(e,t)=>e.id===t.id,PaperComponent:e=>(0,ge.jsx)(S.A,(0,n.A)((0,n.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:"0 14px 40px rgba(15, 23, 42, 0.18)",border:"1px solid",borderColor:"divider",overflow:"hidden"}})),ListboxProps:{sx:{py:0,maxHeight:360}},renderOption:(e,t,r)=>{var i;let{selected:o}=r;const l=fe[t.iconKey]||A.VP9,s=null!==(i=Er[t.id])&&void 0!==i?i:0;return(0,a.createElement)("li",(0,n.A)((0,n.A)({},e),{},{key:t.id,style:{display:"flex",alignItems:"center",gap:12,padding:"10px 14px",borderBottom:"1px solid #f1f5f9",backgroundColor:o?"".concat(t.color,"10"):"transparent",transition:"background-color 0.15s"}}),(0,ge.jsx)(k.A,{sx:{width:36,height:36,bgcolor:o?t.color:"".concat(t.color,"18"),color:o?"#fff":t.color,transition:"background-color 0.15s, color 0.15s"},children:(0,ge.jsx)(l,{size:20})}),(0,ge.jsxs)(y.A,{direction:"column",spacing:0,flex:1,minWidth:0,children:[(0,ge.jsx)(C.A,{variant:"body2",fontWeight:700,color:"#0f172a",noWrap:!0,children:t.label}),(0,ge.jsx)(C.A,{variant:"caption",color:"text.secondary",noWrap:!0,children:t.range})]}),(0,ge.jsx)(D.A,{size:"small",label:s,sx:{minWidth:36,height:22,fontWeight:800,fontSize:11,bgcolor:s>0?"".concat(t.color,"18"):"#f1f5f9",color:s>0?t.color:"#94a3b8",border:"1px solid ".concat(s>0?t.color+"55":"#e2e8f0"),"& .MuiChip-label":{px:.75}}}),o&&(0,ge.jsx)(k.A,{sx:{width:22,height:22,bgcolor:t.color,color:"#fff"},children:(0,ge.jsx)(A.g9_,{size:14})}))},renderInput:r=>{var i;return(0,ge.jsx)(W.A,(0,n.A)((0,n.A)({},r),{},{placeholder:"Batch",inputProps:(0,n.A)((0,n.A)({},r.inputProps),{},{readOnly:!0,style:(0,n.A)((0,n.A)({},(null===(i=r.inputProps)||void 0===i?void 0:i.style)||{}),{},{cursor:"pointer",caretColor:"transparent"})}),InputProps:(0,n.A)((0,n.A)({},r.InputProps),{},{startAdornment:(0,ge.jsx)(y.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,ge.jsx)(k.A,{sx:{width:24,height:24,bgcolor:"".concat(e.color,"18"),color:e.color},children:(0,ge.jsx)(t,{size:14})})})}),sx:{minWidth:240,cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"999px",bgcolor:"".concat(e.color,"08"),fontWeight:700,color:e.color,paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s, background-color 0.2s","& fieldset":{borderColor:"".concat(e.color,"55"),borderWidth:1.5},"&:hover fieldset":{borderColor:e.color},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(e.color,"26")},"&.Mui-focused fieldset":{borderColor:e.color,borderWidth:2}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:e.color}}}))}})})(),Me&&Re&&(0,ge.jsx)(D.A,{avatar:(0,ge.jsx)(k.A,{sx:{backgroundColor:"transparent"},children:(0,ge.jsx)(A.tjE,{fontSize:"30px",style:{color:"#fbc02d"}})}),label:(0,ge.jsxs)(C.A,{noWrap:!0,color:"secondary",children:[h()(Me).format("DD/MM/YYYY")," - ",h()(Re).format("DD/MM/YYYY")]}),onClick:()=>Ne(!0),variant:"combined",color:"warning",sx:{maxWidth:"100%",cursor:"pointer"}})]}),(0,ge.jsx)(w.A,{disablePortal:!0,options:nr||[],value:Bt,sx:{minWidth:200,flex:1},onOpen:e=>{Le||(e.preventDefault(),(0,xe.k)("Please select a your location first!","warning",3e3),setTimeout((()=>{var e;null===(e=st.current)||void 0===e||e.focus()}),0))},onChange:(e,t,r)=>{"clear"===r?(qt(0),Gt(null),Jt(0),Zt(null)):(qt((null===t||void 0===t?void 0:t.tenantid)||0),Gt(t),Jt(0),Zt(null))},renderInput:e=>(0,ge.jsx)(W.A,(0,n.A)((0,n.A)({},e),{},{inputRef:at,label:"Select Tenant"}))}),(0,ge.jsx)(w.A,{disablePortal:!0,options:sr||[],getOptionLabel:e=>"".concat(e.locationname," (").concat(e.suburb,")")||0,value:Ut,sx:{minWidth:200,flex:1},onOpen:e=>{Le||Kt?Kt||(e.preventDefault(),(0,xe.k)("Please select a your Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=at.current)||void 0===e||e.focus()}),0)):(e.preventDefault(),(0,xe.k)("Please select a your Location and Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=st.current)||void 0===e||e.focus()}),0))},onChange:(e,t,r)=>{"clear"===r?(Jt(0),Zt(null)):(Jt(t.locationid||0),Zt(t))},renderInput:e=>(0,ge.jsx)(W.A,(0,n.A)((0,n.A)({},e),{},{label:"Select Location"}))}),(0,ge.jsx)(w.A,{sx:{minWidth:200,flex:1},fullWidth:!0,disabled:Br,options:Jr,getOptionLabel:e=>"".concat(e.firstname," ").concat(e.lastname," (").concat(e.contactno,")"),renderInput:e=>(0,ge.jsx)(W.A,(0,n.A)((0,n.A)({},e),{},{label:"Choose Rider"})),onChange:(e,t,r)=>{"clear"===r?Qt(0):(Qt(t.userid),console.log("selected rider",t))},onOpen:e=>{Le||(e.preventDefault(),(0,xe.k)("Please select a your location first!","warning",3e3),setTimeout((()=>{var e;null===(e=st.current)||void 0===e||e.focus()}),0))}})]}),(0,ge.jsxs)(y.A,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap-reverse",gap:2,sx:{border:"1px solid ",borderBottom:0,borderColor:"bg.main",p:1.5},children:[(0,ge.jsxs)(L.A,{value:Oe,onChange:(e,t)=>{dt(0),Te(t),ut(50),0===t&&(Fe("Pending"),it("pending"),pt(null===Ir||void 0===Ir?void 0:Ir.uncoveredLength)),1===t&&(Fe("Assigned"),it("accepted"),pt(null===Ir||void 0===Ir?void 0:Ir.assignedLength)),2===t&&(Fe("Arrived"),it("arrived"),pt(null===Ir||void 0===Ir?void 0:Ir.arrivedLength)),3===t&&(Fe("Picked"),it("picked"),pt(null===Ir||void 0===Ir?void 0:Ir.pickedLength)),4===t&&(Fe("Active"),it("active"),pt(null===Ir||void 0===Ir?void 0:Ir.activeLength)),5===t&&(Fe("Skipped"),it("skipped"),pt(null===Ir||void 0===Ir?void 0:Ir.skippedLength)),6===t&&(Fe("Delivered"),it("delivered"),pt(null===Ir||void 0===Ir?void 0:Ir.coveredLength)),7===t&&(Fe("Cancelled"),it("cancelled"),pt(null===Ir||void 0===Ir?void 0:Ir.cancelLength)),console.log(t),ft("")},variant:"scrollable",scrollButtons:!!(0,P.A)(r.breakpoints.down("custom1000")),allowScrollButtonsMobile:!0,children:[(0,ge.jsx)(M.A,{label:"Assigned",icon:(0,ge.jsx)(D.A,{label:Rr.uncoveredLength,color:"primary",variant:"light",size:"small",sx:{minWidth:40,justifyContent:"center"}}),iconPosition:"end"}),(0,ge.jsx)(M.A,{label:"Accepted",icon:(0,ge.jsx)(D.A,{label:Rr.assignedLength,color:"primary",variant:"light",size:"small",sx:{minWidth:40,justifyContent:"center"}}),iconPosition:"end"}),(0,ge.jsx)(M.A,{label:"Arrived",icon:(0,ge.jsx)(D.A,{label:Rr.arrivedLength,color:"primary",variant:"light",size:"small",sx:{minWidth:40,justifyContent:"center"}}),iconPosition:"end"}),(0,ge.jsx)(M.A,{label:"Picked",icon:(0,ge.jsx)(D.A,{label:Rr.pickedLength,color:"primary",variant:"light",size:"small",sx:{minWidth:40,justifyContent:"center"}}),iconPosition:"end"}),(0,ge.jsx)(M.A,{label:"Active",icon:(0,ge.jsx)(D.A,{label:Rr.activeLength,color:"primary",variant:"light",size:"small",sx:{minWidth:40,justifyContent:"center"}}),iconPosition:"end"}),(0,ge.jsx)(M.A,{label:"Skipped",icon:(0,ge.jsx)(D.A,{label:Rr.skippedLength,color:"primary",variant:"light",size:"small",sx:{minWidth:40,justifyContent:"center"}}),iconPosition:"end"}),(0,ge.jsx)(M.A,{label:"Delivered",icon:(0,ge.jsx)(D.A,{label:Rr.coveredLength,color:"primary",variant:"light",size:"small",sx:{minWidth:40,justifyContent:"center"}}),iconPosition:"end"}),(0,ge.jsx)(M.A,{label:"Cancelled",icon:(0,ge.jsx)(D.A,{label:Rr.cancelLength,color:"primary",variant:"light",size:"small",sx:{minWidth:40,justifyContent:"center"}}),iconPosition:"end"})]}),(0,ge.jsx)(he.A,{value:jt,onChange:ft,onDebouncedChange:yt,sx:{m:0,width:280,flex:1}})]}),(0,ge.jsx)(X.A,{content:!1,children:(0,ge.jsx)(Y.A,{ref:me,onScroll:e=>{const{scrollTop:t,scrollHeight:r,clientHeight:n}=e.currentTarget;t+n>=r-50&&Cr&&!Dr&&kr()},sx:{maxHeight:"calc(100vh - 190px)",overflow:"auto",overflowX:"auto","&::-webkit-scrollbar":{width:"12px",cursor:"pointer"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.primary.main,borderRadius:"8px",cursor:"pointer"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:r.palette.primary.dark,cursor:"pointer"},"&::-webkit-scrollbar-track":{backgroundColor:r.palette.primary.lighter,cursor:"pointer"}},children:(0,ge.jsxs)(R.A,{stickyHeader:!0,sx:{minWidth:1400},children:[(0,ge.jsx)(E.A,{children:(0,ge.jsxs)(z.A,{children:["Created"==ze&&(0,ge.jsx)(F.A,{sx:{whiteSpace:"nowrap"},children:(0,ge.jsx)(O.A,{indeterminate:ye.length>0&&ye.length!=Yr.length,onChange:e=>{e.target.checked?Se([...Yr]):Se([])},checked:ye.length>0&&ye.length==Yr.length})}),(0,ge.jsx)(F.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"S.No "}),(0,ge.jsx)(F.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Tenant "}),(0,ge.jsxs)(F.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:["Order Location"," "]}),(0,ge.jsx)(F.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Pickup "}),(0,ge.jsx)(F.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Drop "}),(0,ge.jsx)(F.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Rider "}),(0,ge.jsx)(F.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Est. Delivery Time"}),(0,ge.jsx)(F.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Transit"}),(0,ge.jsx)(F.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:" Kms"}),(0,ge.jsx)(F.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Amount "}),(0,ge.jsx)(F.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Notes "}),(0,ge.jsx)(F.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Steps"}),(0,ge.jsx)(F.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Qty"}),(0,ge.jsx)(F.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"COD "}),"Cancelled"!==ze&&"Delivered"!==ze&&(0,ge.jsx)(F.A,{align:"right",sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Action"})]})}),(Dt||Wr)&&(0,ge.jsx)(pe.r,{col:8}),(0,ge.jsxs)(T.A,{children:[0==Yr.length&&!Dt&&!Mr&&(0,ge.jsx)(ge.Fragment,{children:(0,ge.jsx)(F.A,{colSpan:14,children:(0,ge.jsx)(c.A,{description:"all"===Xt?"No ".concat(ze," Orders"):"No ".concat(ze," Orders in ").concat((null===(e=je.find((e=>e.id===Xt)))||void 0===e?void 0:e.label)||"this batch"),styles:{description:{color:r.palette.error.main}}})})}),0==Yr.length&&Mr&&(0,ge.jsx)(z.A,{children:(0,ge.jsxs)(F.A,{colSpan:14,sx:{textAlign:"center",py:4},children:[(0,ge.jsx)(ve.A,{}),(0,ge.jsx)(C.A,{variant:"caption",color:"text.secondary",sx:{display:"block",mt:1},children:"Loading deliveries\u2026"})]})}),Yr.map(((e,t)=>{var r,i,o,s;return(0,ge.jsxs)(ge.Fragment,{children:[(0,ge.jsxs)(z.A,{role:"checkbox",tabIndex:-1,sx:{cursor:"pointer",backgroundColor:ye.find((t=>t.orderheaderid==e.orderheaderid))?"#e1bee7":"","&:hover":{backgroundColor:ye.find((t=>t.orderheaderid==e.orderheaderid))?"#e1bee7 !important":""}},children:["Created"==ze&&(0,ge.jsx)(F.A,{children:(0,ge.jsx)(O.A,{onChange:t=>{if(t.target.checked){let t=ye;t.push((0,n.A)((0,n.A)({},e),{},{sno:ye.length+1})),Se([...t])}else{if(ye.find((t=>t.orderheaderid==e.orderheaderid))){let t=ye,r=ye.find((t=>t.orderheaderid==e.orderheaderid));t.splice(r.sno-1,1),t.map(((e,t)=>{e.sno=t+1})),Se([...t])}}console.log("list",ye)},checked:ye.find((t=>t.orderheaderid==e.orderheaderid))})}),(0,ge.jsx)(F.A,{children:(0,ge.jsxs)(C.A,{children:[" ",ct*ht+t+1]})}),(0,ge.jsx)(F.A,{children:(0,ge.jsxs)(I.A,{title:e.tenantadress,children:[(0,ge.jsx)(C.A,{noWrap:!0,variant:"subtitle1",children:e.tenantname}),(0,ge.jsx)(C.A,{noWrap:!0,variant:"body2",children:e.tenantsuburb}),(0,ge.jsx)(C.A,{noWrap:!0,variant:"body2",children:e.applocation})]})}),(0,ge.jsxs)(F.A,{align:"left",children:[(0,ge.jsx)(I.A,{title:"Location Name-Suburb",placement:"top",children:(0,ge.jsx)(C.A,{variant:"subtitle1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,ge.jsxs)(y.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,ge.jsxs)(y.A,{children:[(0,ge.jsx)(I.A,{title:"Order Id",placement:"top",children:(0,ge.jsx)(C.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,ge.jsxs)(I.A,{title:"Ordered date",placement:"top",children:[(0,ge.jsx)(C.A,{noWrap:!0,sx:{fontSize:"12px"},children:h()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,ge.jsx)(C.A,{noWrap:!0,sx:{fontSize:"11px"},children:h()(e.orderdate).utc().format("hh:mm A")})]})]}),"-",(0,ge.jsxs)(y.A,{children:[(0,ge.jsx)(I.A,{title:"Delivery Id",placement:"top",children:(0,ge.jsx)(C.A,{variant:"body2",noWrap:!0,children:e.deliveryid})}),(0,ge.jsxs)(I.A,{title:"Delivery date",placement:"top",children:[(0,ge.jsx)(C.A,{noWrap:!0,sx:{fontSize:"12px"},children:h()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,ge.jsx)(C.A,{noWrap:!0,sx:{fontSize:"11px"},children:h()(e.deliverydate).utc().format("hh:mm A")})]})]})]})]}),(0,ge.jsx)(F.A,{align:"left",children:(0,ge.jsx)(y.A,{direction:"row",spacing:1,children:(0,ge.jsxs)(y.A,{direction:"column",children:[(0,ge.jsx)(C.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:e.pickupcustomer}),(0,ge.jsx)(C.A,{variant:"body2",children:e.pickupcontactno}),(0,ge.jsx)(I.A,{title:e.Pickupaddress,sx:{whiteSpace:"nowrap"},children:(0,ge.jsx)(C.A,{variant:"body2",children:e.pickuplocation||e.Pickupaddress.slice(0,12)+"..."})})]})})}),(0,ge.jsx)(F.A,{align:"left",children:(0,ge.jsx)(y.A,{direction:"row",spacing:1,children:(0,ge.jsxs)(y.A,{direction:"column",children:[(0,ge.jsx)(C.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:e.deliverycustomer}),(0,ge.jsx)(C.A,{variant:"body2",children:e.deliverycontactno}),(0,ge.jsx)(I.A,{title:e.deliveryaddress,children:(0,ge.jsx)(C.A,{variant:"body2",sx:{whiteSpace:"nowrap"},children:"".concat(e.deliverylocation||e.deliveryaddress.slice(0,12)+"...")})})]})})}),(0,ge.jsxs)(F.A,{children:[(0,ge.jsx)(C.A,{variant:"subtitle1",noWrap:!0,children:e.ridername}),(0,ge.jsxs)(C.A,{variant:"subtitle2",children:[" ","ID: ".concat(e.userid)]}),(0,ge.jsxs)(C.A,{variant:"subtitle2",children:[" ",e.ridercontact]})]}),(0,ge.jsx)(F.A,{align:"left",children:(0,ge.jsx)(C.A,{variant:"subtitle1",noWrap:!0,children:e.expecteddeliverytime?h()(e.expecteddeliverytime).format("hh:mm A"):"N/A"})}),(0,ge.jsx)(F.A,{align:"left",children:(0,ge.jsxs)(C.A,{variant:"subtitle1",noWrap:!0,children:[e.transitminutes||0," min"]})}),(0,ge.jsx)(F.A,{children:(0,ge.jsxs)(y.A,{direction:"column",spacing:1,children:[(0,ge.jsx)(I.A,{title:" KMS",placement:"top",children:(0,ge.jsx)(D.A,{label:e.kms||0,size:"small",variant:"light",color:"error"})}),(0,ge.jsx)(I.A,{title:"Actual KMS",children:(0,ge.jsx)(D.A,{label:e.cumulativekms||0,size:"small",color:"success",variant:"light"})})]})}),(0,ge.jsx)(F.A,{align:"left",children:(0,ge.jsxs)(y.A,{direction:"column",spacing:1,children:[(0,ge.jsx)(I.A,{title:" Delivery Charge",placement:"top",children:(0,ge.jsx)(D.A,{label:"\u20b9 ".concat(null===(r=e.deliverycharges)||void 0===r?void 0:r.toFixed(2))||0,size:"small",variant:"light",color:"error"})}),(0,ge.jsx)(I.A,{title:"Delivery Amount",children:(0,ge.jsx)(D.A,{label:"\u20b9 ".concat(null===(i=e.deliveryamt)||void 0===i?void 0:i.toFixed(2))||0,size:"small",color:"success",variant:"light"})})]})}),(0,ge.jsx)(F.A,{children:(0,ge.jsx)(C.A,{children:e.notes})}),(0,ge.jsx)(F.A,{align:"center",children:e.step?(0,ge.jsx)(D.A,{label:e.step,size:"small",color:"primary",variant:"light",sx:{fontWeight:700,minWidth:28}}):(0,ge.jsx)(C.A,{variant:"subtitle2",color:"text.disabled",children:"\u2014"})}),(0,ge.jsx)(F.A,{children:e.Quantity?(0,ge.jsx)(C.A,{variant:"subtitle1",color:"error",sx:{whiteSpace:"nowrap"},children:e.Quantity}):(0,ge.jsxs)(C.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:[" ",e.Quantity]})}),(0,ge.jsx)(F.A,{children:e.collectionamt?(0,ge.jsxs)(C.A,{variant:"subtitle1",color:"error",sx:{whiteSpace:"nowrap"},children:[" ","\u20b9 ".concat(e.collectionamt.toFixed(2))," "]}):(0,ge.jsxs)(C.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:[" ","\u20b9 ".concat(e.collectionamt.toFixed(2))," "]})}),"Cancelled"!==ze&&"Delivered"!==ze&&(0,ge.jsx)(F.A,{children:(0,ge.jsxs)(y.A,{display:"flex",flexDirection:"row",justifyContent:"end",children:["C"==e.deliverytype&&(0,ge.jsx)(I.A,{title:"Product details",placement:"top",children:(0,ge.jsx)(N.A,{color:"primary",onClick:()=>{(null===At||void 0===At?void 0:At.orderid)===e.orderid?(vt(null),mt(null)):(vt(e),mt(e.orderheaderid))},children:(null===At||void 0===At?void 0:At.orderid)===e.orderid?(0,ge.jsx)(ae.A,{}):(0,ge.jsx)(ce.A,{})})}),(0,ge.jsx)(N.A,{color:"primary",size:"small",sx:{bgcolor:"primary.100"},onClick:t=>((e,t)=>{Ct(t),console.log("selectedRow",t),St(e.currentTarget)})(t,e),children:(0,ge.jsx)(l.A,{})}),(0,ge.jsxs)(K.A,{anchorEl:wt,open:er,onClose:tr,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{elevation:4,sx:{minWidth:200,borderRadius:1}},children:["delivered"!==(null===kt||void 0===kt?void 0:kt.orderstatus)&&(0,ge.jsx)(q.A,{onClick:()=>{hr.mutate(kt.userfcmtoken),tr()},children:"Notify Rider"}),["pending","accepted","arrived"].includes(null===kt||void 0===kt?void 0:kt.orderstatus)&&(0,ge.jsx)(q.A,{onClick:()=>{var e;if(!Le)return xr("Please select a location first!","warning"),void(null===(e=st.current)||void 0===e||e.focus());Ft(!0),tr()},children:"Change Rider"}),(1==$t||2==$t)&&(0,ge.jsx)(q.A,{onClick:()=>{Je(kt.kms),Ge(kt.cumulativekms),et(kt.droplat),rt(kt.droplon),Qe(kt.notes),Ze(kt.deliveryamount),lt(kt.orderstatus||"delivered"),_e(kt),Ce(!0),tr()},children:"Update Delivery Status"}),"cancelled"!==(null===kt||void 0===kt?void 0:kt.orderstatus)&&"delivered"!==(null===kt||void 0===kt?void 0:kt.orderstatus)&&(0,ge.jsx)(q.A,{sx:{color:"error.main"},onClick:()=>{Et(!0),tr()},children:"Cancel Delivery"})]})]})})]},e.tenantname),(null===At||void 0===At?void 0:At.orderid)===(null===e||void 0===e?void 0:e.orderid)&&(0,ge.jsx)(z.A,{children:(0,ge.jsx)(F.A,{colSpan:11,sx:{p:0,border:0,"&:hover":{backgroundColor:"white"}},children:(0,ge.jsx)(H.A,{in:!0,timeout:"auto",unmountOnExit:!0,children:(0,ge.jsx)(J.A,{sx:{width:"100%",px:2,py:2},children:(0,ge.jsxs)(R.A,{size:"small",sx:{minWidth:800},children:[(0,ge.jsx)(E.A,{children:(0,ge.jsxs)(z.A,{sx:{"&:hover":{backgroundColor:"transparent !important"}},children:[(0,ge.jsx)(F.A,{sx:{fontWeight:600},children:"S.No"}),(0,ge.jsx)(F.A,{sx:{fontWeight:600},children:"Product Name"}),(0,ge.jsx)(F.A,{sx:{fontWeight:600},children:"Description"}),(0,ge.jsx)(F.A,{align:"right",sx:{fontWeight:600},children:"Quantity"}),(0,ge.jsx)(F.A,{align:"right",sx:{fontWeight:600},children:"Cost"}),(0,ge.jsx)(F.A,{align:"right",sx:{fontWeight:600},children:"Price"}),(0,ge.jsx)(F.A,{align:"right",sx:{fontWeight:600},children:"Tax"}),(0,ge.jsx)(F.A,{align:"right",sx:{fontWeight:600},children:"Amount"})]})}),(0,ge.jsxs)(T.A,{children:[null===pr||void 0===pr||null===(o=pr.details)||void 0===o?void 0:o.map(((e,t)=>{var r,n;return(0,ge.jsxs)(z.A,{sx:{"&:hover":{backgroundColor:"transparent !important"}},children:[(0,ge.jsx)(F.A,{children:t+1}),(0,ge.jsx)(F.A,{children:(0,ge.jsxs)(y.A,{direction:"row",spacing:1,alignItems:"center",children:[(0,ge.jsx)("img",{src:(null===e||void 0===e?void 0:e.productimage)||"https://via.placeholder.com/40",alt:null===e||void 0===e?void 0:e.productname,style:{width:40,height:40,objectFit:"cover",borderRadius:4}}),(0,ge.jsx)(C.A,{variant:"body2",noWrap:!0,children:(null===e||void 0===e?void 0:e.productname)||"Unnamed"})]})}),(0,ge.jsx)(F.A,{children:(null===e||void 0===e?void 0:e.productdescription)||"-"}),(0,ge.jsx)(F.A,{align:"right",children:(null===e||void 0===e?void 0:e.orderqty)||0}),(0,ge.jsxs)(F.A,{align:"right",children:["\u20b9 ",(null===e||void 0===e?void 0:e.price)||0]}),(0,ge.jsxs)(F.A,{align:"right",children:["\u20b9 ",(null!==(r=null===e||void 0===e?void 0:e.productsumprice)&&void 0!==r?r:0).toFixed(2)]}),(0,ge.jsxs)(F.A,{align:"right",children:["\u20b9 ",(null!==(n=null===e||void 0===e?void 0:e.taxamount)&&void 0!==n?n:0).toFixed(2)]}),(0,ge.jsxs)(F.A,{align:"right",children:["\u20b9 ",((null===e||void 0===e?void 0:e.productsumprice)+(null===e||void 0===e?void 0:e.taxamount)).toFixed(2)||0]})]},t)})),(0,ge.jsxs)(z.A,{sx:{"&:hover":{backgroundColor:"transparent !important"}},children:[(0,ge.jsx)(F.A,{align:"right",colSpan:7,sx:{},children:"Total Amount :"}),(0,ge.jsxs)(F.A,{align:"right",sx:{},children:["\u20b9 ",null===pr||void 0===pr||null===(s=pr.pricedetails)||void 0===s?void 0:s.orderamount.toFixed(2)]})]})]})]})})})})})]})})),0!=(null===Pr||void 0===Pr?void 0:Pr.length)&&(0,ge.jsx)(z.A,{children:(0,ge.jsx)(F.A,{colSpan:15,rowSpan:3,children:(0,ge.jsx)("div",{ref:d,style:{height:40,textAlign:"center"},children:Dr||Cr?(0,ge.jsx)(ve.A,{}):"No More Deliveries"})})})]})]})})}),(0,ge.jsx)(B.A,{open:Rt,onClose:()=>Et(!1),maxWidth:"xs",children:(0,ge.jsx)(G.A,{sx:{mt:2,my:1},children:(0,ge.jsxs)(y.A,{alignItems:"center",spacing:3.5,children:[(0,ge.jsx)(k.A,{color:"error",sx:{width:72,height:72,fontSize:"1.75rem"},children:(0,ge.jsx)(s.A,{})}),(0,ge.jsx)(y.A,{spacing:2,children:(0,ge.jsx)(C.A,{variant:"h5",align:"center",children:"Are you sure you want to cancel this delivery?"})}),(0,ge.jsx)(W.A,{fullWidth:!0,label:"Enter Feedback",multiline:!0,maxRows:4,onChange:e=>{Tt(e.target.value)}}),(0,ge.jsxs)(y.A,{direction:"row",spacing:2,sx:{width:1},children:[(0,ge.jsx)(U.A,{fullWidth:!0,color:"error",variant:"contained",onClick:()=>{""==Ot?xr("Enter FeedBack","error"):rr({selectedRow:kt,cancelFeed:Ot}),(async()=>{console.log("cancelridernotification",kt);try{return(await u.A.post("".concat("https://jupiter.nearle.app/live/api/v1","/utils/notifyuser"),{token:kt.userfcmtoken,notification:{title:"NearleXpress",body:"".concat(kt.orderid," have been Cancelled"),sound:"ring",image:""},data:{type:"cancel"}})).data}catch(e){xr(e.message,"error",2e3),console.log(e)}})()},autoFocus:!0,sx:{border:"1px solid red"},children:"Yes, Cancel"}),(0,ge.jsx)(U.A,{fullWidth:!0,onClick:()=>{Et(!1)},color:"secondary",variant:"outlined",children:"No"})]})]})})}),(0,ge.jsxs)(B.A,{open:zt,onClose:()=>Ft(!1),maxWidth:"sm",fullWidth:!0,TransitionComponent:_.s,children:[(0,ge.jsx)(Z.A,{sx:{bgcolor:r.palette.primary.main},children:(0,ge.jsx)(C.A,{variant:"h3",sx:{color:"white"},children:"Change Rider"})}),(0,ge.jsx)(G.A,{dividers:!0,children:(0,ge.jsx)(f.Ay,{container:!0,spacing:2,children:(0,ge.jsx)(f.Ay,{item:!0,xs:12,sx:{m:2},children:(0,ge.jsx)(w.A,{fullWidth:!0,options:Jr,renderInput:e=>(0,ge.jsx)(W.A,(0,n.A)((0,n.A)({},e),{},{label:"Choose Rider"})),onChange:(e,t)=>{Nt(t),i.A.debug("Rider selected in dropdown:",t?"".concat(t.firstname," ").concat(t.lastname):"None")}})})})}),(0,ge.jsx)(V.A,{children:(0,ge.jsxs)(y.A,{direction:"row",spacing:3,children:[(0,ge.jsx)(U.A,{variant:"outlined",color:"secondary",onClick:()=>{Ft(!1)},children:"Cancel"}),(0,ge.jsx)(U.A,{variant:"contained",color:"primary",onClick:()=>{Wt(!0),i.A.info("Initiating rider assignment change for order ID ".concat(null===kt||void 0===kt?void 0:kt.orderid," to rider: ").concat(null===It||void 0===It?void 0:It.firstname," ").concat(null===It||void 0===It?void 0:It.lastname)),ur.mutate({selectedRider:It,selectedRow:kt})},children:"Change Rider"})]})})]}),(0,ge.jsxs)(B.A,{open:Ie,children:[(0,ge.jsx)(Z.A,{align:"left",children:(0,ge.jsx)(C.A,{variant:"h4",children:"Select Filter Options"})}),(0,ge.jsx)(G.A,{sx:{width:"100%"},className:"datedialog",children:(0,ge.jsx)(le.U,{open:Ie,toggle:()=>Ne(!Ie),id:"daterange1",onChange:e=>{"All"===e.label?(Ye(""),Ee(""),Ne(!1)):(Ye(h()(e.startDate).format("YYYY-MM-DD")),Ee(h()(e.endDate).format("YYYY-MM-DD")),e.label?qe(e.label):qe("")),console.log(e)},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,$.A)(new Date,-1),endDate:(0,$.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,$.A)(new Date,1),endDate:(0,$.A)(new Date,1)},{label:"This Week",startDate:(0,ee.A)(new Date),endDate:(0,te.A)(new Date)},{label:"Last Week",startDate:(0,ee.A)((0,re.A)(new Date,-1)),endDate:(0,te.A)((0,re.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,re.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,ne.A)(new Date),endDate:(0,ie.A)(new Date)},{label:"Last Month",startDate:(0,ne.A)((0,oe.A)(new Date,-1)),endDate:(0,ie.A)((0,oe.A)(new Date,-1))}]})}),(0,ge.jsx)(y.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,ge.jsx)(U.A,{variant:"contained",size:"small",onClick:()=>{Ne(!1)},children:"ok"})})]}),(0,ge.jsxs)(B.A,{fullWidth:!0,open:ke,onClose:Ar,scroll:"paper",maxWidth:"sm",TransitionComponent:_.s,children:[(0,ge.jsx)(Z.A,{sx:{bgcolor:"#662582",color:"#fff"},children:"Update Delivery Status"}),(0,ge.jsx)(G.A,{dividers:!0,children:(0,ge.jsx)(X.A,{sx:{height:"100%"},children:(0,ge.jsxs)(f.Ay,{container:!0,spacing:2.5,children:[(0,ge.jsxs)(f.Ay,{item:!0,xs:12,sm:6,children:[(0,ge.jsx)(Q.A,{children:"Kms"}),(0,ge.jsx)(W.A,{fullWidth:!0,value:He,type:"number",onChange:e=>{Je(e.target.value),console.log(e)}})]}),(0,ge.jsxs)(f.Ay,{item:!0,xs:12,sm:6,children:[(0,ge.jsx)(Q.A,{children:"Actual Kms"}),(0,ge.jsx)(W.A,{value:Be,type:"number",onChange:e=>Ge(+e.target.value),fullWidth:!0})]}),(0,ge.jsxs)(f.Ay,{item:!0,xs:12,sm:6,children:[(0,ge.jsx)(Q.A,{children:"Delivery lat"}),(0,ge.jsx)(W.A,{fullWidth:!0,type:"number",value:$e,onChange:e=>{et(e.target.value)}})]}),(0,ge.jsxs)(f.Ay,{item:!0,xs:12,sm:6,children:[(0,ge.jsx)(Q.A,{children:"Delivery Long"}),(0,ge.jsx)(W.A,{value:tt,type:"number",onChange:e=>{rt(e.target.value)},fullWidth:!0})]}),(0,ge.jsxs)(f.Ay,{item:!0,xs:12,children:[(0,ge.jsx)(Q.A,{children:"Amount"}),(0,ge.jsx)(W.A,{fullWidth:!0,type:"number",value:Ue,onChange:e=>Ze(+e.target.value)})]}),(0,ge.jsxs)(f.Ay,{item:!0,xs:12,children:[(0,ge.jsx)(Q.A,{children:"Status"}),(0,ge.jsxs)(W.A,{select:!0,fullWidth:!0,value:ot,onChange:e=>{lt(e.target.value)},children:[(0,ge.jsx)(q.A,{value:"pending",children:"Pending"}),(0,ge.jsx)(q.A,{value:"accepted",children:"Accepted"}),(0,ge.jsx)(q.A,{value:"started",children:"Started"}),(0,ge.jsx)(q.A,{value:"arrived",children:"Arrived"}),(0,ge.jsx)(q.A,{value:"delivered",children:"Delivered"}),(0,ge.jsx)(q.A,{value:"cancelled",children:"Cancelled"})]})]}),(0,ge.jsxs)(f.Ay,{item:!0,xs:12,children:[(0,ge.jsx)(Q.A,{children:"Notes"}),(0,ge.jsx)(W.A,{value:Ve,fullWidth:!0,onChange:e=>Qe(e.target.value)})]})]})})}),(0,ge.jsx)(V.A,{children:(0,ge.jsx)(f.Ay,{container:!0,children:(0,ge.jsx)(f.Ay,{item:!0,xs:12,children:(0,ge.jsxs)(y.A,{direction:"row",justifyContent:"flex-end",spacing:2,sx:{p:2},children:[(0,ge.jsx)(U.A,{variant:"contained",onClick:()=>{Ar()},color:"error",children:"Close"})," ",(0,ge.jsx)(U.A,{variant:"contained",onClick:()=>{He?Be?$e?tt?Ue?Zr.mutate({deliveryid:Xe.deliveryid,orderheaderid:Xe.orderheaderid,orderstatus:ot,deliverytime:h()().format("YYYY-MM-DD HH:mm:ss"),deliverylat:$e,deliverylong:tt,kms:He,cumulativekms:Be,deliveryamt:parseFloat(Ue),notes:Ve,userid:+kt.userid}):xr("Fill Delivery Amount","warning"):xr("Fill Delivery Longitude","warning"):xr("Fill Delivery Latitude","warning"):xr("Fill Actual Kms","warning"):xr("Fill Kms","warning")},children:"Update"})]})})})})]})]})}},47659:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(89379),i=r(48089),o=r(50704),l=r(16491),s=r(82053),a=r(60899),c=r(44414);const d=e=>{let{primary:t,secondary:r,percentage:d,color:h,sx:u}=e;return(0,c.jsx)(i.A,{elevation:0,sx:(0,n.A)({background:h,position:"relative",color:"#fff","&:hover svg":{opacity:1,transform:"scale(1.1)"}},u),children:(0,c.jsxs)(o.A,{children:[(0,c.jsx)(l.A,{sx:{position:"absolute",right:15,top:25,color:"#fff","& svg":{width:36,height:36,opacity:.5,transition:"all .3s ease-in-out"}},children:(0,c.jsx)(s.A,{variant:"h2",color:"inherit",sx:{fontSize:{xs:20,md:25}},children:d&&"number"===typeof d?"".concat(d.toString()," %"):d})}),(0,c.jsxs)(a.Ay,{container:!0,spacing:0,children:[(0,c.jsx)(a.Ay,{item:!0,xs:12,children:(0,c.jsx)(s.A,{variant:"h3",color:"inherit",sx:{fontSize:{xs:16,md:20}},children:r})}),(0,c.jsx)(a.Ay,{item:!0,xs:12,children:(0,c.jsx)(s.A,{variant:"subtitle2",color:"inherit",children:t})})]})]})})}},49883:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(23235),i=r(44414);const o=(0,n.A)((0,i.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDownOutlined")},51778:(e,t,r)=>{r.d(t,{n:()=>k});var n,i,o,l,s,a,c=r(89379),d=r(9950),h=r(39790),u=r(55149),x=r(64137),p=r(83568),A=r(53167),v=r(92750),g=r(15941),m=r(95732),j=r(61664),f=(n=new WeakMap,i=new WeakMap,o=new WeakMap,l=new WeakMap,s=new WeakSet,a=new WeakSet,class extends m.Q{constructor(e,t){super(),(0,h.A)(this,a),(0,h.A)(this,s),(0,u.A)(this,n,{writable:!0,value:void 0}),(0,u.A)(this,i,{writable:!0,value:void 0}),(0,u.A)(this,o,{writable:!0,value:void 0}),(0,u.A)(this,l,{writable:!0,value:void 0}),(0,A.A)(this,i,void 0),(0,A.A)(this,n,e),this.setOptions(t),this.bindMethods(),(0,p.A)(this,s,b).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const r=this.options;this.options=(0,x.A)(this,n).defaultMutationOptions(e),(0,j.f8)(r,this.options)||(0,x.A)(this,n).getMutationCache().notify({type:"observerOptionsUpdated",mutation:(0,x.A)(this,o),observer:this}),null===(t=(0,x.A)(this,o))||void 0===t||t.setOptions(this.options),null!==r&&void 0!==r&&r.mutationKey&&this.options.mutationKey&&(0,j.EN)(r.mutationKey)!==(0,j.EN)(this.options.mutationKey)&&this.reset()}onUnsubscribe(){var e;this.hasListeners()||(null===(e=(0,x.A)(this,o))||void 0===e||e.removeObserver(this))}onMutationUpdate(e){(0,p.A)(this,s,b).call(this),(0,p.A)(this,a,y).call(this,e)}getCurrentResult(){return(0,x.A)(this,i)}reset(){var e;null===(e=(0,x.A)(this,o))||void 0===e||e.removeObserver(this),(0,A.A)(this,o,void 0),(0,p.A)(this,s,b).call(this),(0,p.A)(this,a,y).call(this)}mutate(e,t){var r;return(0,A.A)(this,l,t),null===(r=(0,x.A)(this,o))||void 0===r||r.removeObserver(this),(0,A.A)(this,o,(0,x.A)(this,n).getMutationCache().build((0,x.A)(this,n),this.options)),(0,x.A)(this,o).addObserver(this),(0,x.A)(this,o).execute(e)}});function b(){var e,t;const r=null!==(e=null===(t=(0,x.A)(this,o))||void 0===t?void 0:t.state)&&void 0!==e?e:(0,v.$)();(0,A.A)(this,i,(0,c.A)((0,c.A)({},r),{},{isPending:"pending"===r.status,isSuccess:"success"===r.status,isError:"error"===r.status,isIdle:"idle"===r.status,mutate:this.mutate,reset:this.reset}))}function y(e){g.j.batch((()=>{if((0,x.A)(this,l)&&this.hasListeners()){const h=(0,x.A)(this,i).variables,u=(0,x.A)(this,i).context;var t,r,n,o;if("success"===(null===e||void 0===e?void 0:e.type))null===(t=(r=(0,x.A)(this,l)).onSuccess)||void 0===t||t.call(r,e.data,h,u),null===(n=(o=(0,x.A)(this,l)).onSettled)||void 0===n||n.call(o,e.data,null,h,u);else if("error"===(null===e||void 0===e?void 0:e.type)){var s,a,c,d;null===(s=(a=(0,x.A)(this,l)).onError)||void 0===s||s.call(a,e.error,h,u),null===(c=(d=(0,x.A)(this,l)).onSettled)||void 0===c||c.call(d,void 0,e.error,h,u)}}this.listeners.forEach((e=>{e((0,x.A)(this,i))}))}))}var w=r(15441),S=r(98986);function k(e,t){const r=(0,w.jE)(t),[n]=d.useState((()=>new f(r,e)));d.useEffect((()=>{n.setOptions(e)}),[n,e]);const i=d.useSyncExternalStore(d.useCallback((e=>n.subscribe(g.j.batchCalls(e))),[n]),(()=>n.getCurrentResult()),(()=>n.getCurrentResult())),o=d.useCallback(((e,t)=>{n.mutate(e,t).catch(C)}),[n]);if(i.error&&(0,S.G)(n.options.throwOnError,[i.error]))throw i.error;return(0,c.A)((0,c.A)({},i),{},{mutate:o,mutateAsync:i.mutate})}function C(){}},56311:(e,t,r)=>{r.d(t,{A:()=>x});var n=r(89379),i=r(9950),o=r(2660),l=r(2046),s=r(83274),a=r(25333),c=r(97125),d=r(7762),h=r(52097),u=r(44414);const x=e=>{let{value:t,onChange:r,onDebouncedChange:x,debounceTime:p=500,placeholder:A="Search (ctrl+k)",sx:v}=e;const g=(0,i.useRef)(null),[m]=(0,h.d7)(t,p);return(0,i.useEffect)((()=>{x&&x(m)}),[m,x]),(0,i.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=g.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===g.current&&g.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,u.jsx)(o.A,{sx:(0,n.A)({},v),inputRef:g,placeholder:A,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,u.jsx)(l.A,{position:"start",sx:{mr:-.5},children:(0,u.jsx)(c.A,{})}),endAdornment:(0,u.jsx)(s.A,{title:"Clear",children:(0,u.jsx)(a.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>r(""),children:(0,u.jsx)(d.A,{})})})})}},58691:(e,t,r)=>{r.d(t,{A:()=>s});r(9950);var n=r(16491),i=r(46639),o=r(62217),l=r(44414);function s(e){let{size:t=70,imgSize:r=40,alt:s="loader"}=e;return(0,l.jsxs)(n.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,l.jsx)(i.A,{size:t}),(0,l.jsx)(n.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:r,height:r},children:(0,l.jsx)("img",{src:o,alt:s,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(89379),i=r(9950),o=r(77922),l=r(29925),s=r(26910),a=r(44414);const c=(0,i.forwardRef)(((e,t)=>{let{setAppId:r,setLocoName:c,setPage:d,sx:h,textfeildSx:u}=e;const[x,p]=(0,i.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));return(0,i.useEffect)((()=>{0===x.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await s.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(t.data.status){const e=[...t.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),p(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[x.length]),(0,a.jsx)(o.A,{id:"location-autocomplete",options:x||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},sx:(0,n.A)({},h),onChange:(e,t,n)=>{"clear"===n?(null===r||void 0===r||r(0),null===c||void 0===c||c(""),null===d||void 0===d||d(0)):t&&(null===r||void 0===r||r(t.applocationid),null===c||void 0===c||c(t.locationname),null===d||void 0===d||d(0))},renderInput:e=>(0,a.jsx)(l.A,(0,n.A)((0,n.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,n.A)({},u)}))})}))},62217:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAPnUlEQVR4AdVae3AU9R3/7d4jdyGQQKAhECBAJBSmEAtFSQUjqPgAHGlhRm0lDkWY6Tg+O9qiErR26h8WR8ZWqTMN1ur4qMpDrTyjtDwDJloeCYiBvAgkaZ53l7vb3X4/v9vfZS/Zu9uFwLSfmb3d293f7u/z+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vaRi+A/yuO64bfR9t2eljL09xeEtYAOAQNhfcabrm9J/XtyGPIKn1Lp6B3X19tN6gJ/m29ymSUgKUlMzh2aEncUDmdRe1tXeaPce/dilbxgAOT99evbEQdOuHebJvsHrSC2gpec0Ky/RmNrlV3wVneHWrw427/hHc7C+k/IJEFZ1KSOjDFDIEtLmSRb1LUR94/dZeY+tVROoPDaQo1TQTS9PoSlfik4cA0B9c7mpc1z6GAByghISoZkjivI8MuVRjqEjU52DRuossXir+UJdFHcCXfW+b09VtR9tMnReoefxNJqeCbsF6R7KygL03B56N8/OWK/3tkTaNnHWa/M8zrNIru8iOik0GeADQGHFTabh0q85qL/8Kwu0xSBgTwPB6BiLGMZn83SZzmuQMAhTWz5voEeGoNcgTtWUHiqW8OO8vLww+R5lz5494UT2PBDEY9rSQqOTHAmP91TFdNGChJsyPTdlelztqcMu6i+XvNiIkBQRHlcPHGv6sUbHIKzo56J1AZBkvR5cSFhUVBR2CbD69bIpysvLecdoAHqINOytm0ijJt9J3r+TVBLHXfrGkwsiJRIMLF1i76MBEue7qE0XqTPadYiNnFen3j6Ad5HGYSDwTcslkQYGamVULLrLpH7y6dOnuY1TGctFFR0hcYfhvujinQ6eaNBgYc6sEHm+0WAKqatEWJkwYYI6depUjYhbtuWrBW775GGd1FEXFQA8FFsR8+HRMdFBKocgPrTvRkgnh4l70ijPxtwAzpLnCLpDvSztvFqQ9C8PuAPEINDeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg=="},67562:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(23235),i=r(44414);const o=(0,n.A)((0,i.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUpOutlined")},94826:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(59254),i=r(46639),o=r(62217),l=r(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"}))),a=(0,n.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),c=()=>(0,l.jsxs)(s,{children:[(0,l.jsx)(i.A,{color:"primary",size:80,thickness:6}),(0,l.jsx)(a,{children:(0,l.jsx)("img",{src:o,alt:"Logo",style:{width:"100%",height:"100%"}})})]})},96646:(e,t,r)=>{r.d(t,{r:()=>a});var n=r(9213),i=r(21671),o=r(82917),l=r(93230),s=r(44414);const a=e=>{let{rowsPerPage:t=5,col:r=1}=e;return(0,s.jsx)(s.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,s.jsxs)(n.A,{children:[(0,s.jsx)(i.A,{children:(0,s.jsx)(o.A,{variant:"circular",width:24,height:24})}),(0,s.jsx)(i.A,{children:(0,s.jsx)(o.A,{variant:"text",width:30})}),Array.from({length:r}).map(((e,t)=>(0,s.jsx)(i.A,{children:(0,s.jsxs)(l.A,{spacing:.5,children:[(0,s.jsx)(o.A,{variant:"text",width:100}),(0,s.jsx)(o.A,{variant:"text",width:80})]})},t))),(0,s.jsx)(i.A,{children:(0,s.jsx)(o.A,{variant:"text",width:150})}),(0,s.jsx)(i.A,{children:(0,s.jsx)(o.A,{variant:"rounded",width:60,height:24})}),(0,s.jsx)(i.A,{align:"center",children:(0,s.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,s.jsx)(o.A,{variant:"circular",width:28,height:28}),(0,s.jsx)(o.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]); |