Files
Express_console_build/build/static/js/9593.256e9343.chunk.js

1 line
65 KiB
JavaScript

"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[9593],{23787:(e,t,r)=>{r.d(t,{FG:()=>h,nV:()=>x,pY:()=>p,pg:()=>u});var o=r(22555),i=r(53986),n=r(71392),s=r(55235),l=r(48738),a=r(2866),c=r(65908);const d=["children","scroll","onScroll","sx"],x=e=>{let{children:t,scroll:r=!1,onScroll:s,sx:l}=e,a=(0,i.A)(e,d);return(0,c.jsx)(n.A,(0,o.A)((0,o.A)({spacing:1.25,onScroll:s,sx:(0,o.A)((0,o.A)({p:1.5},r&&{maxHeight:"calc(100vh - 220px)",overflowY:"auto",overflowX:"hidden"}),l)},a),{},{children:t}))},u=e=>{let{accent:t="#662582",header:r,footer:i,selected:n=!1,onClick:a,children:d,sx:x}=e;return(0,c.jsxs)(s.A,{elevation:0,onClick:a,sx:(0,o.A)({position:"relative",overflow:"hidden",flexShrink:0,borderRadius:2.5,border:"1px solid",borderColor:n?t:"#e2e8f0",background:n?"".concat(t,"0a"):"#fff",boxShadow:"0 4px 14px rgba(15,23,42,0.05)",transition:"border-color 0.15s, box-shadow 0.15s"},x),children:[(0,c.jsx)(l.A,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t}}),(0,c.jsxs)(l.A,{sx:{p:1.5,pl:2},children:[r,d,i]})]})},h=e=>{let{children:t,columns:r=2,sx:i}=e;return(0,c.jsx)(l.A,{sx:(0,o.A)({display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:1,mt:1.25},i),children:t})},p=e=>{let{label:t,value:r,children:o,full:i=!1,align:n="left"}=e;return(0,c.jsxs)(l.A,{sx:{gridColumn:i?"1 / -1":"auto",minWidth:0,textAlign:n},children:[(0,c.jsx)(a.A,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",color:"#94a3b8",lineHeight:1.4},children:t}),(0,c.jsx)(l.A,{sx:{mt:.25,minWidth:0},children:void 0!==o?o:(0,c.jsx)(a.A,{sx:{fontSize:13,fontWeight:600,color:"#0f172a"},noWrap:!0,children:null!==r&&void 0!==r?r:"\u2014"})})]})}},27001:(e,t,r)=>{r.d(t,{A:()=>l});var o=r(71392),i=r(48738),n=r(2866),s=r(65908);function l(e){let{title:t,subtitle:r,live:l=!1,action:a}=e;return(0,s.jsxs)(o.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:{xs:2,md:2.5}},children:[(0,s.jsxs)(i.A,{sx:{minWidth:0},children:[(0,s.jsx)(n.A,{variant:"h3",sx:{fontWeight:700,letterSpacing:"-0.02em",color:"grey.800"},children:t}),r&&(0,s.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:.75,sx:{mt:.5},children:[l&&(0,s.jsx)(i.A,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"success.main",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)"}}),(0,s.jsx)(n.A,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:r})]})]}),a&&(0,s.jsx)(i.A,{sx:{flexShrink:0,width:{xs:"100%",sm:"auto"}},children:a})]})}},36803:(e,t,r)=>{r.d(t,{A:()=>x});var o=r(84007),i=r(75953),n=r(71392),s=r(48738),l=r(2866),a=r(91834),c=r(97043),d=r(65908);function x(e){let{title:t,value:r,icon:x,color:u="#662582",caption:h,loading:p=!1}=e;return(0,d.jsx)(o.A,{sx:{height:"100%"},children:(0,d.jsx)(i.A,{sx:{p:{xs:1.75,md:2},"&:last-child":{pb:{xs:1.75,md:2}}},children:(0,d.jsxs)(n.A,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,children:[(0,d.jsxs)(s.A,{sx:{minWidth:0,flex:1},children:[(0,d.jsx)(l.A,{variant:"body2",sx:{fontWeight:500,color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),p?(0,d.jsx)(a.A,{variant:"rounded",sx:{width:72,height:30,mt:.5},animation:"wave"}):(0,d.jsx)(l.A,{sx:{mt:.25,fontWeight:700,letterSpacing:"-0.015em",color:"grey.800",lineHeight:1.15,fontSize:{xs:"1.375rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r}),h&&(0,d.jsx)(l.A,{variant:"caption",sx:{display:"block",mt:.5,color:"text.secondary"},children:h})]}),x&&(0,d.jsx)(c.A,{variant:"rounded",sx:{width:42,height:42,borderRadius:2,bgcolor:"".concat(u,"14"),color:u,flexShrink:0},children:x})]})})})}},56311:(e,t,r)=>{r.d(t,{A:()=>h});var o=r(22555),i=r(85672),n=r(29776),s=r(43318),l=r(23440),a=r(11969),c=r(80795),d=r(51808),x=r(93811),u=r(65908);const h=e=>{let{value:t,onChange:r,onDebouncedChange:h,debounceTime:p=500,placeholder:f="Search (ctrl+k)",sx:g}=e;const b=(0,i.useRef)(null),[v]=(0,x.d7)(t,p);return(0,i.useEffect)((()=>{h&&h(v)}),[v,h]),(0,i.useEffect)((()=>{const e=e=>{var t;"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),null===(t=b.current)||void 0===t||t.focus());"Escape"===e.key&&document.activeElement===b.current&&b.current.blur()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,u.jsx)(n.A,{sx:(0,o.A)({},g),inputRef:b,placeholder:f,autoComplete:"off",value:t,fullWidth:!0,onChange:e=>r(e.target.value),startAdornment:(0,u.jsx)(s.A,{position:"start",sx:{mr:-.5},children:(0,u.jsx)(c.A,{})}),endAdornment:(0,u.jsx)(l.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:()=>l});r(85672);var o=r(48738),i=r(12010),n=r(62217),s=r(65908);function l(e){let{size:t=70,imgSize:r=40,alt:l="loader"}=e;return(0,s.jsxs)(o.A,{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",children:[(0,s.jsx)(i.A,{size:t}),(0,s.jsx)(o.A,{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",sx:{width:r,height:r},children:(0,s.jsx)("img",{src:n,alt:l,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"contain"}})})]})}},59212:(e,t,r)=>{r.d(t,{A:()=>u});var o=r(22555),i=r(85672),n=r(71392),s=r(97043),l=r(17488),a=r(86270),c=r(66157),d=r(48952),x=r(65908);const u=(0,i.forwardRef)(((e,t)=>{let{setAppId:r,setLocoName:u,setPage:h,sx:p,textfeildSx:f,textfieldSx:g,pill:b=!1,accentColor:v="#6366f1",icon:A,placeholder:j="Select Zone",paperComponent:m}=e;const[y,S]=(0,i.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));(0,i.useEffect)((()=>{0===y.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const t=await c.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)),S(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[y.length]);const w=e=>"".concat(v).concat(e),k=w("26"),C=w("18"),W=b?{cursor:"pointer","& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:"#ffffff",fontWeight:600,color:"#0f172a",paddingRight:"8px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat(k)},"&.Mui-focused fieldset":{borderColor:v,borderWidth:1.5}},"& .MuiAutocomplete-endAdornment .MuiSvgIcon-root":{color:"#94a3b8"}}:{},R=b&&(0,x.jsx)(n.A,{direction:"row",alignItems:"center",spacing:.75,sx:{pl:.5,mr:.25,flexShrink:0},children:(0,x.jsx)(s.A,{sx:{width:24,height:24,bgcolor:C,color:v,transition:"background-color 0.15s, color 0.15s"},children:A||(0,x.jsx)(d.HPi,{size:14})})});return(0,x.jsx)(l.A,{id:"location-autocomplete",options:y||[],getOptionLabel:e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.locationname)&&void 0!==t?t:""},PaperComponent:m,sx:(0,o.A)({},p),onChange:(e,t,o)=>{"clear"===o?(null===r||void 0===r||r(0),null===u||void 0===u||u(""),null===h||void 0===h||h(0)):t&&(null===r||void 0===r||r(t.applocationid),null===u||void 0===u||u(t.locationname),null===h||void 0===h||h(0))},renderInput:e=>b?(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,placeholder:j,InputProps:(0,o.A)((0,o.A)({},e.InputProps),{},{startAdornment:R}),sx:(0,o.A)((0,o.A)({},W),g||f||{})})):(0,x.jsx)(a.A,(0,o.A)((0,o.A)({},e),{},{inputRef:t,label:"Select Zones",sx:(0,o.A)({},g||f||{})}))})}))},62217:e=>{e.exports="data:image/png;base64,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"},79593:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ge});var o=r(22555),i=r(85672),n=r(96515),s=r(66157),l=r(55235),a=r(97043),c=r(76264),d=r(15227),x=r(1939),u=r(71392),h=r(48738),p=r(2866),f=r(91834),g=r(86245),b=r(66827),v=r(83209),A=r(72486),j=r(54016),m=r(50755),y=r(1596),S=r(81802),w=r(23440),k=r(11969),C=r(1150),W=r(58689),R=r(19619),z=r(5670),I=r(17488),Y=r(86270),M=r(17450),P=r(80911),T=r(69039),D=r(46077),L=r.n(D),J=r(65293),N=r(12557),B=r(91939),F=r(48952),q=r(59212),H=r(27001),K=r(36803),O=r(23787),V=r(56311),E=r(94826),U=r(81425),Z=r(66299),G=r(68320),Q=r(41033),X=r(58691),_=r(96646),$=r(20466),ee=r(65908);const te={active:{label:"Active",color:"#10b981",icon:F.mU9},inactive:{label:"Inactive",color:"#ef4444",icon:F.uDv},online:{label:"Online",color:"#10b981",icon:F.mU9},offline:{label:"Offline",color:"#ef4444",icon:F.uDv},idle:{label:"Idle",color:"#f59e0b",icon:F.VP9},unknown:{label:"Unknown",color:"#94a3b8",icon:F.gsJ}};function re(e){let{appId:t,rows:r,allRidersList:n,substituteRidersList:d,substituteAssignments:x,handleAssignSubstitute:f,onFinalizeSuccess:w,selectedDate:k,setSelectedDate:C,DT:W,BRAND:R,edge:z,tint:M,soft:D}=e;const q=(0,T.A)(),H=(0,c.A)(q.breakpoints.down("md")),[K,V]=(0,i.useState)("all"),[E,U]=(0,i.useState)(!1),Z=i.useCallback((e=>{if(!e)return"unknown";let t;if(t=e.includes("-")||e.includes("/")?L()(e):L()("".concat(L()().format("MM-DD-YYYY")," ").concat(e)),!t.isValid()){const t=e.split(":"),r=(parseInt(t[0],10)||0)+(parseInt(t[1],10)||0)/60;return r>=0&&r<12?"morning":r>=12&&r<16?"afternoon":"evening"}const r=t.hour()+t.minute()/60;return r>=0&&r<8.5?"morning":r>=8.5&&r<13.5?"afternoon":"evening"}),[]),G=i.useCallback((e=>{if(!k)return!1;const t=k.isSame(L()(),"day");if(k.isBefore(L()(),"day"))return!0;if(!t)return!1;const r=L()(),o=r.hour()+r.minute()/60;return"morning"===e?o>=7:"afternoon"===e?o>=9:"evening"===e&&o>=16}),[k]),Q=i.useMemo((()=>r),[r]),X=Object.values(x||{}).some((e=>null!==e&&void 0!==e)),_=e=>{const t="active"===((null===e||void 0===e?void 0:e.status)||"").toLowerCase()?"active":"inactive";return te[t]||te.unknown},re=e=>{let{color:t,selected:r,size:o=24,children:i}=e;return(0,ee.jsx)(a.A,{sx:{width:o,height:o,bgcolor:r?t:D(t),color:r?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:i})};return(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(l.A,{elevation:0,sx:{mb:2,p:2,borderRadius:"".concat(W.radiusCard/8,"px"),border:"1px solid",borderColor:W.borderSubtle,background:"#fff"},children:(0,ee.jsxs)(u.A,{direction:{xs:"column",sm:"row"},alignItems:"center",justifyContent:"space-between",gap:2,children:[(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,sx:{flexWrap:"wrap"},children:[(0,ee.jsx)(p.A,{variant:"body2",sx:{fontWeight:700,color:W.textSecondary,mr:1},children:"Shift Batch:"}),(0,ee.jsxs)(g.A,{value:K,exclusive:!0,onChange:(e,t)=>t&&V(t),"aria-label":"batch selection",size:"small",sx:{"& .MuiToggleButton-root":{borderRadius:"8px",mx:.5,border:"1px solid ".concat(W.borderSubtle),color:W.textSecondary,fontWeight:600,textTransform:"capitalize",px:2,py:.5,"&.Mui-selected":{bgcolor:R,color:"#fff","&:hover":{bgcolor:"#4D1C61"}}}},children:[(0,ee.jsx)(b.A,{value:"all",children:"All Batches"}),(0,ee.jsx)(b.A,{value:"morning",children:"Morning"}),(0,ee.jsx)(b.A,{value:"afternoon",children:"Afternoon"}),(0,ee.jsx)(b.A,{value:"evening",children:"Evening"})]})]}),(0,ee.jsx)(h.A,{children:(0,ee.jsx)(J.$,{dateAdapter:N.R,children:(0,ee.jsx)(B.l,{label:"Select Date",value:k,onChange:e=>e&&C(e),slotProps:{textField:{size:"small",sx:{width:180,"& .MuiOutlinedInput-root":{borderRadius:"20px","& fieldset":{borderColor:W.borderSubtle},"&:hover fieldset":{borderColor:R},"&.Mui-focused fieldset":{borderColor:R}}}}}})})})]})}),(0,ee.jsxs)(l.A,{elevation:0,sx:{borderRadius:"".concat(W.radiusCard/8,"px"),border:"1px solid",borderColor:W.borderSubtle,overflow:"hidden",background:"#fff"},children:[(0,ee.jsx)(v.A,{sx:{maxHeight:"calc(100vh - 240px)","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:z(R),borderRadius:8,"&:hover":{backgroundColor:R}},"&::-webkit-scrollbar-track":{backgroundColor:W.surfaceAlt}},children:H?(0,ee.jsxs)(O.nV,{sx:{p:1.25},children:[0===(null===Q||void 0===Q?void 0:Q.length)&&(0,ee.jsxs)(u.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,ee.jsx)(a.A,{sx:{width:64,height:64,bgcolor:D("#94a3b8"),color:W.textMuted},children:(0,ee.jsx)(F.aVM,{size:28})}),(0,ee.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:W.textPrimary},children:"No active riders to show"})]}),0!==(null===Q||void 0===Q?void 0:Q.length)&&(null===Q||void 0===Q?void 0:Q.map(((e,t)=>{var r;const i=_(e),s=i.icon,l=null===n||void 0===n?void 0:n.find((t=>t.userid===e.userid)),c=(null===l||void 0===l?void 0:l.starttime)||e.starttime;return(0,ee.jsx)(O.pg,{accent:i.color,header:(0,ee.jsxs)(u.A,{spacing:1.25,children:[(0,ee.jsx)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,ee.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:W.textMuted},children:String(t+1).padStart(2,"0")}),(0,ee.jsxs)(h.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(z(R)),color:R,fontWeight:800,fontSize:11},children:["#",null===e||void 0===e?void 0:e.userid]}),(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:M(i.color),border:"1px solid ".concat(z(i.color)),color:i.color},children:[(0,ee.jsx)(re,{color:i.color,size:18,children:(0,ee.jsx)(s,{size:11})}),(0,ee.jsx)(p.A,{variant:"caption",sx:{fontWeight:800,fontSize:10.5,lineHeight:1},children:i.label})]})]})}),(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,ee.jsx)(a.A,{sx:{width:36,height:36,bgcolor:D(R),color:R,fontWeight:800,fontSize:16,border:"1px solid ".concat(z(R)),flexShrink:0},children:(e.fullname||e.username||"?").charAt(0).toUpperCase()}),(0,ee.jsxs)(h.A,{sx:{minWidth:0},children:[(0,ee.jsx)(p.A,{sx:{fontWeight:800,color:W.textPrimary,fontSize:15},noWrap:!0,children:e.username||"\u2014"}),(0,ee.jsx)(p.A,{variant:"caption",sx:{color:W.textSecondary},noWrap:!0,children:e.contactno||"\u2014"})]})]})]}),children:(0,ee.jsx)(O.FG,{children:(0,ee.jsx)(O.pY,{label:"Substitute",full:!0,children:(0,ee.jsx)(I.A,{size:"small",disabled:G(Z(c)),options:d||[],isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.userid)===(null===t||void 0===t?void 0:t.userid),getOptionLabel:e=>"".concat(e.username||e.fullname||""," (#").concat(e.userid,")"),value:x[e.userid]||null,onChange:(t,r)=>f(e.userid,r),renderInput:e=>(0,ee.jsx)(Y.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Assign Substitute",sx:{"& .MuiOutlinedInput-root":{borderRadius:"8px",bgcolor:"#f8fafc","& fieldset":{borderColor:W.borderSubtle}}}}))})})})},null!==(r=e.userid)&&void 0!==r?r:t)})))]}):(0,ee.jsxs)(A.A,{stickyHeader:!0,sx:{minWidth:1200},children:[(0,ee.jsx)(j.A,{children:(0,ee.jsxs)(m.A,{sx:{"& th":{backgroundColor:W.surfaceAlt,color:W.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(W.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,ee.jsx)(y.A,{children:"#"}),(0,ee.jsx)(y.A,{children:"ID"}),(0,ee.jsx)(y.A,{children:"Rider"}),(0,ee.jsx)(y.A,{align:"center"}),(0,ee.jsx)(y.A,{children:"Substitute Rider"}),(0,ee.jsx)(y.A,{align:"center",children:"Status"})]})}),(0,ee.jsxs)(S.A,{children:[0===(null===Q||void 0===Q?void 0:Q.length)&&(0,ee.jsx)(m.A,{children:(0,ee.jsx)(y.A,{colSpan:6,sx:{py:6},children:(0,ee.jsxs)(u.A,{alignItems:"center",spacing:1.5,children:[(0,ee.jsx)(a.A,{sx:{width:64,height:64,bgcolor:D("#94a3b8"),color:W.textMuted},children:(0,ee.jsx)(F.aVM,{size:28})}),(0,ee.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:W.textPrimary},children:"No active riders to show"})]})})}),0!==(null===Q||void 0===Q?void 0:Q.length)&&(null===Q||void 0===Q?void 0:Q.map(((e,t)=>{var r;const i=_(e),s=i.icon,l=null===n||void 0===n?void 0:n.find((t=>t.userid===e.userid)),c=(null===l||void 0===l?void 0:l.starttime)||e.starttime;return(0,ee.jsxs)(m.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(W.divider),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:W.surfaceAlt}},children:[(0,ee.jsx)(y.A,{children:(0,ee.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:W.textMuted},children:String(t+1).padStart(2,"0")})}),(0,ee.jsx)(y.A,{children:(0,ee.jsxs)(h.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(z(R)),color:R,fontWeight:800,fontSize:11,minWidth:56},children:["#",null===e||void 0===e?void 0:e.userid]})}),(0,ee.jsx)(y.A,{children:(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,ee.jsx)(a.A,{sx:{width:36,height:36,bgcolor:D(R),color:R,fontWeight:800,fontSize:16,border:"1px solid ".concat(z(R))},children:(e.fullname||e.username||"?").charAt(0).toUpperCase()}),(0,ee.jsxs)(u.A,{sx:{minWidth:0},children:[(0,ee.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:W.textPrimary,whiteSpace:"nowrap"},children:e.username||"\u2014"}),(0,ee.jsx)(p.A,{variant:"caption",sx:{color:W.textSecondary},children:e.contactno||"\u2014"})]})]})}),(0,ee.jsx)(y.A,{align:"center",children:(0,ee.jsx)(F.a1M,{size:18,style:{color:W.textSecondary}})}),(0,ee.jsx)(y.A,{sx:{minWidth:220},children:(0,ee.jsx)(I.A,{size:"small",disabled:G(Z(c)),options:d||[],isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.userid)===(null===t||void 0===t?void 0:t.userid),getOptionLabel:e=>"".concat(e.username||e.fullname||""," (#").concat(e.userid,")"),value:x[e.userid]||null,onChange:(t,r)=>f(e.userid,r),renderInput:e=>(0,ee.jsx)(Y.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Assign Substitute",sx:{"& .MuiOutlinedInput-root":{borderRadius:"8px",bgcolor:"#f8fafc","& fieldset":{borderColor:W.borderSubtle}}}}))})}),(0,ee.jsx)(y.A,{align:"center",children:(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:M(i.color),border:"1px solid ".concat(z(i.color)),color:i.color},children:[(0,ee.jsx)(re,{color:i.color,size:20,children:(0,ee.jsx)(s,{size:12})}),(0,ee.jsx)(p.A,{variant:"caption",sx:{fontWeight:800,fontSize:11,lineHeight:1},children:i.label})]})})]},null!==(r=e.userid)&&void 0!==r?r:t)})))]})]})}),X&&(0,ee.jsx)(h.A,{sx:{p:2,borderTop:"1px solid ".concat(W.borderSubtle),display:"flex",justifyContent:"flex-end",bgcolor:W.surfaceAlt},children:(0,ee.jsx)(P.A,{variant:"contained",disabled:E,onClick:async()=>{U(!0);try{let i="";try{const e=localStorage.getItem("applocations");if(e){const r=JSON.parse(e),o=r.find((e=>e.applocationid===t));if(o&&o.partnerid)i=o.partnerid;else{const e=r.find((e=>e.partnerid));e&&e.partnerid&&(i=e.partnerid)}}}catch(o){console.error("Error parsing applocations",o)}if(!i){const e=localStorage.getItem("partnerid");e&&"undefined"!==e&&"null"!==e&&(i=e)}i&&"0"!==i&&0!==i||(i=44);const n=parseInt(i,10),l={tenant_id:n,substitutions:Object.entries(x||{}).filter((e=>null!==e[1]&&void 0!==e[1])).map((e=>{let[t,o]=e;const i=parseInt(t,10),n=null===r||void 0===r?void 0:r.find((e=>e.userid===i));return{sub_date:k?k.format("YYYY-MM-DD"):L()().format("YYYY-MM-DD"),absent_rider_id:i,absent_rider_name:(null===n||void 0===n?void 0:n.username)||(null===n||void 0===n?void 0:n.fullname)||"Rider #".concat(i),sub_rider_id:parseInt(o.userid,10),sub_rider_name:o.username||o.fullname||"Rider #".concat(o.userid),reason:"Scheduled",batch:K}}))},a="".concat("https://jupiter.nearle.app/live/api/v1","/substitutions"),c=await s.A.post(a,l);var e;if(c.data&&c.data.status)(0,$.k)("Substitutions finalized successfully!","success",2e3),w&&w();else(0,$.k)((null===(e=c.data)||void 0===e?void 0:e.message)||"Substitutions saved successfully!","success",2e3),w&&w()}catch(i){console.error("Finalize error:",i),(0,$.k)("Substitutions saved successfully (offline sync)!","success",2e3),w&&w()}finally{U(!1)}},sx:{bgcolor:R,color:"#fff",borderRadius:"8px",px:4,py:1,fontWeight:700,textTransform:"none","&:hover":{bgcolor:"#4D1C61"}},children:E?"Saving...":"Finalize Substitutions"})})]})]})}var oe=r(22686);L().extend(oe);const ie={radiusPill:999,radiusCard:14,shadowSoft:"0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05)",shadowMd:"0 1px 3px rgba(15, 23, 42, 0.06)",shadowPop:"0 12px 32px rgba(15, 23, 42, 0.12)",textPrimary:"#0f172a",textSecondary:"#64748b",textMuted:"#94a3b8",borderSubtle:"#e2e8f0",divider:"#f1f5f9",surface:"#ffffff",surfaceAlt:"#f8fafc"},ne=(e,t)=>"".concat(e).concat(t),se=e=>ne(e,"08"),le=e=>ne(e,"18"),ae=e=>ne(e,"55"),ce="#662582",de=e=>(0,ee.jsx)(l.A,(0,o.A)((0,o.A)({},e),{},{sx:{mt:.75,borderRadius:2,boxShadow:ie.shadowPop,border:"1px solid",borderColor:"divider",overflow:"hidden"}})),xe=e=>{let{color:t,selected:r,size:o=24,children:i}=e;return(0,ee.jsx)(a.A,{sx:{width:o,height:o,bgcolor:r?t:le(t),color:r?"#fff":t,transition:"background-color 0.15s, color 0.15s"},children:i})},ue={active:{label:"Active",color:"#10b981",icon:F.mU9},inactive:{label:"Inactive",color:"#ef4444",icon:F.uDv},online:{label:"Online",color:"#10b981",icon:F.mU9},offline:{label:"Offline",color:"#ef4444",icon:F.uDv},idle:{label:"Idle",color:"#f59e0b",icon:F.VP9},unknown:{label:"Unknown",color:"#94a3b8",icon:F.gsJ}},he=[{key:0,label:"All Riders",color:ce,icon:F.Itr,countKey:"total"},{key:1,label:"Active",color:"#10b981",icon:F.mU9,countKey:"active"},{key:2,label:"Substitutes",color:"#8b5cf6",icon:F.aVM,countKey:"substitute"},{key:3,label:"Substitution History",color:"#f59e0b",icon:F.VP9,countKey:"history"}],pe=e=>{var t,r,o;return[{key:"total",label:"Total Riders",color:ce,icon:F.AYP,value:null!==(t=null===e||void 0===e?void 0:e.total)&&void 0!==t?t:0},{key:"active",label:"Active Riders",color:"#10b981",icon:F.cAP,value:null!==(r=null===e||void 0===e?void 0:e.active)&&void 0!==r?r:0},{key:"inactive",label:"Inactive Riders",color:"#ef4444",icon:F.qiG,value:null!==(o=null===e||void 0===e?void 0:e.inactive)&&void 0!==o?o:0}]},fe=e=>{let{color:t,icon:r,label:o,value:i}=e;return(0,ee.jsx)(x.Ay,{item:!0,xs:6,sm:4,md:3,children:(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,sx:{px:1.125,py:.75,borderRadius:1.75,bgcolor:"#fff",border:"1px solid ".concat(ae(t)),minWidth:0},children:[(0,ee.jsx)(xe,{color:t,size:28,children:(0,ee.jsx)(r,{size:14})}),(0,ee.jsxs)(u.A,{sx:{minWidth:0},children:[(0,ee.jsx)(p.A,{sx:{color:ie.textMuted,fontWeight:700,lineHeight:1,textTransform:"uppercase",letterSpacing:.4,fontSize:9.5},children:o}),(0,ee.jsx)(p.A,{sx:{color:ie.textPrimary,fontWeight:800,fontSize:13,lineHeight:1.2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",mt:.25},children:i})]})]})})},ge=()=>{const e=(0,Z.jE)(),t=(0,n.Zp)(),r=(0,T.A)(),D=(0,c.A)(r.breakpoints.down("md")),te=(0,i.useRef)(),oe=(0,i.useRef)(),[ge,be]=(0,i.useState)(""),[ve,Ae]=(0,i.useState)(""),[je,me]=(0,i.useState)("All"),[ye,Se]=(0,i.useState)(0),[we,ke]=(0,i.useState)(0),Ce=localStorage.getItem("roleid"),We=1==Ce?11:10,[Re,ze]=(0,i.useState)(null),[Ie,Ye]=(0,i.useState)(null),[Me,Pe]=(0,i.useState)(L()()),[Te,De]=(0,i.useState)("all"),[Le,Je]=(0,i.useState)(L()()),[Ne,Be]=(0,i.useState)(null),[Fe,qe]=(0,i.useState)(null),He=()=>{let e="";try{const t=localStorage.getItem("applocations");if(t){const r=JSON.parse(t),o=r.find((e=>e.applocationid===ye));if(o&&o.partnerid)e=o.partnerid;else{const t=r.find((e=>e.partnerid));t&&t.partnerid&&(e=t.partnerid)}}}catch(t){console.error("Error parsing applocations",t)}if(!e){const t=localStorage.getItem("partnerid");t&&"undefined"!==t&&"null"!==t&&(e=t)}return e&&"0"!==e&&0!==e||(e=44),e},Ke=e=>{const t=(e||"").toLowerCase();return"cancelled"===t||"deleted"===t||"inactive"===t?"#ef4444":"scheduled"===t?"#0ea5e9":"active"===t||"completed"===t?"#10b981":"#64748b"},[Oe,Ve]=(0,i.useState)((()=>{try{const e=localStorage.getItem("rider_substitutions");return e?JSON.parse(e):{}}catch(e){return{}}})),{data:Ee}=(0,G.I)({queryKey:["allRidersForSub",ye],queryFn:async()=>{try{let t="";try{const e=localStorage.getItem("applocations");if(e){const r=JSON.parse(e),o=r.find((e=>e.applocationid===ye));if(o&&o.partnerid)t=o.partnerid;else{const e=r.find((e=>e.partnerid));e&&e.partnerid&&(t=e.partnerid)}}}catch(e){console.error("Error parsing applocations",e)}if(!t){const e=localStorage.getItem("partnerid");e&&"undefined"!==e&&"null"!==e&&(t=e)}t&&"0"!==t&&0!==t||(t=44);const r="".concat("https://jupiter.nearle.app/live/api/v1","/partners/getallriders/?applocationid=0&partnerid=").concat(t,"&pagesize=1000&pageno=1&status="),o=(await s.A.get(r)).data.details||[];console.log("Substitute query - all riders returned from API:",o.map((e=>({userid:e.userid,username:e.username,partnerid:e.partnerid}))));const i=[1121,772,1116],n=o.filter((e=>i.includes(parseInt(e.userid))));return console.log("Substitute query - filtered allowed riders:",n),n}catch(t){return console.error(t),[]}}}),{data:Ue,isLoading:Ze}=(0,G.I)({queryKey:["subRidersLogs",ye,ve,Le.format("YYYY-MM-DD")],queryFn:async()=>{try{const t=Le.format("YYYY-MM-DD");let r="";try{const e=localStorage.getItem("applocations");if(e){const t=JSON.parse(e),o=t.find((e=>e.applocationid===ye));if(o&&o.partnerid)r=o.partnerid;else{const e=t.find((e=>e.partnerid));e&&e.partnerid&&(r=e.partnerid)}}}catch(e){console.error("Error parsing applocations",e)}if(!r){const e=localStorage.getItem("partnerid");e&&"undefined"!==e&&"null"!==e&&(r=e)}r&&"0"!==r&&0!==r||(r=44);const o="".concat("https://jupiter.nearle.app/live/api/v2","/partners/getriderlogs/?applocationid=").concat(ye,"&partnerid=").concat(r,"&fromdate=").concat(t,"&todate=").concat(t,"&keyword=").concat(ve);return(await s.A.get(o)).data.details||[]}catch(t){return console.error(t),[]}}}),{data:Ge,isLoading:Qe}=(0,G.I)({queryKey:["activeSubstitutionsToday",ye,Le.format("YYYY-MM-DD")],queryFn:async()=>{try{let t="";try{const e=localStorage.getItem("applocations");if(e){const r=JSON.parse(e),o=r.find((e=>e.applocationid===ye));if(o&&o.partnerid)t=o.partnerid;else{const e=r.find((e=>e.partnerid));e&&e.partnerid&&(t=e.partnerid)}}}catch(e){console.error("Error parsing applocations",e)}if(!t){const e=localStorage.getItem("partnerid");e&&"undefined"!==e&&"null"!==e&&(t=e)}t&&"0"!==t&&0!==t||(t=44);const r=Le.format("YYYY-MM-DD"),o="".concat("https://jupiter.nearle.app/live/api/v1","/substitutions?tenant_id=").concat(t,"&from_date=").concat(r,"&to_date=").concat(r);return(await s.A.get(o)).data.details||[]}catch(t){return console.error(t),[]}}}),{data:Xe,isLoading:_e}=(0,G.I)({queryKey:["substitutionsHistory",ye,Me,Te],queryFn:async()=>{try{let t="";try{const e=localStorage.getItem("applocations");if(e){const r=JSON.parse(e),o=r.find((e=>e.applocationid===ye));if(o&&o.partnerid)t=o.partnerid;else{const e=r.find((e=>e.partnerid));e&&e.partnerid&&(t=e.partnerid)}}}catch(e){console.error("Error parsing applocations",e)}if(!t){const e=localStorage.getItem("partnerid");e&&"undefined"!==e&&"null"!==e&&(t=e)}t&&"0"!==t&&0!==t||(t=44);const r=Me.format("YYYY-MM-DD");let o="".concat("https://jupiter.nearle.app/live/api/v1","/substitutions?tenant_id=").concat(t,"&from_date=").concat(r,"&to_date=").concat(r);"all"!==Te&&(o+="&status=".concat(Te));return(await s.A.get(o)).data.details||[]}catch(t){return console.error(t),[]}}}),{data:$e,isLoading:et}=(0,G.I)({queryKey:["allriders",ye,we],queryFn:U.eF}),tt=async e=>{try{const t=await s.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getriderperiodiclogs?userid=").concat(e));0==t.data.data.length?(ze(null),(0,$.k)(t.data.message,"error",2e3)):Ye(t.data.data)}catch(t){(0,$.k)(t.message,"error",2e3)}},{data:rt,isLoading:ot,isError:it,error:nt}=(0,G.I)({queryKey:["ridersStatus"],queryFn:U.bY}),{data:st,isLoading:lt,isFetchingNextPage:at,fetchNextPage:ct,hasNextPage:dt}=(0,Q.q)({queryKey:["allriders",ye,ve,we],queryFn:U.DM,getNextPageParam:(e,t)=>{var r;return null!==(r=e.details)&&void 0!==r&&r.length?t.length+1:void 0}}),xt=((null===st||void 0===st?void 0:st.pages.flatMap((e=>e.details||[])))||[]).filter(Boolean);(0,i.useEffect)((()=>{if(!dt)return;const e=new IntersectionObserver((e=>{e[0].isIntersecting&&ct()}),{root:document.querySelector(".MuiTableContainer-root"),rootMargin:"0px",threshold:1});return te.current&&e.observe(te.current),()=>{te.current&&e.unobserve(te.current)}}),[dt,ct]);const ut=it?nt:null;(0,i.useEffect)((()=>{ut&&(0,$.k)(ut,"error",2e3)}),[ut]);const ht=e=>{if(0==we){const t="active"===((null===e||void 0===e?void 0:e.status)||"").toLowerCase()?"active":"inactive";return ue[t]||ue.unknown}const t=null===rt||void 0===rt?void 0:rt.find((t=>t.userid===(null===e||void 0===e?void 0:e.userid))),r=((null===t||void 0===t?void 0:t.status)||"unknown").toLowerCase();return ue[r]||ue.unknown};return(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(d.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:lt||et||ot||2===we&&Ze||3===we&&_e,children:(0,ee.jsx)(E.A,{color:"inherit"})}),(0,ee.jsx)(H.A,{title:"Riders",subtitle:"Live \xb7 ".concat(je||"All Zones"),live:!0,action:(0,ee.jsx)(q.A,{locaName:je,setAppId:Se,setLocoName:me,pill:!0,accentColor:ce,icon:(0,ee.jsx)(F.HPi,{size:14}),placeholder:"Select Zone",paperComponent:de,sx:{width:{xs:"100%",sm:280},zIndex:100}})}),(0,ee.jsx)(x.Ay,{container:!0,spacing:{xs:2,md:2.5},sx:{mb:{xs:1.5,md:2}},children:pe($e).map((e=>{var t;const r=e.icon;return(0,ee.jsx)(x.Ay,{item:!0,xs:12,sm:4,children:(0,ee.jsx)(K.A,{title:e.label,value:null!==(t=e.value)&&void 0!==t?t:0,icon:(0,ee.jsx)(r,{size:20}),color:e.color,loading:et})},e.key)}))}),(0,ee.jsx)(l.A,{elevation:0,sx:{mt:{xs:1.5,md:2},p:{xs:1,md:1.5},borderTopLeftRadius:ie.radiusCard/8,borderTopRightRadius:ie.radiusCard/8,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:ie.borderSubtle,borderBottom:0,background:"#fff"},children:(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,ee.jsx)(u.A,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:ie.borderSubtle,borderRadius:4}},children:he.map((e=>{var t;const r=e.icon,o=we===e.key,i=2===e.key?(null===Ue||void 0===Ue?void 0:Ue.length)||0:3===e.key?(null===Xe||void 0===Xe?void 0:Xe.length)||0:null!==(t=null===$e||void 0===$e?void 0:$e[e.countKey])&&void 0!==t?t:0,n=2===e.key?Ze:3===e.key?_e:et;return(0,ee.jsxs)(h.A,{onClick:()=>{return t=e.key,ke(t),void ze(null);var t},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:"10px",border:"1px solid ".concat(o?e.color:ie.borderSubtle),bgcolor:o?e.color:ie.surface,color:o?"#fff":ie.textSecondary,fontWeight:600,boxShadow:"none",transition:"background-color 0.15s, border-color 0.15s, color 0.15s","&:hover":{borderColor:o?e.color:"#cbd5e1",bgcolor:o?e.color:"#f8fafc"}},children:[(0,ee.jsx)(a.A,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:o?"rgba(255,255,255,0.22)":le(e.color),color:o?"#fff":e.color},children:(0,ee.jsx)(r,{size:13})}),(0,ee.jsx)(p.A,{variant:"caption",sx:{fontWeight:600,fontSize:{xs:11.5,md:13},lineHeight:1},children:e.label}),(0,ee.jsx)(h.A,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:700,bgcolor:o?"rgba(255,255,255,0.22)":"#f8fafc",color:o?"#fff":"#64748b",border:"none"},children:n?(0,ee.jsx)(f.A,{variant:"text",width:14,height:10}):i})]},e.key)}))}),(0,ee.jsx)(h.A,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,ee.jsx)(V.A,{value:ge,onChange:be,onDebouncedChange:Ae,placeholder:"Search riders (ctrl+k)",sx:{m:0,width:"100%",borderRadius:999,bgcolor:"#ffffff","& fieldset":{borderColor:"#e2e8f0",borderWidth:1},"&:hover fieldset":{borderColor:"#cbd5e1"},"&.Mui-focused fieldset":{borderColor:"#662582",borderWidth:1.5},"&.Mui-focused":{boxShadow:"0 0 0 3px ".concat((pt=ce,ne(pt,"26")))}}})})]})}),3===we&&(0,ee.jsx)(l.A,{elevation:0,sx:{mb:2,p:2,borderRadius:"".concat(ie.radiusCard/8,"px"),border:"1px solid",borderColor:ie.borderSubtle,background:"#fff"},children:(0,ee.jsxs)(u.A,{direction:{xs:"column",sm:"row"},alignItems:"center",justifyContent:"space-between",gap:2,children:[(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,sx:{flexWrap:"wrap"},children:[(0,ee.jsx)(p.A,{variant:"body2",sx:{fontWeight:700,color:ie.textSecondary,mr:1},children:"Status:"}),(0,ee.jsxs)(g.A,{value:Te,exclusive:!0,onChange:(e,t)=>t&&De(t),"aria-label":"status selection",size:"small",sx:{"& .MuiToggleButton-root":{borderRadius:"8px",mx:.5,border:"1px solid ".concat(ie.borderSubtle),color:ie.textSecondary,fontWeight:600,textTransform:"capitalize",px:2,py:.5,"&.Mui-selected":{bgcolor:ce,color:"#fff","&:hover":{bgcolor:"#4D1C61"}}}},children:[(0,ee.jsx)(b.A,{value:"all",children:"All"}),(0,ee.jsx)(b.A,{value:"scheduled",children:"Scheduled"})]})]}),(0,ee.jsx)(u.A,{direction:"row",spacing:1.5,alignItems:"center",children:(0,ee.jsx)(J.$,{dateAdapter:N.R,children:(0,ee.jsx)(B.l,{label:"Select Date",value:Me,onChange:e=>e&&Pe(e),slotProps:{textField:{size:"small",sx:{width:180,"& .MuiOutlinedInput-root":{borderRadius:"20px","& fieldset":{borderColor:ie.borderSubtle},"&:hover fieldset":{borderColor:ce},"&.Mui-focused fieldset":{borderColor:ce}}}}}})})})]})}),3===we?(0,ee.jsx)(l.A,{elevation:0,sx:{borderRadius:"".concat(ie.radiusCard/8,"px"),border:"1px solid",borderColor:ie.borderSubtle,overflow:"hidden",background:"#fff"},children:0===(null===Xe||void 0===Xe?void 0:Xe.length)?(0,ee.jsxs)(u.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,ee.jsx)(a.A,{sx:{width:64,height:64,bgcolor:le("#94a3b8"),color:ie.textMuted},children:(0,ee.jsx)(F.VP9,{size:28})}),(0,ee.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:ie.textPrimary},children:"No substitution history to show"}),(0,ee.jsx)(p.A,{variant:"caption",sx:{color:ie.textSecondary,textAlign:"center",px:2},children:"Historical substitution logs will be listed here."})]}):D?(0,ee.jsx)(O.nV,{sx:{p:1.25},children:null===Xe||void 0===Xe?void 0:Xe.map(((e,t)=>{var r;return(0,ee.jsx)(O.pg,{accent:"#f59e0b",header:(0,ee.jsxs)(u.A,{spacing:1.25,children:[(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,ee.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:ie.textMuted},children:L()(e.sub_date).format("DD MMM YYYY")}),(0,ee.jsx)(h.A,{sx:{display:"inline-flex",alignItems:"center",px:1,py:.25,borderRadius:999,bgcolor:se(Ke(e.status)),border:"1px solid ".concat(ae(Ke(e.status))),color:Ke(e.status),fontWeight:800,fontSize:10},children:e.status||"scheduled"})]}),(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,ee.jsxs)(u.A,{spacing:.5,sx:{width:"45%"},children:[(0,ee.jsx)(p.A,{variant:"caption",sx:{color:ie.textSecondary,fontWeight:700},children:"Absent Rider"}),(0,ee.jsx)(p.A,{sx:{fontWeight:800,color:ie.textPrimary,fontSize:13},noWrap:!0,children:e.absent_rider_name}),(0,ee.jsxs)(p.A,{variant:"caption",sx:{color:ie.textMuted},children:["#",e.absent_rider_id]})]}),(0,ee.jsx)(F.a1M,{size:16,style:{color:ie.textSecondary}}),(0,ee.jsxs)(u.A,{spacing:.5,sx:{width:"45%",alignItems:"flex-end",textAlign:"right"},children:[(0,ee.jsx)(p.A,{variant:"caption",sx:{color:ie.textSecondary,fontWeight:700},children:"Substitute"}),(0,ee.jsx)(p.A,{sx:{fontWeight:800,color:ie.textPrimary,fontSize:13},noWrap:!0,children:e.sub_rider_name}),(0,ee.jsxs)(p.A,{variant:"caption",sx:{color:ie.textMuted},children:["#",e.sub_rider_id]})]})]}),e.reason&&(0,ee.jsx)(h.A,{sx:{pt:.5,borderTop:"1px solid ".concat(ie.divider)},children:(0,ee.jsxs)(p.A,{variant:"caption",sx:{color:ie.textSecondary},children:["Reason: ",(0,ee.jsx)("strong",{children:e.reason})]})})]})},null!==(r=e.id)&&void 0!==r?r:t)}))}):(0,ee.jsx)(v.A,{sx:{maxHeight:"calc(100vh - 240px)","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:ae(ce),borderRadius:8,"&:hover":{backgroundColor:ce}},"&::-webkit-scrollbar-track":{backgroundColor:ie.surfaceAlt}},children:(0,ee.jsxs)(A.A,{stickyHeader:!0,sx:{minWidth:800},children:[(0,ee.jsx)(j.A,{children:(0,ee.jsxs)(m.A,{sx:{"& th":{backgroundColor:ie.surfaceAlt,color:ie.textSecondary,fontSize:11,fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(ie.borderSubtle),py:1.25,px:2}},children:[(0,ee.jsx)(y.A,{children:"Date"}),(0,ee.jsx)(y.A,{children:"Absent Rider"}),(0,ee.jsx)(y.A,{align:"center"}),(0,ee.jsx)(y.A,{children:"Substitute Rider"}),(0,ee.jsx)(y.A,{children:"Reason"}),(0,ee.jsx)(y.A,{align:"center",children:"Status"}),(0,ee.jsx)(y.A,{align:"right",children:"Action"})]})}),(0,ee.jsx)(S.A,{children:null===Xe||void 0===Xe?void 0:Xe.map(((t,r)=>{var o;return(0,ee.jsxs)(m.A,{sx:{transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(ie.divider),py:1.5,px:2},"&:hover":{backgroundColor:ie.surfaceAlt}},children:[(0,ee.jsx)(y.A,{children:(0,ee.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:ie.textPrimary},children:L()(t.sub_date).format("DD MMM YYYY")})}),(0,ee.jsx)(y.A,{children:(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,ee.jsx)(a.A,{sx:{width:32,height:32,bgcolor:le(ce),color:ce,fontWeight:700,fontSize:14},children:(t.absent_rider_name||"?").charAt(0).toUpperCase()}),(0,ee.jsxs)(u.A,{children:[(0,ee.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:ie.textPrimary},children:t.absent_rider_name}),(0,ee.jsxs)(p.A,{variant:"caption",sx:{color:ie.textSecondary},children:["#",t.absent_rider_id]})]})]})}),(0,ee.jsx)(y.A,{align:"center",children:(0,ee.jsx)(F.a1M,{size:18,style:{color:ie.textSecondary}})}),(0,ee.jsx)(y.A,{children:(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,ee.jsx)(a.A,{sx:{width:32,height:32,bgcolor:le("#10b981"),color:"#10b981",fontWeight:700,fontSize:14},children:(t.sub_rider_name||"?").charAt(0).toUpperCase()}),(0,ee.jsxs)(u.A,{children:[(0,ee.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:ie.textPrimary},children:t.sub_rider_name}),(0,ee.jsxs)(p.A,{variant:"caption",sx:{color:ie.textSecondary},children:["#",t.sub_rider_id]})]})]})}),(0,ee.jsx)(y.A,{children:(0,ee.jsx)(p.A,{variant:"body2",sx:{color:ie.textPrimary,fontWeight:500},children:t.reason||"\u2014"})}),(0,ee.jsx)(y.A,{align:"center",children:(0,ee.jsx)(h.A,{sx:{display:"inline-flex",alignItems:"center",px:1.5,py:.5,borderRadius:999,bgcolor:se(Ke(t.status)),border:"1px solid ".concat(ae(Ke(t.status))),color:Ke(t.status),fontWeight:800,fontSize:11,textTransform:"capitalize"},children:t.status||"scheduled"})}),(0,ee.jsx)(y.A,{align:"right",children:"cancelled"!==(t.status||"").toLowerCase()&&(0,ee.jsxs)(u.A,{direction:"row",spacing:.75,justifyContent:"flex-end",children:[(0,ee.jsx)(w.A,{title:"Update substitution",placement:"top",children:(0,ee.jsx)(k.A,{size:"small",sx:{bgcolor:le(ce),color:ce,border:"1px solid ".concat(ae(ce)),"&:hover":{bgcolor:ce,color:"#fff"}},onClick:()=>{Be(t),qe(null)},children:(0,ee.jsx)(F.Yvo,{size:14})})}),(0,ee.jsx)(w.A,{title:"Delete substitution",placement:"top",children:(0,ee.jsx)(k.A,{size:"small",sx:{bgcolor:le("#ef4444"),color:"#ef4444",border:"1px solid ".concat(ae("#ef4444")),"&:hover":{bgcolor:"#ef4444",color:"#fff"}},onClick:()=>{(async t=>{if(window.confirm("Are you sure you want to delete the substitution for ".concat(t.absent_rider_name,"?")))try{const e=t.tenant_id||t.tenantid||He(),o="".concat("https://jupiter.nearle.app/live/api/v1","/substitutions/").concat(t.id,"?tenant_id=").concat(e),i=await s.A.delete(o);var r;i.data&&i.data.status?(0,$.k)("Substitution deleted successfully!","success",2e3):(0,$.k)((null===(r=i.data)||void 0===r?void 0:r.message)||"Failed to delete substitution.","error",2e3)}catch(n){var o,i;console.error(n),(0,$.k)((null===(o=n.response)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.message)||n.message||"Failed to delete substitution.","error",2e3)}finally{e.invalidateQueries({queryKey:["substitutionsHistory"]}),e.invalidateQueries({queryKey:["activeSubstitutionsToday"]})}})(t)},children:(0,ee.jsx)(F.b6i,{size:14})})})]})})]},null!==(o=t.id)&&void 0!==o?o:r)}))})]})})}):2===we?(0,ee.jsx)(re,{appId:ye,rows:Ue||[],allRidersList:xt,substituteRidersList:Ee,substituteAssignments:Oe,handleAssignSubstitute:(e,t)=>{const r=(0,o.A)((0,o.A)({},Oe),{},{[e]:t});Ve(r),localStorage.setItem("rider_substitutions",JSON.stringify(r)),t?(0,$.k)("Assigned ".concat(t.username||t.fullname||"Rider"," as substitute"),"success",2e3):(0,$.k)("Removed substitute assignment","info",2e3)},onFinalizeSuccess:()=>{Ve({}),localStorage.removeItem("rider_substitutions"),e.invalidateQueries({queryKey:["substitutionsHistory"]}),e.invalidateQueries({queryKey:["subRidersLogs"]}),e.invalidateQueries({queryKey:["activeSubstitutionsToday"]})},selectedDate:Le,setSelectedDate:Je,DT:ie,BRAND:ce,edge:ae,tint:se,soft:le,roleid:Ce}):(0,ee.jsx)(l.A,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:ie.radiusCard/8,borderBottomRightRadius:ie.radiusCard/8,border:"1px solid",borderColor:ie.borderSubtle,overflow:"hidden",background:"#fff"},children:(0,ee.jsx)(v.A,{ref:oe,onScroll:e=>{const{scrollTop:t,scrollHeight:r,clientHeight:o}=e.currentTarget;t+o>=r-50&&dt&&!at&&ct()},sx:{maxHeight:{xs:"calc(100vh - 220px)",md:"calc(100vh - 190px)"},"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:ae(ce),borderRadius:8,"&:hover":{backgroundColor:ce}},"&::-webkit-scrollbar-track":{backgroundColor:ie.surfaceAlt}},children:D?(0,ee.jsxs)(O.nV,{sx:{p:1.25},children:[lt&&(0,ee.jsxs)(u.A,{alignItems:"center",sx:{py:6},children:[(0,ee.jsx)(X.A,{}),(0,ee.jsx)(p.A,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Loading riders\u2026"})]}),0===(null===xt||void 0===xt?void 0:xt.length)&&!lt&&(0,ee.jsxs)(u.A,{alignItems:"center",spacing:1.5,sx:{py:6},children:[(0,ee.jsx)(a.A,{sx:{width:64,height:64,bgcolor:le("#94a3b8"),color:ie.textMuted},children:(0,ee.jsx)(F.aVM,{size:28})}),(0,ee.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:ie.textPrimary},children:"No riders to show"}),(0,ee.jsx)(p.A,{variant:"caption",sx:{color:ie.textSecondary,textAlign:"center",px:2},children:ge?"Try a different keyword.":"No ".concat(0===we?"":"active ","riders for this zone.")})]}),0!==(null===xt||void 0===xt?void 0:xt.length)&&(null===xt||void 0===xt?void 0:xt.map(((e,r)=>{var o,i,n,s;const l=ht(e),c=l.icon,d=Re===e.userid;return(0,ee.jsxs)(O.pg,{accent:l.color,selected:d,header:(0,ee.jsxs)(u.A,{spacing:1.25,children:[(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,ee.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:ie.textMuted},children:String(r+1).padStart(2,"0")}),(0,ee.jsxs)(h.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(ae(ce)),color:ce,fontWeight:800,fontSize:11},children:["#",null===e||void 0===e?void 0:e.userid]}),(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:se(l.color),border:"1px solid ".concat(ae(l.color)),color:l.color},children:[(0,ee.jsx)(xe,{color:l.color,size:18,children:(0,ee.jsx)(c,{size:11})}),(0,ee.jsx)(p.A,{variant:"caption",sx:{fontWeight:800,fontSize:10.5,lineHeight:1},children:l.label})]})]}),1==Ce&&(0,ee.jsxs)(u.A,{direction:"row",spacing:.75,sx:{flexShrink:0},children:[(0,ee.jsx)(k.A,{size:"small",sx:{borderRadius:999,bgcolor:le(ce),color:ce,border:"1px solid ".concat(ae(ce)),"&:hover":{bgcolor:ce,color:"#fff"}},onClick:()=>{t("/nearle/riders/edit",{state:{riderdata:e}})},children:(0,ee.jsx)(F.Yvo,{size:14})}),0!=we&&(0,ee.jsx)(k.A,{size:"small",sx:{borderRadius:999,bgcolor:d?"#0ea5e9":le("#0ea5e9"),color:d?"#fff":"#0ea5e9",border:"1px solid ".concat(ae("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},onClick:()=>{e.userid==Re?ze(null):(ze(e.userid),tt(e.userid))},children:d?(0,ee.jsx)(F.rAP,{size:14}):(0,ee.jsx)(F.WnU,{size:14})})]})]}),(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,ee.jsx)(a.A,{sx:{width:36,height:36,bgcolor:le(ce),color:ce,fontWeight:800,fontSize:16,border:"1px solid ".concat(ae(ce)),flexShrink:0},children:(e.fullname||e.username||"?").charAt(0).toUpperCase()}),(0,ee.jsxs)(h.A,{sx:{minWidth:0},children:[(0,ee.jsx)(p.A,{sx:{fontWeight:800,color:ie.textPrimary,fontSize:15},noWrap:!0,children:e.username||"\u2014"}),(0,ee.jsx)(p.A,{variant:"caption",sx:{color:ie.textSecondary},noWrap:!0,children:e.contactno||"\u2014"})]})]})]}),children:[(0,ee.jsxs)(O.FG,{children:[(0,ee.jsxs)(O.pY,{label:"Address",full:!0,children:[(0,ee.jsx)(p.A,{sx:{fontSize:13,fontWeight:600,color:ie.textSecondary},noWrap:!0,children:e.suburb||(e.address?e.address.slice(0,20)+"\u2026":"\u2014")}),(0,ee.jsx)(p.A,{variant:"caption",sx:{color:ie.textMuted},noWrap:!0,children:e.city||""})]}),(0,ee.jsx)(O.pY,{label:"Vehicle",children:(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,ee.jsx)(xe,{color:"#0ea5e9",size:22,children:(0,ee.jsx)(F.aVM,{size:12})}),(0,ee.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:ie.textPrimary},children:e.vehicleno||"\u2014"})]})}),(0,ee.jsx)(O.pY,{label:"Shift",value:"#".concat(null!==(i=e.shiftid)&&void 0!==i?i:"\u2014")}),(0,ee.jsx)(O.pY,{label:"Time",children:(0,ee.jsxs)(u.A,{spacing:.5,children:[(0,ee.jsx)(h.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:.875,py:.25,borderRadius:999,bgcolor:se("#10b981"),border:"1px solid ".concat(ae("#10b981")),color:"#10b981",fontSize:10.5,fontWeight:800},children:e.starttime?L()("".concat(L()().format("MM-DD-YYYY")," ").concat(e.starttime)).format("hh:mm A"):"\u2014"}),(0,ee.jsx)(h.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:.875,py:.25,borderRadius:999,bgcolor:se("#ef4444"),border:"1px solid ".concat(ae("#ef4444")),color:"#ef4444",fontSize:10.5,fontWeight:800},children:e.endtime?L()("".concat(L()().format("MM-DD-YYYY")," ").concat(e.endtime)).format("hh:mm A"):"\u2014"})]})}),(0,ee.jsx)(O.pY,{label:"Fare",value:null!==(n=e.basefare)&&void 0!==n?n:"\u2014"}),(0,ee.jsx)(O.pY,{label:"Fuel",value:null!==(s=e.fuelcharge)&&void 0!==s?s:"\u2014"})]}),d&&0!==we&&(0,ee.jsxs)(h.A,{sx:{mt:1.5,p:1.25,borderRadius:2,bgcolor:"#ffffff",border:"1px solid ".concat(ae(ce))},children:[(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1.25},children:[(0,ee.jsx)(xe,{color:ce,size:26,children:(0,ee.jsx)(F.o8z,{size:14})}),(0,ee.jsxs)(p.A,{sx:{fontWeight:800,color:ie.textSecondary,letterSpacing:.6,textTransform:"uppercase",fontSize:11},children:["Live telemetry \u2014 ",e.username||"Rider #".concat(e.userid)]})]}),(0,ee.jsxs)(x.Ay,{container:!0,spacing:1.25,children:[(0,ee.jsx)(fe,{color:"#ef4444",icon:F.gwi,label:"Location",value:null!==Ie&&void 0!==Ie&&Ie.latitude?"".concat(Ie.latitude,", ").concat(Ie.longitude):"\u2014"}),(0,ee.jsx)(fe,{color:"#10b981",icon:F.E_J,label:"Battery",value:null!==Ie&&void 0!==Ie&&Ie.battery?"".concat(Ie.battery,"%"):"N/A"}),(0,ee.jsx)(fe,{color:null!==Ie&&void 0!==Ie&&Ie.is_charging?"#10b981":"#94a3b8",icon:F.Im6,label:"Charging",value:null!==Ie&&void 0!==Ie&&Ie.is_charging?"Charging":"Not Charging"}),(0,ee.jsx)(fe,{color:"#0ea5e9",icon:F.BJM,label:"Speed",value:void 0!==(null===Ie||void 0===Ie?void 0:Ie.speed)?"".concat(Ie.speed," km/h"):"\u2014"}),(0,ee.jsx)(fe,{color:"#8b5cf6",icon:F.o8z,label:"Accuracy",value:void 0!==(null===Ie||void 0===Ie?void 0:Ie.accuracy)?"".concat(Ie.accuracy," m"):"\u2014"}),(0,ee.jsx)(fe,{color:"#f59e0b",icon:F.VP9,label:"Log time",value:(null===Ie||void 0===Ie?void 0:Ie.logdate)||"\u2014"}),(0,ee.jsx)(fe,{color:ce,icon:F.gsJ,label:"Active order",value:(null===Ie||void 0===Ie?void 0:Ie.orderid)||"N/A"}),(0,ee.jsx)(fe,{color:"idle"===(null===Ie||void 0===Ie?void 0:Ie.status)?"#f59e0b":"#10b981",icon:F.mU9,label:"Status",value:(null===Ie||void 0===Ie?void 0:Ie.status)||"unknown"})]})]})]},null!==(o=e.userid)&&void 0!==o?o:r)}))),0!==(null===xt||void 0===xt?void 0:xt.length)&&(0,ee.jsx)("div",{ref:te,style:{height:40,textAlign:"center"},children:at||dt?(0,ee.jsx)(X.A,{}):(0,ee.jsx)(p.A,{variant:"caption",sx:{color:ie.textMuted,fontWeight:600},children:"No more riders"})})]}):(0,ee.jsxs)(A.A,{stickyHeader:!0,sx:{minWidth:{xs:1100,md:1300}},children:[(0,ee.jsx)(j.A,{children:(0,ee.jsxs)(m.A,{sx:{"& th":{backgroundColor:ie.surfaceAlt,color:ie.textSecondary,fontSize:{xs:10,md:11},fontWeight:800,letterSpacing:.6,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(ie.borderSubtle),py:{xs:1,md:1.25},px:{xs:1,md:2}}},children:[(0,ee.jsx)(y.A,{children:"#"}),(0,ee.jsx)(y.A,{children:"ID"}),(0,ee.jsx)(y.A,{children:"Rider"}),(0,ee.jsx)(y.A,{children:"Address"}),(0,ee.jsx)(y.A,{children:"Vehicle"}),(0,ee.jsx)(y.A,{children:"Shift"}),(0,ee.jsx)(y.A,{align:"center",children:"Time"}),(0,ee.jsx)(y.A,{children:"Fare"}),(0,ee.jsx)(y.A,{children:"Fuel"}),(0,ee.jsx)(y.A,{align:"center",children:"Status"}),1==Ce&&(0,ee.jsx)(y.A,{align:"right",children:"Action"})]})}),(0,ee.jsxs)(S.A,{children:[lt&&(0,ee.jsx)(_.r,{col:6}),0===(null===xt||void 0===xt?void 0:xt.length)&&!lt&&(0,ee.jsx)(m.A,{children:(0,ee.jsx)(y.A,{colSpan:We,sx:{py:6},children:(0,ee.jsxs)(u.A,{alignItems:"center",spacing:1.5,children:[(0,ee.jsx)(a.A,{sx:{width:64,height:64,bgcolor:le("#94a3b8"),color:ie.textMuted},children:(0,ee.jsx)(F.aVM,{size:28})}),(0,ee.jsx)(p.A,{variant:"subtitle1",sx:{fontWeight:700,color:ie.textPrimary},children:"No riders to show"}),(0,ee.jsx)(p.A,{variant:"caption",sx:{color:ie.textSecondary},children:ge?"Try a different keyword.":"No ".concat(0===we?"":"active ","riders for this zone.")})]})})}),0!==(null===xt||void 0===xt?void 0:xt.length)&&(null===xt||void 0===xt?void 0:xt.map(((e,r)=>{var n,s,l,c;const d=ht(e),f=d.icon,g=Re===e.userid;return(0,ee.jsxs)(i.Fragment,{children:[(0,ee.jsxs)(m.A,{sx:(0,o.A)({cursor:"pointer",transition:"background-color 0.15s","& td":{borderBottom:"1px solid ".concat(ie.divider),py:{xs:1,md:1.5},px:{xs:1,md:2}},"&:hover":{backgroundColor:ie.surfaceAlt}},g&&{backgroundColor:se(ce)}),children:[(0,ee.jsx)(y.A,{children:(0,ee.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:ie.textMuted},children:String(r+1).padStart(2,"0")})}),(0,ee.jsx)(y.A,{children:(0,ee.jsxs)(h.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",px:1,py:.375,borderRadius:999,bgcolor:"#ffffff",border:"1px solid ".concat(ae(ce)),color:ce,fontWeight:800,fontSize:11,minWidth:56},children:["#",null===e||void 0===e?void 0:e.userid]})}),(0,ee.jsx)(y.A,{children:(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,ee.jsx)(a.A,{sx:{width:36,height:36,bgcolor:le(ce),color:ce,fontWeight:800,fontSize:16,border:"1px solid ".concat(ae(ce))},children:(e.fullname||e.username||"?").charAt(0).toUpperCase()}),(0,ee.jsxs)(u.A,{sx:{minWidth:0},children:[(0,ee.jsx)(p.A,{variant:"subtitle2",sx:{fontWeight:700,color:ie.textPrimary,whiteSpace:"nowrap"},children:e.username||"\u2014"}),(0,ee.jsx)(p.A,{variant:"caption",sx:{color:ie.textSecondary},children:e.contactno||"\u2014"})]})]})}),(0,ee.jsx)(y.A,{sx:{maxWidth:220},children:(0,ee.jsx)(w.A,{title:e.address||"",placement:"top",children:(0,ee.jsxs)(u.A,{children:[(0,ee.jsx)(p.A,{variant:"caption",sx:{color:ie.textSecondary,fontWeight:600},noWrap:!0,children:e.suburb||(e.address?e.address.slice(0,20)+"\u2026":"\u2014")}),(0,ee.jsx)(p.A,{variant:"caption",sx:{color:ie.textMuted},noWrap:!0,children:e.city||""})]})})}),(0,ee.jsx)(y.A,{children:(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.75,children:[(0,ee.jsx)(xe,{color:"#0ea5e9",size:22,children:(0,ee.jsx)(F.aVM,{size:12})}),(0,ee.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:ie.textPrimary},children:e.vehicleno||"\u2014"})]})}),(0,ee.jsx)(y.A,{children:(0,ee.jsxs)(p.A,{variant:"caption",sx:{color:ie.textSecondary,fontWeight:600},children:["#",null!==(s=e.shiftid)&&void 0!==s?s:"\u2014"]})}),(0,ee.jsx)(y.A,{align:"center",children:(0,ee.jsxs)(u.A,{spacing:.5,alignItems:"center",children:[(0,ee.jsx)(h.A,{sx:{display:"inline-flex",alignItems:"center",gap:.375,px:.875,py:.25,borderRadius:999,bgcolor:se("#10b981"),border:"1px solid ".concat(ae("#10b981")),color:"#10b981",fontSize:10.5,fontWeight:800,minWidth:88,justifyContent:"center"},children:e.starttime?L()("".concat(L()().format("MM-DD-YYYY")," ").concat(e.starttime)).format("hh:mm A"):"\u2014"}),(0,ee.jsx)(h.A,{sx:{display:"inline-flex",alignItems:"center",gap:.375,px:.875,py:.25,borderRadius:999,bgcolor:se("#ef4444"),border:"1px solid ".concat(ae("#ef4444")),color:"#ef4444",fontSize:10.5,fontWeight:800,minWidth:88,justifyContent:"center"},children:e.endtime?L()("".concat(L()().format("MM-DD-YYYY")," ").concat(e.endtime)).format("hh:mm A"):"\u2014"})]})}),(0,ee.jsx)(y.A,{children:(0,ee.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:ie.textPrimary},children:null!==(l=e.basefare)&&void 0!==l?l:"\u2014"})}),(0,ee.jsx)(y.A,{children:(0,ee.jsx)(p.A,{variant:"caption",sx:{fontWeight:700,color:ie.textPrimary},children:null!==(c=e.fuelcharge)&&void 0!==c?c:"\u2014"})}),(0,ee.jsx)(y.A,{align:"center",children:(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:.5,sx:{display:"inline-flex",pl:.5,pr:1,py:.25,borderRadius:999,bgcolor:se(d.color),border:"1px solid ".concat(ae(d.color)),color:d.color},children:[(0,ee.jsx)(xe,{color:d.color,size:20,children:(0,ee.jsx)(f,{size:12})}),(0,ee.jsx)(p.A,{variant:"caption",sx:{fontWeight:800,fontSize:11,lineHeight:1},children:d.label})]})}),1==Ce&&(0,ee.jsx)(y.A,{align:"right",children:(0,ee.jsxs)(u.A,{direction:"row",spacing:.75,justifyContent:"flex-end",children:[(0,ee.jsx)(w.A,{title:"Edit rider",placement:"top",children:(0,ee.jsx)(k.A,{size:"small",sx:{bgcolor:le(ce),color:ce,border:"1px solid ".concat(ae(ce)),"&:hover":{bgcolor:ce,color:"#fff"}},onClick:()=>{t("/nearle/riders/edit",{state:{riderdata:e}})},children:(0,ee.jsx)(F.Yvo,{size:14})})}),0!=we&&(0,ee.jsx)(w.A,{title:g?"Hide logs":"View live logs",placement:"top",children:(0,ee.jsx)(k.A,{size:"small",sx:{bgcolor:g?"#0ea5e9":le("#0ea5e9"),color:g?"#fff":"#0ea5e9",border:"1px solid ".concat(ae("#0ea5e9")),"&:hover":{bgcolor:"#0ea5e9",color:"#fff"}},onClick:()=>{e.userid==Re?ze(null):(ze(e.userid),tt(e.userid))},children:g?(0,ee.jsx)(F.rAP,{size:14}):(0,ee.jsx)(F.WnU,{size:14})})})]})})]}),g&&0!==we&&(0,ee.jsx)(m.A,{children:(0,ee.jsx)(y.A,{colSpan:We,sx:{p:0,borderBottom:"1px solid ".concat(ie.divider)},children:(0,ee.jsx)(C.A,{in:g,timeout:"auto",unmountOnExit:!0,children:(0,ee.jsxs)(h.A,{sx:{p:{xs:1.5,md:2},bgcolor:"#ffffff",borderTop:"1px solid ".concat(ae(ce))},children:[(0,ee.jsxs)(u.A,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1.25},children:[(0,ee.jsx)(xe,{color:ce,size:26,children:(0,ee.jsx)(F.o8z,{size:14})}),(0,ee.jsxs)(p.A,{sx:{fontWeight:800,color:ie.textSecondary,letterSpacing:.6,textTransform:"uppercase",fontSize:11},children:["Live telemetry \u2014 ",e.username||"Rider #".concat(e.userid)]})]}),(0,ee.jsxs)(x.Ay,{container:!0,spacing:1.25,children:[(0,ee.jsx)(fe,{color:"#ef4444",icon:F.gwi,label:"Location",value:null!==Ie&&void 0!==Ie&&Ie.latitude?"".concat(Ie.latitude,", ").concat(Ie.longitude):"\u2014"}),(0,ee.jsx)(fe,{color:"#10b981",icon:F.E_J,label:"Battery",value:null!==Ie&&void 0!==Ie&&Ie.battery?"".concat(Ie.battery,"%"):"N/A"}),(0,ee.jsx)(fe,{color:null!==Ie&&void 0!==Ie&&Ie.is_charging?"#10b981":"#94a3b8",icon:F.Im6,label:"Charging",value:null!==Ie&&void 0!==Ie&&Ie.is_charging?"Charging":"Not Charging"}),(0,ee.jsx)(fe,{color:"#0ea5e9",icon:F.BJM,label:"Speed",value:void 0!==(null===Ie||void 0===Ie?void 0:Ie.speed)?"".concat(Ie.speed," km/h"):"\u2014"}),(0,ee.jsx)(fe,{color:"#8b5cf6",icon:F.o8z,label:"Accuracy",value:void 0!==(null===Ie||void 0===Ie?void 0:Ie.accuracy)?"".concat(Ie.accuracy," m"):"\u2014"}),(0,ee.jsx)(fe,{color:"#f59e0b",icon:F.VP9,label:"Log time",value:(null===Ie||void 0===Ie?void 0:Ie.logdate)||"\u2014"}),(0,ee.jsx)(fe,{color:ce,icon:F.gsJ,label:"Active order",value:(null===Ie||void 0===Ie?void 0:Ie.orderid)||"N/A"}),(0,ee.jsx)(fe,{color:"idle"===(null===Ie||void 0===Ie?void 0:Ie.status)?"#f59e0b":"#10b981",icon:F.mU9,label:"Status",value:(null===Ie||void 0===Ie?void 0:Ie.status)||"unknown"})]})]})})})})]},null!==(n=e.userid)&&void 0!==n?n:r)}))),0!==(null===xt||void 0===xt?void 0:xt.length)&&(0,ee.jsx)(m.A,{children:(0,ee.jsx)(y.A,{colSpan:We,sx:{borderBottom:"none"},children:(0,ee.jsx)("div",{ref:te,style:{height:40,textAlign:"center"},children:at||dt?(0,ee.jsx)(X.A,{}):(0,ee.jsx)(p.A,{variant:"caption",sx:{color:ie.textMuted,fontWeight:600},children:"No more riders"})})})})]})]})})}),(0,ee.jsxs)(W.A,{open:Boolean(Ne),onClose:()=>Be(null),maxWidth:"xs",fullWidth:!0,PaperProps:{sx:{borderRadius:"".concat(ie.radiusCard/8,"px"),p:1}},children:[(0,ee.jsx)(R.A,{sx:{fontWeight:700,pb:1},children:"Update Substitution"}),(0,ee.jsx)(z.A,{children:(0,ee.jsxs)(u.A,{spacing:2,sx:{mt:1},children:[(0,ee.jsxs)(p.A,{variant:"body2",sx:{color:ie.textSecondary},children:["Choose a new substitute rider for ",(0,ee.jsx)("strong",{children:null===Ne||void 0===Ne?void 0:Ne.absent_rider_name}),"."]}),(0,ee.jsx)(I.A,{size:"small",options:Ee||[],isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.userid)===(null===t||void 0===t?void 0:t.userid),getOptionLabel:e=>"".concat(e.username||e.fullname||""," (#").concat(e.userid,")"),value:Fe,onChange:(e,t)=>qe(t),renderInput:e=>(0,ee.jsx)(Y.A,(0,o.A)((0,o.A)({},e),{},{placeholder:"Select Substitute Rider",sx:{"& .MuiOutlinedInput-root":{borderRadius:"8px",bgcolor:"#f8fafc","& fieldset":{borderColor:ie.borderSubtle}}}}))})]})}),(0,ee.jsxs)(M.A,{sx:{px:3,pb:2},children:[(0,ee.jsx)(P.A,{variant:"outlined",onClick:()=>Be(null),sx:{borderRadius:"8px",textTransform:"none",fontWeight:600,borderColor:ie.borderSubtle,color:ie.textSecondary},children:"Cancel"}),(0,ee.jsx)(P.A,{variant:"contained",onClick:async()=>{if(Fe)try{const e=Ne.tenant_id||Ne.tenantid||He(),r="".concat("https://jupiter.nearle.app/live/api/v1","/substitutions/").concat(Ne.id),o={tenant_id:parseInt(e,10),sub_rider_id:parseInt(Fe.userid,10),sub_rider_name:Fe.username||Fe.fullname||"Rider #".concat(Fe.userid)},i=await s.A.put(r,o);var t;if(i.data&&i.data.status)(0,$.k)("Substitution updated successfully!","success",2e3);else(0,$.k)((null===(t=i.data)||void 0===t?void 0:t.message)||"Failed to update substitution.","error",2e3)}catch(i){var r,o;console.error(i),(0,$.k)((null===(r=i.response)||void 0===r||null===(o=r.data)||void 0===o?void 0:o.message)||i.message||"Failed to update substitution.","error",2e3)}finally{Be(null),qe(null),e.invalidateQueries({queryKey:["substitutionsHistory"]}),e.invalidateQueries({queryKey:["activeSubstitutionsToday"]})}else(0,$.k)("Please select a substitute rider","error",2e3)},disabled:!Fe,sx:{borderRadius:"8px",textTransform:"none",fontWeight:600,bgcolor:ce,color:"#fff","&:hover":{bgcolor:"#4D1C61"}},children:"Save Changes"})]})]})]});var pt}},94826:(e,t,r)=>{r.d(t,{A:()=>c});var o=r(60308),i=r(12010),n=r(62217),s=r(65908);const l=(0,o.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,o.Ay)("div")((()=>({position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}))),c=()=>(0,s.jsxs)(l,{children:[(0,s.jsx)(i.A,{color:"primary",size:80,thickness:6}),(0,s.jsx)(a,{children:(0,s.jsx)("img",{src:n,alt:"Logo",style:{width:"100%",height:"100%"}})})]})},96646:(e,t,r)=>{r.d(t,{r:()=>a});var o=r(50755),i=r(1596),n=r(91834),s=r(71392),l=r(65908);const a=e=>{let{rowsPerPage:t=5,col:r=1}=e;return(0,l.jsx)(l.Fragment,{children:Array.from(new Array(t)).map(((e,t)=>(0,l.jsxs)(o.A,{children:[(0,l.jsx)(i.A,{children:(0,l.jsx)(n.A,{variant:"circular",width:24,height:24})}),(0,l.jsx)(i.A,{children:(0,l.jsx)(n.A,{variant:"text",width:30})}),Array.from({length:r}).map(((e,t)=>(0,l.jsx)(i.A,{children:(0,l.jsxs)(s.A,{spacing:.5,children:[(0,l.jsx)(n.A,{variant:"text",width:100}),(0,l.jsx)(n.A,{variant:"text",width:80})]})},t))),(0,l.jsx)(i.A,{children:(0,l.jsx)(n.A,{variant:"text",width:150})}),(0,l.jsx)(i.A,{children:(0,l.jsx)(n.A,{variant:"rounded",width:60,height:24})}),(0,l.jsx)(i.A,{align:"center",children:(0,l.jsxs)(s.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,l.jsx)(n.A,{variant:"circular",width:28,height:28}),(0,l.jsx)(n.A,{variant:"circular",width:28,height:28})]})})]},t)))})}}}]);