1 line
20 KiB
JavaScript
1 line
20 KiB
JavaScript
"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6849],{25713:(e,n,t)=>{t.d(n,{A:()=>m});var a=t(98587),r=t(58168),l=t(9950),i=t(72004),s=t(3484),o=t(59254),c=t(18463),d=t(45558),x=t(1614);function h(e){return(0,x.Ay)("MuiCardActions",e)}(0,d.A)("MuiCardActions",["root","spacing"]);var p=t(44414);const u=["disableSpacing","className"],A=(0,o.Ay)("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.root,!t.disableSpacing&&n.spacing]}})((e=>{let{ownerState:n}=e;return(0,r.A)({display:"flex",alignItems:"center",padding:8},!n.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})})),m=l.forwardRef((function(e,n){const t=(0,c.b)({props:e,name:"MuiCardActions"}),{disableSpacing:l=!1,className:o}=t,d=(0,a.A)(t,u),x=(0,r.A)({},t,{disableSpacing:l}),m=(e=>{const{classes:n,disableSpacing:t}=e,a={root:["root",!t&&"spacing"]};return(0,s.A)(a,h,n)})(x);return(0,p.jsx)(A,(0,r.A)({className:(0,i.A)(m.root,o),ownerState:x,ref:n},d))}))},27182:(e,n,t)=>{t.d(n,{A:()=>d});var a=t(89379),r=(t(9950),t(14857)),l=t(25713),i=t(60899),s=t(93230),o=t(82053),c=t(44414);const d=e=>{let{title:n,secondary:t,sx:d}=e;const x=(0,r.A)();return(0,c.jsx)(l.A,{sx:(0,a.A)({position:"sticky",top:"30px",bgcolor:x.palette.background.default,zIndex:10,width:"100%"},d),children:(0,c.jsx)(i.Ay,{container:!0,children:(0,c.jsx)(i.Ay,{item:!0,xs:12,children:(0,c.jsxs)(s.A,{direction:"row",justifyContent:"space-between",alignItems:"center",gap:2,sx:{flexWrap:"wrap"},children:[(0,c.jsx)(o.A,{variant:"h3",children:n}),t]})})})})}},35678:(e,n,t)=>{t.d(n,{A:()=>f});var a=t(9950),r=t(96583),l=t(40033),i=t(82053),s=t(28170),o=t(93230),c=t(82223),d=t(55916),x=t(4159),h=t.n(x),p=t(56712),u=t(81417),A=t(96600),m=t(53132),g=t(94289),j=t(57326),b=t(50624),v=t(44414);const f=e=>{let{open:n,onClose:t,onSelect:x}=e;const[f,w]=(0,a.useState)(null);return(0,v.jsxs)(r.A,{open:n,onClose:t,children:[(0,v.jsx)(l.A,{align:"left",children:(0,v.jsx)(i.A,{variant:"h4",children:"Select Filter Options"})}),(0,v.jsx)(s.A,{sx:{width:"100%"},className:"datedialog",children:(0,v.jsx)(d.U,{open:n,toggle:t,id:"daterange1",onChange:e=>{w({startDate:h()(e.startDate).format("YYYY-MM-DD"),endDate:h()(e.endDate).format("YYYY-MM-DD"),label:e.label||"custom"})},definedRanges:[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,p.A)(new Date,-1),endDate:(0,p.A)(new Date,-1)},{label:"Tomorrow",startDate:(0,p.A)(new Date,1),endDate:(0,p.A)(new Date,1)},{label:"This Week",startDate:(0,u.A)(new Date),endDate:(0,A.A)(new Date)},{label:"Last Week",startDate:(0,u.A)((0,m.A)(new Date,-1)),endDate:(0,A.A)((0,m.A)(new Date,-1))},{label:"Last 7 Days",startDate:(0,m.A)(new Date,-1),endDate:new Date},{label:"This Month",startDate:(0,g.A)(new Date),endDate:(0,j.A)(new Date)},{label:"Last Month",startDate:(0,g.A)((0,b.A)(new Date,-1)),endDate:(0,j.A)((0,b.A)(new Date,-1))}]})}),(0,v.jsx)(o.A,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",p:2},children:(0,v.jsx)(c.A,{variant:"contained",size:"small",onClick:()=>{f?(x(f),t()):t()},children:"OK"})})]})}},47644:(e,n,t)=>{var a=t(24994);n.A=void 0;var r=a(t(79526)),l=t(44414);n.A=(0,r.default)((0,l.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp")},56849:(e,n,t)=>{t.r(n),t.d(n,{default:()=>E});var a=t(89379),r=t(9950),l=t(27182),i=t(26910),s=t(36150),o=t(13838),c=t(82053),d=t(69780),x=t(9213),h=t(21671),p=t(93230),u=t(25277),A=t(83274),m=t(77922),g=t(29925),j=t(1320),b=t(15769),v=t(34075),f=t(25333),w=t(16491),S=t(74745),y=t(85970),D=t(47644),k=t(4159),C=t.n(k),P=t(64367),Y=t(81425),z=t(50027),M=t(52351),I=t(14857),W=t(35678),R=t(59212),L=t(20466),F=t(96646),N=t(44414),T=t(36220);function O(e){return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(e)}function E(){const e=(0,I.A)(),n=(0,r.useRef)(null),t=(0,r.useRef)(null),[k,T]=(0,r.useState)(0),[E,K]=(0,r.useState)(C()().format("YYYY-MM-DD")),[q,H]=(0,r.useState)(C()().format("YYYY-MM-DD")),[V,_]=(0,r.useState)("All"),[U,J]=(0,r.useState)(!1),[B,G]=(0,r.useState)(null),[Z,Q]=(0,r.useState)("Today"),[X,$]=(0,r.useState)(0),[ee,ne]=(0,r.useState)(0),[te,ae]=(0,r.useState)(0),[re,le]=(0,r.useState)(0),[ie,se]=(0,r.useState)(0),[oe,ce]=(0,r.useState)(0),[de,xe]=(0,r.useState)(0),[he,pe]=(0,r.useState)(0),[ue,Ae]=(0,r.useState)([]),me=localStorage.getItem("userid"),[ge,je]=(0,r.useState)(!1),[be,ve]=(0,r.useState)(0),[fe,we]=(0,r.useState)(0),[Se,ye]=(0,r.useState)(null),[De,ke]=(0,r.useState)(null),[Ce,Pe]=(0,r.useState)(0);(0,r.useEffect)((()=>{console.log("openRow",B)}),[B]),(0,r.useEffect)((()=>{we(0),ye(null),ve(0),ke(null),G(null)}),[k]),(0,r.useEffect)((()=>{ve(0),ke(null),G(null)}),[fe]);const Ye=[{id:"s.no",numeric:!1,disablePadding:!0,label:"#",rowSpan:2,colSpan:1,bgcolor:"#f3e5f5"},{id:"clients",numeric:"true",disablePadding:!1,label:fe?"Location":"Tenant",rowSpan:2,colSpan:1,bgcolor:"#f3e5f5"},{id:"all",numeric:"center",disablePadding:!1,label:"All",rowSpan:2,colSpan:1,bgcolor:"#f3e5f5"},{id:"orders",numeric:"center",disablePadding:!1,label:"orders",rowSpan:1,colSpan:3,bgcolor:"#ffcdd2"},{id:"deliveries",numeric:"center",disablePadding:!1,label:"deliveries",rowSpan:1,colSpan:3,bgcolor:"#f8bbd0"},{id:"Charges",numeric:"center",disablePadding:!1,label:"Collection Amt",rowSpan:2,colSpan:1,bgcolor:"#f3e5f5"},{id:"kilometer",numeric:"center",disablePadding:!1,label:"Kms/Actual Kms",rowSpan:2,colSpan:1,bgcolor:"#f3e5f5"},{id:"Amount",numeric:"center",disablePadding:!0,label:"Amount",rowSpan:2,colSpan:1,bgcolor:"#f3e5f5"},{id:"action",numeric:"center",disablePadding:!0,label:"Action",rowSpan:2,colSpan:1,bgcolor:"#f3e5f5"}],ze=[{id:"pending",numeric:!1,disablePadding:!1,label:"pending",rowSpan:1,colSpan:1,bgcolor:"#ffcdd2"},{id:"cancelled",numeric:!1,disablePadding:!1,label:"cancelled",rowSpan:1,colSpan:1,bgcolor:"#ffcdd2"},{id:"completed",numeric:!1,disablePadding:!1,label:"completed",rowSpan:1,colSpan:1,bgcolor:"#ffcdd2"},{id:"pending",numeric:!1,disablePadding:!1,label:"pending",rowSpan:1,colSpan:1,bgcolor:"#f8bbd0"},{id:"cancelled",numeric:!1,disablePadding:!1,label:"cancelled",rowSpan:1,colSpan:1,bgcolor:"#f8bbd0"},{id:"completed",numeric:!1,disablePadding:!1,label:"completed",rowSpan:1,colSpan:1,bgcolor:"#f8bbd0"}],Me=e=>0!==Number(e)?"red":"inherit",Ie=e=>(0,N.jsx)(c.A,{sx:{color:Me(e)},children:e});function We(){return(0,N.jsxs)(d.A,{children:[(0,N.jsx)(x.A,{children:Ye.map((e=>(0,N.jsx)(h.A,{align:"center"==e.numeric?"center":"true"==e.numeric?"left":"right",padding:e.disablePadding?"none":"normal",rowSpan:e.rowSpan,colSpan:e.colSpan,sx:{bgcolor:e.bgcolor},children:e.label},e.id)))}),(0,N.jsx)(x.A,{children:ze.map((e=>(0,N.jsx)(h.A,{align:e.numeric?"right":"left",padding:e.disablePadding?"none":"normal",rowSpan:e.rowSpan,colSpan:e.colSpan,sx:{bgcolor:e.bgcolor},children:e.label},e.id)))})]})}const{data:Re,isLoading:Le,isError:Fe,error:Ne}=(0,s.I)({queryKey:[k,fe,be,E,q],queryFn:fe?Y.U6:Y.DK}),{data:Te}=(0,s.I)({queryKey:["tenantlist",k],queryFn:()=>(0,Y.Mn)(k),enabled:0!==k}),{data:Oe}=(0,s.I)({queryKey:["gettenantlocations",fe],queryFn:()=>(0,Y.DL)(fe),enabled:0!==fe});(0,r.useEffect)((()=>{(()=>{let e=0,n=0,t=0,a=0,r=0,l=0,i=0,s=0;Re&&Re.forEach((o=>{e+=o.charges,n+=o.totalorders,t+=o.Orderspending,a+=o.orderscompleted,r+=o.orderscancelled,l+=o.deliveriespending,i+=o.deliveriescompleted,s+=o.deliveriescancelled})),$(e),ne(n),ae(t),le(a),se(r),ce(l),xe(i),pe(s)})()}),[Re]);return(0,r.useEffect)((()=>{(async()=>{try{const e=[...(await i.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(me))).data.details,{locationname:"All",applocationid:0}];console.log("fetchAppLocations",e),setLocations(e)}catch(e){console.log("locationRes",e)}})()}),[]),Fe&&console.log("An error has occurred:(isErrorReports) "+Ne.message),(0,N.jsxs)(N.Fragment,{children:[(ge||Le)&&(0,N.jsx)(N.Fragment,{children:(0,N.jsx)(M.A,{})}),(0,N.jsx)(l.A,{title:"Orders Summary",secondary:(0,N.jsx)(R.A,{ref:n,locaName:V,setAppId:T,setLocoName:_,setPage:Pe,sx:{minWidth:280,width:"100%",flex:{custom550:0}}})}),(0,N.jsxs)(p.A,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:1,sx:{border:"1px solid",borderColor:"bg.main",p:2},children:[(0,N.jsx)(p.A,{children:E&&q&&(0,N.jsxs)(p.A,{direction:"row",gap:2,flexWrap:"wrap",children:[(0,N.jsx)(u.A,{label:"Orders-".concat(Z),color:"primary",variant:"light",size:"small"}),(0,N.jsx)(A.A,{title:"Date Filter",placement:"top",children:(0,N.jsx)(u.A,{label:(0,N.jsxs)(c.A,{noWrap:!0,color:"secondary",children:[C()(E).format("DD/MM/YYYY")," - ",C()(q).format("DD/MM/YYYY")]}),variant:"combined",color:"warning",size:"small",deleteIcon:(0,N.jsx)(P.A,{style:{fontSize:18}}),onDelete:()=>{J(!0)},onClick:()=>J(!0),sx:{cursor:"pointer"}})})]})}),(0,N.jsxs)(p.A,{sx:{display:"flex",flexDirection:"row",gap:2,flexWrap:"wrap",flexGrow:1,justifyContent:{xs:"start",custom950:"right"}},children:[(0,N.jsx)(m.A,{options:Te||[],value:Se,sx:{minWidth:250,flex:{xs:1,custom950:0}},onOpen:e=>{k||(e.preventDefault(),(0,L.k)("Please select a your app location first!","warning",3e3),setTimeout((()=>{var e;null===(e=n.current)||void 0===e||e.focus()}),0))},onChange:(e,n,t)=>{"clear"===t?(we(0),ye(null),ve(0),ke(null)):(we((null===n||void 0===n?void 0:n.tenantid)||0),ye(n),ve(n.locationid),ke(null))},renderInput:e=>(0,N.jsx)(g.A,(0,a.A)((0,a.A)({},e),{},{inputRef:t,label:"Select Tenant"}))}),(0,N.jsx)(m.A,{options:Oe||[],getOptionLabel:e=>"".concat(e.locationname," (").concat(e.suburb,")")||0,value:De,sx:{minWidth:250,flex:{xs:1,custom950:0}},onOpen:e=>{k||fe?fe||(e.preventDefault(),(0,L.k)("Please select a your Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=t.current)||void 0===e||e.focus()}),0)):(e.preventDefault(),(0,L.k)("Please select a your Location and Tenant first!","warning",3e3),setTimeout((()=>{var e;null===(e=n.current)||void 0===e||e.focus()}),0))},onChange:(e,n,t)=>{"clear"===t?(ve(0),ke(null)):(ve(n.locationid||0),ke(n))},renderInput:e=>(0,N.jsx)(g.A,(0,a.A)((0,a.A)({},e),{},{label:"Select Location"}))})]})]}),(0,N.jsxs)(z.A,{content:!1,children:[(0,N.jsx)(j.A,{sx:{overflow:"auto","&::-webkit-scrollbar":{width:"12px",cursor:"pointer"},"&::-webkit-scrollbar-thumb":{backgroundColor:e.palette.primary.main,borderRadius:"8px",cursor:"pointer"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e.palette.primary.dark,cursor:"pointer"},"&::-webkit-scrollbar-track":{backgroundColor:e.palette.primary.lighter,cursor:"pointer"}},children:(0,N.jsxs)(b.A,{children:[(0,N.jsx)(We,{}),(0,N.jsxs)(v.A,{children:[Le&&(0,N.jsx)(F.r,{col:8}),0==(null===Re||void 0===Re?void 0:Re.length)&&(0,N.jsx)(x.A,{children:(0,N.jsx)(h.A,{colSpan:13,rowSpan:40,children:(0,N.jsx)(p.A,{width:"100%",direction:"row",justifyContent:"center",children:(0,N.jsx)(o.A,{})})})}),(0!=(null===Re||void 0===Re?void 0:Re.length)||Re)&&(null===Re||void 0===Re?void 0:Re.map(((e,n)=>(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(x.A,{children:[(0,N.jsx)(h.A,{children:n+1}),(0,N.jsx)(h.A,{align:"left",children:(0,N.jsxs)(p.A,{spacing:1,children:[(0,N.jsxs)(c.A,{sx:{whiteSpace:"noWrap"},children:[fe?e.locationname:e.tenantname," "]}),(0,N.jsxs)(c.A,{variant:"subtitle2",children:["Id : ",fe?e.locationid:e.tenantid," "]})]})}),(0,N.jsx)(h.A,{align:"center",children:Ie(e.totalorders)}),(0,N.jsx)(h.A,{align:"center",children:Ie(e.Orderspending)}),(0,N.jsx)(h.A,{align:"center",children:Ie(e.orderscancelled)}),(0,N.jsx)(h.A,{align:"center",children:Ie(e.orderscompleted)}),(0,N.jsx)(h.A,{align:"center",children:Ie(e.deliveriespending)}),(0,N.jsx)(h.A,{align:"center",children:Ie(e.deliveriescancelled)}),(0,N.jsx)(h.A,{align:"center",children:Ie(e.deliveriescompleted)}),(0,N.jsx)(h.A,{align:"center",children:(0,N.jsx)(u.A,{size:"small",label:"\u20b9".concat(Number(e.collectionamt).toFixed(2)),variant:"combined",color:e.collectionamt?"warning":"secondary",sx:{cursor:"pointer",minWidth:80}})})," ",(0,N.jsxs)(h.A,{align:"center",children:[(0,N.jsx)(A.A,{title:"kms",placement:"top",children:(0,N.jsx)(u.A,{size:"small",label:"".concat(Number(e.kms).toFixed(2)),color:e.kms?"error":"secondary",variant:"combined",sx:{mb:1,cursor:"pointer",minWidth:80}})}),(0,N.jsx)("br",{}),(0,N.jsx)(A.A,{title:"Actual kms",placement:"bottom",children:(0,N.jsx)(u.A,{size:"small",label:Number(e.cumulativekms).toFixed(2),color:e.cumulativekms?"success":"secondary",variant:"combined",sx:{cursor:"pointer",minWidth:80}})})]}),(0,N.jsx)(h.A,{align:"right",children:(0,N.jsx)(A.A,{title:"Delivery Amount",placement:"top",children:(0,N.jsx)(u.A,{size:"small",label:O(e.charges>=e.deliveryamt?e.charges:e.deliveryamt),color:e.deliveryamt||e.charges?"primary":"secondary",variant:"combined",sx:{cursor:"pointer",minWidth:100}})})}),(0,N.jsx)(h.A,{align:"center",children:(0,N.jsx)(f.A,{"aria-label":"expand row",size:"small",onClick:()=>{if(fe){const n=B!==e.tenantname;if(G(n?e.tenantname:null),!n)return;Ae([]),(async e=>{try{const n=await i.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getriderlocationsummary/?&tenantid=").concat(fe,"&locationid=").concat(e,"&fromdate=").concat(E,"&todate=").concat(q));console.log("riderRes",n.data.details),Ae(n.data.details)}catch(n){console.log("riderRes",n)}})(e.locationid)}else{const n=B!==e.locationname;if(G(n?e.locationname:null),!n)return;Ae([]),(async e=>{je(!0);try{const n=await i.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/deliveries/getuserreportsummary/?&tenantid=").concat(e,"&fromdate=").concat(E,"&todate=").concat(q));console.log("riderRes",n.data.details),Ae(n.data.details)}catch(n){console.log("riderRes",n)}finally{je(!1)}})(e.tenantid)}},sx:{bgcolor:B===e.tenantname?"primary.main":null,color:B===e.tenantname?"white":null,"&:hover":{bgcolor:B===e.tenantname?"primary.main":"#e1bee7"}},children:(0,N.jsx)(A.A,{title:"View Riders",placement:"top",children:fe?B===e.tenantname?(0,N.jsx)(D.A,{}):(0,N.jsx)(y.A,{}):B===e.locationname?(0,N.jsx)(D.A,{}):(0,N.jsx)(y.A,{})})})})]},e.tenantname||e.locationname),(fe?B===e.tenantname:B===e.locationname)&&(0,N.jsx)(x.A,{children:(0,N.jsx)(h.A,{style:{paddingBottom:0,paddingTop:0},colSpan:15,children:(0,N.jsx)(w.A,{sx:{margin:1,border:"1px solid",borderColor:"secondary.lighter"},children:(0,N.jsxs)(b.A,{size:"small",children:[(0,N.jsx)(d.A,{children:(0,N.jsxs)(x.A,{sx:{bgcolor:"primary.lighter"},children:[(0,N.jsx)(h.A,{children:"#"}),(0,N.jsx)(h.A,{children:"Rider"}),(0,N.jsx)(h.A,{align:"center",children:"Orders"}),(0,N.jsx)(h.A,{align:"center",children:"Deliveries"}),(0,N.jsx)(h.A,{align:"center",children:"Pending"}),(0,N.jsx)(h.A,{align:"center",children:"Cancelled"}),(0,N.jsx)(h.A,{align:"center",children:"Completed"}),(0,N.jsx)(h.A,{align:"center",children:"Collection Amt"}),(0,N.jsx)(h.A,{align:"center",children:"kms/Actual kms"}),(0,N.jsx)(h.A,{align:"center",children:"Charges"})]})}),(0,N.jsxs)(v.A,{children:[ge&&(0,N.jsx)(F.r,{col:5}),null===ue||void 0===ue?void 0:ue.map(((e,n)=>(0,N.jsxs)(x.A,{children:[(0,N.jsx)(h.A,{children:n+1}),(0,N.jsx)(h.A,{align:"left",children:(0,N.jsxs)(p.A,{children:[(0,N.jsx)(c.A,{sx:{whiteSpace:"noWrap"},children:" ".concat(e.firstname," ").concat(e.lastname)}),(0,N.jsx)(c.A,{variant:"subtitle2",sx:{whiteSpace:"noWrap"},children:e.ridercontact}),(0,N.jsxs)(c.A,{variant:"subtitle2",sx:{whiteSpace:"noWrap"},children:["ID : ",e.userid]})]})}),(0,N.jsx)(h.A,{align:"center",children:Ie(e.orderscreated)}),(0,N.jsx)(h.A,{align:"center",children:Ie(e.totalorders)}),(0,N.jsx)(h.A,{align:"center",children:Ie(e.deliveriespending)}),(0,N.jsx)(h.A,{align:"center",children:Ie(e.deliveriescancelled)}),(0,N.jsx)(h.A,{align:"center",children:Ie(e.deliveriescompleted)}),(0,N.jsx)(h.A,{align:"center",children:(0,N.jsx)(u.A,{size:"small",label:O(e.collectionamt),color:e.collectionamt?"warning":"secondary",variant:"combined",sx:{cursor:"pointer",minWidth:80}})}),(0,N.jsxs)(h.A,{align:"center",children:[(0,N.jsx)(A.A,{title:"kms",placement:"top",children:(0,N.jsx)(u.A,{size:"small",label:e.kms.toFixed(2),color:e.kms?"error":"secondary",variant:"combined",sx:{mb:1,cursor:"pointer",minWidth:80}})}),(0,N.jsx)("br",{}),(0,N.jsx)(A.A,{title:"Actual kms",placement:"top",children:(0,N.jsx)(u.A,{size:"small",label:e.cumulativekms.toFixed(2),color:e.cumulativekms?"success":"secondary",variant:"combined",sx:{cursor:"pointer",minWidth:80}})})]}),(0,N.jsx)(h.A,{align:"center",children:(0,N.jsx)(A.A,{title:"Delivery Amount",placement:"top",children:(0,N.jsx)(u.A,{size:"small",label:O(e.charges>=e.deliveryamt?e.charges:e.deliveryamt),color:e.deliveryamt||e.charges?"primary":"secondary",variant:"combined",sx:{cursor:"pointer",minWidth:100}})})})]},e.tenantname)))]})]})})})})]})))),0!=(null===Re||void 0===Re?void 0:Re.length)&&Re&&(0,N.jsxs)(x.A,{sx:{},children:[(0,N.jsx)(h.A,{colSpan:2,children:(0,N.jsx)(c.A,{variant:"h5",children:"Total"})}),(0,N.jsx)(h.A,{align:"center",children:(0,N.jsx)(c.A,{variant:"h5",children:ee})}),(0,N.jsx)(h.A,{align:"center",children:(0,N.jsx)(c.A,{variant:"h5",children:te})}),(0,N.jsx)(h.A,{align:"center",children:(0,N.jsxs)(c.A,{variant:"h5",children:[" ",ie]})}),(0,N.jsx)(h.A,{align:"center",children:(0,N.jsx)(c.A,{variant:"h5",children:re})}),(0,N.jsx)(h.A,{align:"center",children:(0,N.jsx)(c.A,{variant:"h5",children:oe})}),(0,N.jsx)(h.A,{align:"center",children:(0,N.jsxs)(c.A,{variant:"h5",children:[" ",he]})}),(0,N.jsx)(h.A,{align:"center",children:(0,N.jsx)(c.A,{variant:"h5",children:de})}),(0,N.jsx)(h.A,{}),(0,N.jsx)(h.A,{}),(0,N.jsx)(h.A,{align:"right",sx:{pr:-2},children:(0,N.jsx)(c.A,{variant:"h5",children:O(X)})}),(0,N.jsx)(h.A,{})]})]})]})}),(0,N.jsx)(S.A,{})]}),(0,N.jsx)(W.A,{open:U,onClose:()=>J(!1),onSelect:e=>{K(e.startDate),H(e.endDate),Q(e.label),console.log("Selected Date Range:",e)}})]})}C().extend(T)},59212:(e,n,t)=>{t.d(n,{A:()=>c});var a=t(89379),r=t(9950),l=t(77922),i=t(29925),s=t(26910),o=t(44414);const c=(0,r.forwardRef)(((e,n)=>{let{setAppId:t,setLocoName:c,setPage:d,sx:x,textfeildSx:h}=e;const[p,u]=(0,r.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));return(0,r.useEffect)((()=>{0===p.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const n=await s.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(n.data.status){const e=[...n.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),u(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[p.length]),(0,o.jsx)(l.A,{id:"location-autocomplete",options:p||[],getOptionLabel:e=>{var n;return null!==(n=null===e||void 0===e?void 0:e.locationname)&&void 0!==n?n:""},sx:(0,a.A)({},x),onChange:(e,n,a)=>{"clear"===a?(null===t||void 0===t||t(0),null===c||void 0===c||c(""),null===d||void 0===d||d(0)):n&&(null===t||void 0===t||t(n.applocationid),null===c||void 0===c||c(n.locationname),null===d||void 0===d||d(0))},renderInput:e=>(0,o.jsx)(i.A,(0,a.A)((0,a.A)({},e),{},{inputRef:n,label:"Select Zones",sx:(0,a.A)({},h)}))})}))},64367:(e,n,t)=>{t.d(n,{A:()=>l});var a=t(23235),r=t(44414);const l=(0,a.A)((0,r.jsx)("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zM9 14H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2zm-8 4H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2z"}),"CalendarMonth")},85970:(e,n,t)=>{var a=t(24994);n.A=void 0;var r=a(t(79526)),l=t(44414);n.A=(0,r.default)((0,l.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown")},96646:(e,n,t)=>{t.d(n,{r:()=>o});var a=t(9213),r=t(21671),l=t(82917),i=t(93230),s=t(44414);const o=e=>{let{rowsPerPage:n=5,col:t=1}=e;return(0,s.jsx)(s.Fragment,{children:Array.from(new Array(n)).map(((e,n)=>(0,s.jsxs)(a.A,{children:[(0,s.jsx)(r.A,{children:(0,s.jsx)(l.A,{variant:"circular",width:24,height:24})}),(0,s.jsx)(r.A,{children:(0,s.jsx)(l.A,{variant:"text",width:30})}),Array.from({length:t}).map(((e,n)=>(0,s.jsx)(r.A,{children:(0,s.jsxs)(i.A,{spacing:.5,children:[(0,s.jsx)(l.A,{variant:"text",width:100}),(0,s.jsx)(l.A,{variant:"text",width:80})]})},n))),(0,s.jsx)(r.A,{children:(0,s.jsx)(l.A,{variant:"text",width:150})}),(0,s.jsx)(r.A,{children:(0,s.jsx)(l.A,{variant:"rounded",width:60,height:24})}),(0,s.jsx)(r.A,{align:"center",children:(0,s.jsxs)(i.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,s.jsx)(l.A,{variant:"circular",width:28,height:28}),(0,s.jsx)(l.A,{variant:"circular",width:28,height:28})]})})]},n)))})}}}]); |