Files
Express_console_build/build/static/js/2851.7b01ee64.chunk.js

1 line
48 KiB
JavaScript

"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[2851],{1367:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(89379),i=(r(9950),r(16491)),o=r(93230),l=r(82053),a=r(44414);const s=e=>{let{sx:t,title:r,children:s,starticon:c}=e;return(0,a.jsx)(i.A,{sx:(0,n.A)({},t),children:(0,a.jsxs)(o.A,{direction:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:1,children:[(0,a.jsxs)(o.A,{children:[c&&c,(0,a.jsx)(l.A,{variant:"h3",children:r})]}),s]})})}},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),a=r(36256),s=r(9950),c=r(13838),d=r(4159),h=r.n(d),u=r(26910),x=r(47659),p=r(14857),g=r(31222),A=r(51778),v=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),Y=r(84142),R=r(1320),M=r(15769),z=r(69780),F=r(9213),T=r(21671),E=r(93038),I=r(34075),N=r(83274),K=r(25333),O=r(17239),q=r(23266),H=r(33738),J=r(16491),B=r(96583),Z=r(28170),G=r(82223),V=r(40033),U=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),ae=r(52351),se=r(67562),ce=r(49883),de=(r(94826),r(81425)),he=r(56311),ue=r(1367),xe=r(20466),pe=r(96646),ge=r(59212),Ae=r(58691),ve=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:g.lB9,morning:g.N3N,afternoon:g.aSE,evening:g.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,s.useRef)(),me=(0,s.useRef)(),[ye,Se]=(0,s.useState)([]),[ke,Ce]=(0,s.useState)(!1),[De,We]=(0,s.useState)("All"),[Le,Pe]=(0,s.useState)(0),[Ye,Re]=(0,s.useState)(h()().format("YYYY-MM-DD")),[Me,ze]=(0,s.useState)(h()().format("YYYY-MM-DD")),[Fe,Te]=(0,s.useState)("Pending"),[Ee,Ie]=(0,s.useState)(0),[Ne,Ke]=(0,s.useState)(!1),[Oe,qe]=(0,s.useState)("Today"),[He,Je]=(0,s.useState)(""),[Be,Ze]=(0,s.useState)(),[Ge,Ve]=(0,s.useState)(),[Ue,Qe]=(0,s.useState)(""),[Xe,_e]=(0,s.useState)({}),[$e,et]=(0,s.useState)(""),[tt,rt]=(0,s.useState)(""),[nt,it]=(0,s.useState)("pending"),[ot,lt]=(0,s.useState)("delivered"),at=(0,s.useRef)(null),st=(0,s.useRef)(null),[ct,dt]=s.useState(0),[ht,ut]=s.useState(50),[xt,pt]=s.useState(),[gt,At]=(0,s.useState)(null),[vt,mt]=(0,s.useState)(null),[jt,ft]=(0,s.useState)(""),[bt,yt]=(0,s.useState)(""),[wt,St]=s.useState(null),[kt,Ct]=(0,s.useState)(null),[Dt,Wt]=(0,s.useState)(!1),[Lt,Pt]=s.useState(null),[Yt,Rt]=(0,s.useState)(""),[Mt,zt]=(0,s.useState)(!1),[Ft,Tt]=(0,s.useState)(!1),[Et,It]=(0,s.useState)(""),[Nt,Kt]=(0,s.useState)(null),[Ot,qt]=(0,s.useState)(0),[Ht,Jt]=(0,s.useState)(0),[Bt,Zt]=(0,s.useState)(null),[Gt,Vt]=(0,s.useState)(null),[Ut,Qt]=(0,s.useState)(0),[Xt,_t]=(0,s.useState)(be),$t=localStorage.getItem("roleid");(0,s.useEffect)((()=>{qt(0),Zt(null),Jt(0),Vt(null)}),[Le]),(0,s.useEffect)((()=>{Jt(0),Vt(null)}),[Ot]);const er=Boolean(wt),tr=()=>{St(null)},{mutate:rr}=(0,A.n)({mutationFn:e=>{let{selectedRow:t,cancelFeed:r}=e;return(0,de.zF)(t,r)},onSuccess:()=>{xr("Delivery Cancelled Successfully","success"),zt(!1),Hr(),wr(),Lr()},onError:e=>{xr(e.message,"error")}}),{data:nr,isLoading:ir,isError:or,error:lr}=(0,v.I)({queryKey:["tenantlist",Le],queryFn:()=>(0,de.Mn)(Le),enabled:0!==Le}),{data:ar,isLoading:sr,isError:cr,error:dr}=(0,v.I)({queryKey:["gettenantlocations",Ot],queryFn:()=>(0,de.DL)(Ot),enabled:0!==Ot}),hr=(0,A.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,A.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),Tt(!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,v.I)({queryKey:["orderdetails",vt],queryFn:()=>(0,de.z3)(vt),enabled:!!vt}),gr=()=>{Ce(!1)},{data:Ar,isLoading:vr,isError:mr,error:jr,fetchNextPage:fr,hasNextPage:br,isFetchingNextPage:yr,refetch:wr}=(0,m.q)({queryKey:["fetchdeliveries",Le,t,nt,Ye,Me,ht,bt,Ot,Ht,Ut],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===Ar||void 0===Ar||Ar.pages.flatMap((e=>e.rows)),(0,m.q)({queryKey:["fetchdeliveries-batchcounts",Le,t,"all",Ye,Me,200,"",Ot,Ht,Ut],queryFn:de.tL,getNextPageParam:e=>{var t;return null!==(t=e.nextPage)&&void 0!==t?t:void 0}})),Pr=(0,s.useMemo)((()=>((null===Sr||void 0===Sr?void 0:Sr.pages)||[]).flatMap((e=>e.rows||[]))),[Sr]);(0,s.useEffect)((()=>{Cr&&!Dr&&kr()}),[Cr,Dr,kr,Pr.length]);const Yr=Cr||Dr,Rr=(0,s.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]),Mr=(0,s.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]),zr=(0,s.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,s.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:Fr,isLoading:Tr,isError:Er,error:Ir}=(0,v.I)({queryKey:["fetchpercentageaPI",Le],queryFn:()=>(0,de.RG)(Le)});(0,s.useEffect)((()=>{Fr&&console.log("percentageData",Fr)}),[Fr]);const{data:Nr={},isLoading:Kr,isError:Or,error:qr,refetch:Hr}=(0,v.I)({queryKey:["fetchCountData",Le,t,Ye,Me,ht,bt,Ot,Ht,Ut,Fe],queryFn:()=>(0,de.qB)(Le,t,Ye,Me,ht,bt,Ot,Ht,Ut)});(0,s.useEffect)((()=>{console.log("countData",Nr),0===Ee&&Nr&&pt(Nr.uncoveredLength)}),[Nr]);const{data:Jr=[],isLoading:Br,isError:Zr,error:Gr}=(0,v.I)({queryKey:["ridersList",Le],queryFn:de.Sd,enabled:Boolean(Le),onError:e=>{(0,xe.k)(e.message,"error",2e3)}}),Vr=(0,A.n)({mutationFn:e=>(0,de.wT)(e),onSuccess:e=>{console.log(e),e.data.status&&(xr("Updated Successfully","success"),Ve(""),Qe(""),Ce(!1),wr(),Hr(),Lr())},onError:e=>{console.log(e),xr(e.message,"success")}}),Ur=mr?"Error fetching percentages: ".concat(null===jr||void 0===jr?void 0:jr.message):Er?"Error fetching percentages: ".concat(null===Ir||void 0===Ir?void 0:Ir.message):Or?"Error fetching percentages: ".concat(null===qr||void 0===qr?void 0:qr.message):Zr?"Error fetching percentages: ".concat(null===Gr||void 0===Gr?void 0:Gr.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 Ur?(console.log("errorMessage",Ur),(0,xe.k)(Ur,"error",2e3),null):(0,ve.jsxs)(ve.Fragment,{children:[(Kr||Tr||Wr||ir||sr||Br)&&(0,ve.jsx)(ve.Fragment,{children:(0,ve.jsx)(ae.A,{})}),(0,ve.jsx)(j.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:Kr||Tr||vr||ir||sr||Br}),(0,ve.jsx)(ue.A,{title:"Deliveries",children:(0,ve.jsx)(ge.A,{ref:at,locaName:De,setAppId:Pe,setLocoName:We,setPage:dt,sx:{width:{xs:"100%",custom450:300},zIndex:"100"}})}),(0,ve.jsx)(f.Ay,{container:!0,spacing:2,sx:{mt:"1px"},children:[{label:"Created orders",value:null===Fr||void 0===Fr?void 0:Fr.uncoveredOrders,percentage:null===Fr||void 0===Fr?void 0:Fr.percentage1,color:r.palette.info.main},{label:"Pending orders",value:null===Fr||void 0===Fr?void 0:Fr.assignedOrders,percentage:null===Fr||void 0===Fr?void 0:Fr.percentage2,color:r.palette.warning.main},{label:"Delivered orders",value:null===Fr||void 0===Fr?void 0:Fr.pickedOrders,percentage:null===Fr||void 0===Fr?void 0:Fr.percentage3,color:r.palette.success.main},{label:"Cancelled Orders",value:null===Fr||void 0===Fr?void 0:Fr.coveredOrders,percentage:null===Fr||void 0===Fr?void 0:Fr.percentage4,color:r.palette.error.main}].map(((e,t)=>{var r;return(0,ve.jsx)(f.Ay,{item:!0,xs:12,custom400:6,sm:3,sx:{cursor:"pointer"},children:(0,ve.jsx)(x.A,{primary:e.label,secondary:Tr?(0,ve.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,ve.jsxs)(y.A,{direction:"row",justifyContent:"space-between",alignItems:"center",gap:3,sx:{flexWrap:"wrap",my:2},children:[(0,ve.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]||g.VP9;return(0,ve.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,ve.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]||g.VP9,a=null!==(i=zr[t.id])&&void 0!==i?i:0;return(0,s.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,ve.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,ve.jsx)(l,{size:20})}),(0,ve.jsxs)(y.A,{direction:"column",spacing:0,flex:1,minWidth:0,children:[(0,ve.jsx)(C.A,{variant:"body2",fontWeight:700,color:"#0f172a",noWrap:!0,children:t.label}),(0,ve.jsx)(C.A,{variant:"caption",color:"text.secondary",noWrap:!0,children:t.range})]}),(0,ve.jsx)(D.A,{size:"small",label:a,sx:{minWidth:36,height:22,fontWeight:800,fontSize:11,bgcolor:a>0?"".concat(t.color,"18"):"#f1f5f9",color:a>0?t.color:"#94a3b8",border:"1px solid ".concat(a>0?t.color+"55":"#e2e8f0"),"& .MuiChip-label":{px:.75}}}),o&&(0,ve.jsx)(k.A,{sx:{width:22,height:22,bgcolor:t.color,color:"#fff"},children:(0,ve.jsx)(g.g9_,{size:14})}))},renderInput:r=>{var i;return(0,ve.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,ve.jsx)(y.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,ve.jsx)(k.A,{sx:{width:24,height:24,bgcolor:"".concat(e.color,"18"),color:e.color},children:(0,ve.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}}}))}})})(),Ye&&Me&&(0,ve.jsx)(D.A,{avatar:(0,ve.jsx)(k.A,{sx:{backgroundColor:"transparent"},children:(0,ve.jsx)(g.tjE,{fontSize:"30px",style:{color:"#fbc02d"}})}),label:(0,ve.jsxs)(C.A,{noWrap:!0,color:"secondary",children:[h()(Ye).format("DD/MM/YYYY")," - ",h()(Me).format("DD/MM/YYYY")]}),onClick:()=>Ke(!0),variant:"combined",color:"warning",sx:{maxWidth:"100%",cursor:"pointer"}})]}),(0,ve.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=at.current)||void 0===e||e.focus()}),0))},onChange:(e,t,r)=>{"clear"===r?(qt(0),Zt(null),Jt(0),Vt(null)):(qt((null===t||void 0===t?void 0:t.tenantid)||0),Zt(t),Jt(0),Vt(null))},renderInput:e=>(0,ve.jsx)(W.A,(0,n.A)((0,n.A)({},e),{},{inputRef:st,label:"Select Tenant"}))}),(0,ve.jsx)(w.A,{disablePortal:!0,options:ar||[],getOptionLabel:e=>"".concat(e.locationname," (").concat(e.suburb,")")||0,value:Gt,sx:{minWidth:200,flex:1},onOpen:e=>{Le||Ot?Ot||(e.preventDefault(),(0,xe.k)("Please select a your Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=st.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=at.current)||void 0===e||e.focus()}),0))},onChange:(e,t,r)=>{"clear"===r?(Jt(0),Vt(null)):(Jt(t.locationid||0),Vt(t))},renderInput:e=>(0,ve.jsx)(W.A,(0,n.A)((0,n.A)({},e),{},{label:"Select Location"}))}),(0,ve.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,ve.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=at.current)||void 0===e||e.focus()}),0))}})]}),(0,ve.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,ve.jsxs)(L.A,{value:Ee,onChange:(e,t)=>{dt(0),Ie(t),ut(50),0===t&&(Te("Pending"),it("pending"),pt(null===Nr||void 0===Nr?void 0:Nr.uncoveredLength)),1===t&&(Te("Assigned"),it("accepted"),pt(null===Nr||void 0===Nr?void 0:Nr.assignedLength)),2===t&&(Te("Arrived"),it("arrived"),pt(null===Nr||void 0===Nr?void 0:Nr.arrivedLength)),3===t&&(Te("Picked"),it("picked"),pt(null===Nr||void 0===Nr?void 0:Nr.pickedLength)),4===t&&(Te("Active"),it("active"),pt(null===Nr||void 0===Nr?void 0:Nr.activeLength)),5===t&&(Te("Skipped"),it("skipped"),pt(null===Nr||void 0===Nr?void 0:Nr.skippedLength)),6===t&&(Te("Delivered"),it("delivered"),pt(null===Nr||void 0===Nr?void 0:Nr.coveredLength)),7===t&&(Te("Cancelled"),it("cancelled"),pt(null===Nr||void 0===Nr?void 0:Nr.cancelLength)),console.log(t),ft("")},variant:"scrollable",scrollButtons:!!(0,P.A)(r.breakpoints.down("custom1000")),allowScrollButtonsMobile:!0,children:[(0,ve.jsx)(Y.A,{label:"Assigned",icon:(0,ve.jsx)(D.A,{label:Mr.uncoveredLength,color:"primary",variant:"light",size:"small",sx:{minWidth:40,justifyContent:"center"}}),iconPosition:"end"}),(0,ve.jsx)(Y.A,{label:"Accepted",icon:(0,ve.jsx)(D.A,{label:Mr.assignedLength,color:"primary",variant:"light",size:"small",sx:{minWidth:40,justifyContent:"center"}}),iconPosition:"end"}),(0,ve.jsx)(Y.A,{label:"Arrived",icon:(0,ve.jsx)(D.A,{label:Mr.arrivedLength,color:"primary",variant:"light",size:"small",sx:{minWidth:40,justifyContent:"center"}}),iconPosition:"end"}),(0,ve.jsx)(Y.A,{label:"Picked",icon:(0,ve.jsx)(D.A,{label:Mr.pickedLength,color:"primary",variant:"light",size:"small",sx:{minWidth:40,justifyContent:"center"}}),iconPosition:"end"}),(0,ve.jsx)(Y.A,{label:"Active",icon:(0,ve.jsx)(D.A,{label:Mr.activeLength,color:"primary",variant:"light",size:"small",sx:{minWidth:40,justifyContent:"center"}}),iconPosition:"end"}),(0,ve.jsx)(Y.A,{label:"Skipped",icon:(0,ve.jsx)(D.A,{label:Mr.skippedLength,color:"primary",variant:"light",size:"small",sx:{minWidth:40,justifyContent:"center"}}),iconPosition:"end"}),(0,ve.jsx)(Y.A,{label:"Delivered",icon:(0,ve.jsx)(D.A,{label:Mr.coveredLength,color:"primary",variant:"light",size:"small",sx:{minWidth:40,justifyContent:"center"}}),iconPosition:"end"}),(0,ve.jsx)(Y.A,{label:"Cancelled",icon:(0,ve.jsx)(D.A,{label:Mr.cancelLength,color:"primary",variant:"light",size:"small",sx:{minWidth:40,justifyContent:"center"}}),iconPosition:"end"})]}),(0,ve.jsx)(he.A,{value:jt,onChange:ft,onDebouncedChange:yt,sx:{m:0,width:280,flex:1}})]}),(0,ve.jsx)(X.A,{content:!1,children:(0,ve.jsx)(R.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,ve.jsxs)(M.A,{stickyHeader:!0,sx:{minWidth:1400},children:[(0,ve.jsx)(z.A,{children:(0,ve.jsxs)(F.A,{children:["Created"==Fe&&(0,ve.jsx)(T.A,{sx:{whiteSpace:"nowrap"},children:(0,ve.jsx)(E.A,{indeterminate:ye.length>0&&ye.length!=Rr.length,onChange:e=>{e.target.checked?Se([...Rr]):Se([])},checked:ye.length>0&&ye.length==Rr.length})}),(0,ve.jsx)(T.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"S.No "}),(0,ve.jsx)(T.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Tenant "}),(0,ve.jsxs)(T.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:["Order Location"," "]}),(0,ve.jsx)(T.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Pickup "}),(0,ve.jsx)(T.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Drop "}),(0,ve.jsx)(T.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Rider "}),(0,ve.jsx)(T.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Est. Delivery Time"}),(0,ve.jsx)(T.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Transit"}),(0,ve.jsx)(T.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:" Kms"}),(0,ve.jsx)(T.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Amount "}),(0,ve.jsx)(T.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Notes "}),(0,ve.jsx)(T.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Steps"}),(0,ve.jsx)(T.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Qty"}),(0,ve.jsx)(T.A,{sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"COD "}),"Cancelled"!==Fe&&"Delivered"!==Fe&&(0,ve.jsx)(T.A,{align:"right",sx:{position:"sticky !important",backgroundColor:r.palette.secondary.light,whiteSpace:"nowrap",border:"none"},children:"Action"})]})}),(Dt||Wr)&&(0,ve.jsx)(pe.r,{col:8}),(0,ve.jsxs)(I.A,{children:[0==Rr.length&&!Dt&&!Yr&&(0,ve.jsx)(ve.Fragment,{children:(0,ve.jsx)(T.A,{colSpan:14,children:(0,ve.jsx)(c.A,{description:"all"===Xt?"No ".concat(Fe," Orders"):"No ".concat(Fe," 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==Rr.length&&Yr&&(0,ve.jsx)(F.A,{children:(0,ve.jsxs)(T.A,{colSpan:14,sx:{textAlign:"center",py:4},children:[(0,ve.jsx)(Ae.A,{}),(0,ve.jsx)(C.A,{variant:"caption",color:"text.secondary",sx:{display:"block",mt:1},children:"Loading deliveries\u2026"})]})}),Rr.map(((e,t)=>{var r,i,o,a;return(0,ve.jsxs)(ve.Fragment,{children:[(0,ve.jsxs)(F.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"==Fe&&(0,ve.jsx)(T.A,{children:(0,ve.jsx)(E.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,ve.jsx)(T.A,{children:(0,ve.jsxs)(C.A,{children:[" ",ct*ht+t+1]})}),(0,ve.jsx)(T.A,{children:(0,ve.jsxs)(N.A,{title:e.tenantadress,children:[(0,ve.jsx)(C.A,{noWrap:!0,variant:"subtitle1",children:e.tenantname}),(0,ve.jsx)(C.A,{noWrap:!0,variant:"body2",children:e.tenantsuburb}),(0,ve.jsx)(C.A,{noWrap:!0,variant:"body2",children:e.applocation})]})}),(0,ve.jsxs)(T.A,{align:"left",children:[(0,ve.jsx)(N.A,{title:"Location Name-Suburb",placement:"top",children:(0,ve.jsx)(C.A,{variant:"subtitle1",noWrap:!0,children:"".concat(e.locationname,"-(").concat(e.locationsuburb,")")})}),(0,ve.jsxs)(y.A,{display:"flex",flexDirection:"row",gap:3,children:[(0,ve.jsxs)(y.A,{children:[(0,ve.jsx)(N.A,{title:"Order Id",placement:"top",children:(0,ve.jsx)(C.A,{variant:"body2",noWrap:!0,children:e.orderid})}),(0,ve.jsxs)(N.A,{title:"Ordered date",placement:"top",children:[(0,ve.jsx)(C.A,{noWrap:!0,sx:{fontSize:"12px"},children:h()(e.orderdate).utc().format("DD/MM/YYYY")}),(0,ve.jsx)(C.A,{noWrap:!0,sx:{fontSize:"11px"},children:h()(e.orderdate).utc().format("hh:mm A")})]})]}),"-",(0,ve.jsxs)(y.A,{children:[(0,ve.jsx)(N.A,{title:"Delivery Id",placement:"top",children:(0,ve.jsx)(C.A,{variant:"body2",noWrap:!0,children:e.deliveryid})}),(0,ve.jsxs)(N.A,{title:"Delivery date",placement:"top",children:[(0,ve.jsx)(C.A,{noWrap:!0,sx:{fontSize:"12px"},children:h()(e.deliverydate).utc().format("DD/MM/YYYY")}),(0,ve.jsx)(C.A,{noWrap:!0,sx:{fontSize:"11px"},children:h()(e.deliverydate).utc().format("hh:mm A")})]})]})]})]}),(0,ve.jsx)(T.A,{align:"left",children:(0,ve.jsx)(y.A,{direction:"row",spacing:1,children:(0,ve.jsxs)(y.A,{direction:"column",children:[(0,ve.jsx)(C.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:e.pickupcustomer}),(0,ve.jsx)(C.A,{variant:"body2",children:e.pickupcontactno}),(0,ve.jsx)(N.A,{title:e.Pickupaddress,sx:{whiteSpace:"nowrap"},children:(0,ve.jsx)(C.A,{variant:"body2",children:e.pickuplocation||e.Pickupaddress.slice(0,12)+"..."})})]})})}),(0,ve.jsx)(T.A,{align:"left",children:(0,ve.jsx)(y.A,{direction:"row",spacing:1,children:(0,ve.jsxs)(y.A,{direction:"column",children:[(0,ve.jsx)(C.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:e.deliverycustomer}),(0,ve.jsx)(C.A,{variant:"body2",children:e.deliverycontactno}),(0,ve.jsx)(N.A,{title:e.deliveryaddress,children:(0,ve.jsx)(C.A,{variant:"body2",sx:{whiteSpace:"nowrap"},children:"".concat(e.deliverylocation||e.deliveryaddress.slice(0,12)+"...")})})]})})}),(0,ve.jsxs)(T.A,{children:[(0,ve.jsx)(C.A,{variant:"subtitle1",noWrap:!0,children:e.ridername}),(0,ve.jsxs)(C.A,{variant:"subtitle2",children:[" ","ID: ".concat(e.userid)]}),(0,ve.jsxs)(C.A,{variant:"subtitle2",children:[" ",e.ridercontact]})]}),(0,ve.jsx)(T.A,{align:"left",children:(0,ve.jsx)(C.A,{variant:"subtitle1",noWrap:!0,children:e.expecteddeliverytime?h()(e.expecteddeliverytime).format("hh:mm A"):"N/A"})}),(0,ve.jsx)(T.A,{align:"left",children:(0,ve.jsxs)(C.A,{variant:"subtitle1",noWrap:!0,children:[e.transitminutes||0," min"]})}),(0,ve.jsx)(T.A,{children:(0,ve.jsxs)(y.A,{direction:"column",spacing:1,children:[(0,ve.jsx)(N.A,{title:" KMS",placement:"top",children:(0,ve.jsx)(D.A,{label:e.kms||0,size:"small",variant:"light",color:"error"})}),(0,ve.jsx)(N.A,{title:"Actual KMS",children:(0,ve.jsx)(D.A,{label:e.cumulativekms||0,size:"small",color:"success",variant:"light"})})]})}),(0,ve.jsx)(T.A,{align:"left",children:(0,ve.jsxs)(y.A,{direction:"column",spacing:1,children:[(0,ve.jsx)(N.A,{title:" Delivery Charge",placement:"top",children:(0,ve.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,ve.jsx)(N.A,{title:"Delivery Amount",children:(0,ve.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,ve.jsx)(T.A,{children:(0,ve.jsx)(C.A,{children:e.notes})}),(0,ve.jsx)(T.A,{align:"center",children:e.step?(0,ve.jsx)(D.A,{label:e.step,size:"small",color:"primary",variant:"light",sx:{fontWeight:700,minWidth:28}}):(0,ve.jsx)(C.A,{variant:"subtitle2",color:"text.disabled",children:"\u2014"})}),(0,ve.jsx)(T.A,{children:e.Quantity?(0,ve.jsx)(C.A,{variant:"subtitle1",color:"error",sx:{whiteSpace:"nowrap"},children:e.Quantity}):(0,ve.jsxs)(C.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:[" ",e.Quantity]})}),(0,ve.jsx)(T.A,{children:e.collectionamt?(0,ve.jsxs)(C.A,{variant:"subtitle1",color:"error",sx:{whiteSpace:"nowrap"},children:[" ","\u20b9 ".concat(e.collectionamt.toFixed(2))," "]}):(0,ve.jsxs)(C.A,{variant:"subtitle1",sx:{whiteSpace:"nowrap"},children:[" ","\u20b9 ".concat(e.collectionamt.toFixed(2))," "]})}),"Cancelled"!==Fe&&"Delivered"!==Fe&&(0,ve.jsx)(T.A,{children:(0,ve.jsxs)(y.A,{display:"flex",flexDirection:"row",justifyContent:"end",children:["C"==e.deliverytype&&(0,ve.jsx)(N.A,{title:"Product details",placement:"top",children:(0,ve.jsx)(K.A,{color:"primary",onClick:()=>{(null===gt||void 0===gt?void 0:gt.orderid)===e.orderid?(At(null),mt(null)):(At(e),mt(e.orderheaderid))},children:(null===gt||void 0===gt?void 0:gt.orderid)===e.orderid?(0,ve.jsx)(se.A,{}):(0,ve.jsx)(ce.A,{})})}),(0,ve.jsx)(K.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,ve.jsx)(l.A,{})}),(0,ve.jsxs)(O.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,ve.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,ve.jsx)(q.A,{onClick:()=>{var e;if(!Le)return xr("Please select a location first!","warning"),void(null===(e=at.current)||void 0===e||e.focus());Tt(!0),tr()},children:"Change Rider"}),(1==$t||2==$t)&&(0,ve.jsx)(q.A,{onClick:()=>{Je(kt.kms),Ze(kt.cumulativekms),et(kt.droplat),rt(kt.droplon),Qe(kt.notes),Ve(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,ve.jsx)(q.A,{sx:{color:"error.main"},onClick:()=>{zt(!0),tr()},children:"Cancel Delivery"})]})]})})]},e.tenantname),(null===gt||void 0===gt?void 0:gt.orderid)===(null===e||void 0===e?void 0:e.orderid)&&(0,ve.jsx)(F.A,{children:(0,ve.jsx)(T.A,{colSpan:11,sx:{p:0,border:0,"&:hover":{backgroundColor:"white"}},children:(0,ve.jsx)(H.A,{in:!0,timeout:"auto",unmountOnExit:!0,children:(0,ve.jsx)(J.A,{sx:{width:"100%",px:2,py:2},children:(0,ve.jsxs)(M.A,{size:"small",sx:{minWidth:800},children:[(0,ve.jsx)(z.A,{children:(0,ve.jsxs)(F.A,{sx:{"&:hover":{backgroundColor:"transparent !important"}},children:[(0,ve.jsx)(T.A,{sx:{fontWeight:600},children:"S.No"}),(0,ve.jsx)(T.A,{sx:{fontWeight:600},children:"Product Name"}),(0,ve.jsx)(T.A,{sx:{fontWeight:600},children:"Description"}),(0,ve.jsx)(T.A,{align:"right",sx:{fontWeight:600},children:"Quantity"}),(0,ve.jsx)(T.A,{align:"right",sx:{fontWeight:600},children:"Cost"}),(0,ve.jsx)(T.A,{align:"right",sx:{fontWeight:600},children:"Price"}),(0,ve.jsx)(T.A,{align:"right",sx:{fontWeight:600},children:"Tax"}),(0,ve.jsx)(T.A,{align:"right",sx:{fontWeight:600},children:"Amount"})]})}),(0,ve.jsxs)(I.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,ve.jsxs)(F.A,{sx:{"&:hover":{backgroundColor:"transparent !important"}},children:[(0,ve.jsx)(T.A,{children:t+1}),(0,ve.jsx)(T.A,{children:(0,ve.jsxs)(y.A,{direction:"row",spacing:1,alignItems:"center",children:[(0,ve.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,ve.jsx)(C.A,{variant:"body2",noWrap:!0,children:(null===e||void 0===e?void 0:e.productname)||"Unnamed"})]})}),(0,ve.jsx)(T.A,{children:(null===e||void 0===e?void 0:e.productdescription)||"-"}),(0,ve.jsx)(T.A,{align:"right",children:(null===e||void 0===e?void 0:e.orderqty)||0}),(0,ve.jsxs)(T.A,{align:"right",children:["\u20b9 ",(null===e||void 0===e?void 0:e.price)||0]}),(0,ve.jsxs)(T.A,{align:"right",children:["\u20b9 ",(null!==(r=null===e||void 0===e?void 0:e.productsumprice)&&void 0!==r?r:0).toFixed(2)]}),(0,ve.jsxs)(T.A,{align:"right",children:["\u20b9 ",(null!==(n=null===e||void 0===e?void 0:e.taxamount)&&void 0!==n?n:0).toFixed(2)]}),(0,ve.jsxs)(T.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,ve.jsxs)(F.A,{sx:{"&:hover":{backgroundColor:"transparent !important"}},children:[(0,ve.jsx)(T.A,{align:"right",colSpan:7,sx:{},children:"Total Amount :"}),(0,ve.jsxs)(T.A,{align:"right",sx:{},children:["\u20b9 ",null===pr||void 0===pr||null===(a=pr.pricedetails)||void 0===a?void 0:a.orderamount.toFixed(2)]})]})]})]})})})})})]})})),0!=(null===Pr||void 0===Pr?void 0:Pr.length)&&(0,ve.jsx)(F.A,{children:(0,ve.jsx)(T.A,{colSpan:15,rowSpan:3,children:(0,ve.jsx)("div",{ref:d,style:{height:40,textAlign:"center"},children:Dr||Cr?(0,ve.jsx)(Ae.A,{}):"No More Deliveries"})})})]})]})})}),(0,ve.jsx)(B.A,{open:Mt,onClose:()=>zt(!1),maxWidth:"xs",children:(0,ve.jsx)(Z.A,{sx:{mt:2,my:1},children:(0,ve.jsxs)(y.A,{alignItems:"center",spacing:3.5,children:[(0,ve.jsx)(k.A,{color:"error",sx:{width:72,height:72,fontSize:"1.75rem"},children:(0,ve.jsx)(a.A,{})}),(0,ve.jsx)(y.A,{spacing:2,children:(0,ve.jsx)(C.A,{variant:"h5",align:"center",children:"Are you sure you want to cancel this delivery?"})}),(0,ve.jsx)(W.A,{fullWidth:!0,label:"Enter Feedback",multiline:!0,maxRows:4,onChange:e=>{It(e.target.value)}}),(0,ve.jsxs)(y.A,{direction:"row",spacing:2,sx:{width:1},children:[(0,ve.jsx)(G.A,{fullWidth:!0,color:"error",variant:"contained",onClick:()=>{""==Et?xr("Enter FeedBack","error"):rr({selectedRow:kt,cancelFeed:Et}),(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,ve.jsx)(G.A,{fullWidth:!0,onClick:()=>{zt(!1)},color:"secondary",variant:"outlined",children:"No"})]})]})})}),(0,ve.jsxs)(B.A,{open:Ft,onClose:()=>Tt(!1),maxWidth:"sm",fullWidth:!0,TransitionComponent:_.s,children:[(0,ve.jsx)(V.A,{sx:{bgcolor:r.palette.primary.main},children:(0,ve.jsx)(C.A,{variant:"h3",sx:{color:"white"},children:"Change Rider"})}),(0,ve.jsx)(Z.A,{dividers:!0,children:(0,ve.jsx)(f.Ay,{container:!0,spacing:2,children:(0,ve.jsx)(f.Ay,{item:!0,xs:12,sx:{m:2},children:(0,ve.jsx)(w.A,{fullWidth:!0,options:Jr,renderInput:e=>(0,ve.jsx)(W.A,(0,n.A)((0,n.A)({},e),{},{label:"Choose Rider"})),onChange:(e,t)=>{Kt(t),i.A.debug("Rider selected in dropdown:",t?"".concat(t.firstname," ").concat(t.lastname):"None")}})})})}),(0,ve.jsx)(U.A,{children:(0,ve.jsxs)(y.A,{direction:"row",spacing:3,children:[(0,ve.jsx)(G.A,{variant:"outlined",color:"secondary",onClick:()=>{Tt(!1)},children:"Cancel"}),(0,ve.jsx)(G.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===Nt||void 0===Nt?void 0:Nt.firstname," ").concat(null===Nt||void 0===Nt?void 0:Nt.lastname)),ur.mutate({selectedRider:Nt,selectedRow:kt})},children:"Change Rider"})]})})]}),(0,ve.jsxs)(B.A,{open:Ne,children:[(0,ve.jsx)(V.A,{align:"left",children:(0,ve.jsx)(C.A,{variant:"h4",children:"Select Filter Options"})}),(0,ve.jsx)(Z.A,{sx:{width:"100%"},className:"datedialog",children:(0,ve.jsx)(le.U,{open:Ne,toggle:()=>Ke(!Ne),id:"daterange1",onChange:e=>{"All"===e.label?(Re(""),ze(""),Ke(!1)):(Re(h()(e.startDate).format("YYYY-MM-DD")),ze(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,ve.jsx)(y.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,ve.jsx)(G.A,{variant:"contained",size:"small",onClick:()=>{Ke(!1)},children:"ok"})})]}),(0,ve.jsxs)(B.A,{fullWidth:!0,open:ke,onClose:gr,scroll:"paper",maxWidth:"sm",TransitionComponent:_.s,children:[(0,ve.jsx)(V.A,{sx:{bgcolor:"#662582",color:"#fff"},children:"Update Delivery Status"}),(0,ve.jsx)(Z.A,{dividers:!0,children:(0,ve.jsx)(X.A,{sx:{height:"100%"},children:(0,ve.jsxs)(f.Ay,{container:!0,spacing:2.5,children:[(0,ve.jsxs)(f.Ay,{item:!0,xs:12,sm:6,children:[(0,ve.jsx)(Q.A,{children:"Kms"}),(0,ve.jsx)(W.A,{fullWidth:!0,value:He,type:"number",onChange:e=>{Je(e.target.value),console.log(e)}})]}),(0,ve.jsxs)(f.Ay,{item:!0,xs:12,sm:6,children:[(0,ve.jsx)(Q.A,{children:"Actual Kms"}),(0,ve.jsx)(W.A,{value:Be,type:"number",onChange:e=>Ze(+e.target.value),fullWidth:!0})]}),(0,ve.jsxs)(f.Ay,{item:!0,xs:12,sm:6,children:[(0,ve.jsx)(Q.A,{children:"Delivery lat"}),(0,ve.jsx)(W.A,{fullWidth:!0,type:"number",value:$e,onChange:e=>{et(e.target.value)}})]}),(0,ve.jsxs)(f.Ay,{item:!0,xs:12,sm:6,children:[(0,ve.jsx)(Q.A,{children:"Delivery Long"}),(0,ve.jsx)(W.A,{value:tt,type:"number",onChange:e=>{rt(e.target.value)},fullWidth:!0})]}),(0,ve.jsxs)(f.Ay,{item:!0,xs:12,children:[(0,ve.jsx)(Q.A,{children:"Amount"}),(0,ve.jsx)(W.A,{fullWidth:!0,type:"number",value:Ge,onChange:e=>Ve(+e.target.value)})]}),(0,ve.jsxs)(f.Ay,{item:!0,xs:12,children:[(0,ve.jsx)(Q.A,{children:"Status"}),(0,ve.jsxs)(W.A,{select:!0,fullWidth:!0,value:ot,onChange:e=>{lt(e.target.value)},children:[(0,ve.jsx)(q.A,{value:"pending",children:"Pending"}),(0,ve.jsx)(q.A,{value:"accepted",children:"Accepted"}),(0,ve.jsx)(q.A,{value:"started",children:"Started"}),(0,ve.jsx)(q.A,{value:"arrived",children:"Arrived"}),(0,ve.jsx)(q.A,{value:"delivered",children:"Delivered"}),(0,ve.jsx)(q.A,{value:"cancelled",children:"Cancelled"})]})]}),(0,ve.jsxs)(f.Ay,{item:!0,xs:12,children:[(0,ve.jsx)(Q.A,{children:"Notes"}),(0,ve.jsx)(W.A,{value:Ue,fullWidth:!0,onChange:e=>Qe(e.target.value)})]})]})})}),(0,ve.jsx)(U.A,{children:(0,ve.jsx)(f.Ay,{container:!0,children:(0,ve.jsx)(f.Ay,{item:!0,xs:12,children:(0,ve.jsxs)(y.A,{direction:"row",justifyContent:"flex-end",spacing:2,sx:{p:2},children:[(0,ve.jsx)(G.A,{variant:"contained",onClick:()=>{gr()},color:"error",children:"Close"})," ",(0,ve.jsx)(G.A,{variant:"contained",onClick:()=>{He?Be?$e?tt?Ge?Vr.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(Ge),notes:Ue,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),a=r(82053),s=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)(a.A,{variant:"h2",color:"inherit",sx:{fontSize:{xs:20,md:25}},children:d&&"number"===typeof d?"".concat(d.toString()," %"):d})}),(0,c.jsxs)(s.Ay,{container:!0,spacing:0,children:[(0,c.jsx)(s.Ay,{item:!0,xs:12,children:(0,c.jsx)(a.A,{variant:"h3",color:"inherit",sx:{fontSize:{xs:16,md:20}},children:r})}),(0,c.jsx)(s.Ay,{item:!0,xs:12,children:(0,c.jsx)(a.A,{variant:"subtitle2",color:"inherit",children:t})})]})]})})}},56311:(e,t,r)=>{r.d(t,{A:()=>x});var n=r(89379),i=r(9950),o=r(2660),l=r(2046),a=r(83274),s=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:g="Search (ctrl+k)",sx:A}=e;const v=(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=v.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===v.current&&v.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,u.jsx)(o.A,{sx:(0,n.A)({},A),inputRef:v,placeholder:g,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)(a.A,{title:"Clear",children:(0,u.jsx)(s.A,{sx:{visibility:t?"visible":"hidden"},onClick:()=>r(""),children:(0,u.jsx)(d.A,{})})})})}},58691:(e,t,r)=>{r.d(t,{A:()=>a});r(9950);var n=r(16491),i=r(46639),o=r(62217),l=r(44414);function a(e){let{size:t=70,imgSize:r=40,alt:a="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:a,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),a=r(26910),s=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 a.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,s.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,s.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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ioLuch8h6dvJfIpxB5aITzjtE/v32kZ/wDTpMBAJC+YkkKWmD8ktlHCQqKmrUnL7BWIh3vs23YcmPgu798Wv/Xz0CM3h2mdwd0wnwjn9QzatSoEJXKw1pEZeMTYxagq73w9FB7Suw8XlVVvaRi+A/yuO64bfR9t2eljL09xeEtYAOAQNhfcabrm9J/XtyGPIKn1Lp6B3X19tN6gJ/m29ymSUgKUlMzh2aEncUDmdRe1tXeaPce/dilbxgAOT99evbEQdOuHebJvsHrSC2gpec0Ky/RmNrlV3wVneHWrw427/hHc7C+k/IJEFZ1KSOjDFDIEtLmSRb1LUR94/dZeY+tVROoPDaQo1TQTS9PoSlfik4cA0B9c7mpc1z6GAByghISoZkjivI8MuVRjqEjU52DRuossXir+UJdFHcCXfW+b09VtR9tMnReoefxNJqeCbsF6R7KygL03B56N8/OWK/3tkTaNnHWa/M8zrNIru8iOik0GeADQGHFTabh0q85qL/8Kwu0xSBgTwPB6BiLGMZn83SZzmuQMAhTWz5voEeGoNcgTtWUHiqW8OO8vLww+R5lz5494UT2PBDEY9rSQqOTHAmP91TFdNGChJsyPTdlelztqcMu6i+XvNiIkBQRHlcPHGv6sUbHIKzo56J1AZBkvR5cSFhUVBR2CbD69bIpysvLecdoAHqINOytm0ijJt9J3r+TVBLHXfrGkwsiJRIMLF1i76MBEue7qE0XqTPadYiNnFen3j6Ad5HGYSDwTcslkQYGamVULLrLpH7y6dOnuY1TGctFFR0hcYfhvujinQ6eaNBgYc6sEHm+0WAKqatEWJkwYYI6depUjYhbtuWrBW775GGd1FEXFQA8FFsR8+HRMdFBKocgPrTvRkgnh4l70ijPxtwAzpLnCLpDvSztvFqQ9C8PuAPEINDeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg=="},94826:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(59254),i=r(46639),o=r(62217),l=r(44414);const a=(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"}))),s=(0,n.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),c=()=>(0,l.jsxs)(a,{children:[(0,l.jsx)(i.A,{color:"primary",size:80,thickness:6}),(0,l.jsx)(s,{children:(0,l.jsx)("img",{src:o,alt:"Logo",style:{width:"100%",height:"100%"}})})]})},96646:(e,t,r)=>{r.d(t,{r:()=>s});var n=r(9213),i=r(21671),o=r(82917),l=r(93230),a=r(44414);const s=e=>{let{rowsPerPage:t=5,col:r=1}=e;return(0,a.jsx)(a.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,a.jsxs)(n.A,{children:[(0,a.jsx)(i.A,{children:(0,a.jsx)(o.A,{variant:"circular",width:24,height:24})}),(0,a.jsx)(i.A,{children:(0,a.jsx)(o.A,{variant:"text",width:30})}),Array.from({length:r}).map(((e,t)=>(0,a.jsx)(i.A,{children:(0,a.jsxs)(l.A,{spacing:.5,children:[(0,a.jsx)(o.A,{variant:"text",width:100}),(0,a.jsx)(o.A,{variant:"text",width:80})]})},t))),(0,a.jsx)(i.A,{children:(0,a.jsx)(o.A,{variant:"text",width:150})}),(0,a.jsx)(i.A,{children:(0,a.jsx)(o.A,{variant:"rounded",width:60,height:24})}),(0,a.jsx)(i.A,{align:"center",children:(0,a.jsxs)(l.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,a.jsx)(o.A,{variant:"circular",width:28,height:28}),(0,a.jsx)(o.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]);