1import{r as o,f as a,j as s}from"./vendor-4dc6bb9b.js";import{uh as g}from"./index-53eeb11a.js";import{P as x}from"./styles-64feef48.js";import"./Checkbox-d5ebce6f.js";import"./PrinterDocument-16e216d7.js";import{A as j}from"./AdminOrderTable-5c12e6b4.js";import{A as q}from"./AdminPageHeader-2bd414cf.js";import"./Table-5d6851f8.js";import"./Pagination-8ac5a19e.js";import{G as A}from"./GqlQueryWrapper-4c83a989.js";import{Q as O}from"./QuerySearch-3fe18c12.js";import"./Card-fa496090.js";import"./ExpandableSection-a155fc12.js";import"./generateAllLabelData-e738a442.js";import"./CustomizationUtils-e6a5c1f8.js";import"./Utilities-983ae5e1.js";import"./util-cd03b289.js";import"./index-83ae54cc.js";import"./Page-cf6dc983.js";import"./index-65c897e8.js";import"./ownerDocument-9f988f29.js";import"./warning-6a1ec0ac.js";import"./index-22c9bed5.js";import"./FoodUtils-c666d6dc.js";import"./DietaryIcons-321ce346.js";import"./Tabs-e5ecc481.js";import"./TimeWindowUtils-38921e34.js";import"./NetworkingError-c2bb8e27.js";const Z=({match:d,history:m,location:e})=>{const i=o.useMemo(()=>{const r=a.parse(e.search);return typeof r.query=="string"?r.query:""},[e.search]),[t,n]=o.useState(i),{loading:u,error:l,data:p,refetch:c}=g({variables:{search:i}}),{groupOrders:h,pagination:f}=p&&p.adminGroupOrders||{orders:[],pagination:void 0},y=o.useCallback(()=>{const r=a.parse(e.search);t?r.query=t:delete r.query,m.replace({pathname:e.pathname,search:a.stringify(r)})},[t,m,e.pathname,e.search]);return s.jsxs("div",{className:"admin-orders",children:[s.jsx(q,{header:"Orders",subHeader:"All Orders"}),s.jsx(x,{children:s.jsx(O,{placeholder:"Shef ID, Customer ID, GoID, Order ID, customer first or last name, or phone",query:t,onQueryPressed:y,onQueryChanged:n})}),s.jsx(A,{loading:u,error:l,errorMessage:"Failed to load orders",children:s.jsx(j,{match:d,orders:h,pagination:f,requestPage:r=>c({page:r})})})]})};export{Z as AdminAllOrders,Z as default}; 2//# sourceMappingURL=AdminAllOrders-92bd6098.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.