1"use strict";(self.webpackChunkm=self.webpackChunkm||[]).push([[556],{3556:(t,e,r)=>{r.r(e),r.d(e,{default:()=>I});var s=r(65043),o=r(96446),n=r(12110),a=r(26494),i=r(94496),l=r(26487),c=r(69392),d=r(71716),u=r(35721),m=r(98587),p=r(58168),h=r(58387),A=r(98610),x=r(34535),f=r(98206),y=r(6803),b=r(92532),g=r(72372);function j(t){return(0,g.Ay)("MuiListSubheader",t)}(0,b.A)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);var v=r(70579);const S=["className","color","component","disableGutters","disableSticky","inset"],k=(0,x.Ay)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,"default"!==r.color&&e[`color${(0,y.A)(r.color)}`],!r.disableGutters&&e.gutters,r.inset&&e.inset,!r.disableSticky&&e.sticky]}})((t=>{let{theme:e,ownerState:r}=t;return(0,p.A)({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},"primary"===r.color&&{color:(e.vars||e).palette.primary.main},"inherit"===r.color&&{color:"inherit"},!r.disableGutters&&{paddingLeft:16,paddingRight:16},r.inset&&{paddingLeft:72},!r.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})})),C=s.forwardRef((function(t,e){const r=(0,f.b)({props:t,name:"MuiListSubheader"}),{className:s,color:o="default",component:n="li",disableGutters:a=!1,disableSticky:i=!1,inset:l=!1}=r,c=(0,m.A)(r,S),d=(0,p.A)({},r,{color:o,component:n,disableGutters:a,disableSticky:i,inset:l}),u=(t=>{const{classes:e,color:r,disableGutters:s,inset:o,disableSticky:n}=t,a={root:["root","default"!==r&&`color${(0,y.A)(r)}`,!s&&"gutters",o&&"inset",!n&&"sticky"]};return(0,A.A)(a,j,e)})(d);return(0,v.jsx)(k,(0,p.A)({as:n,className:(0,h.A)(u.root,s),ref:e,ownerState:d},c))}));C.muiSkipListHighlight=!0;const M=C;var w=r(37918),R=r(48734),N=r(39336),_=r(99010),L=r(47805),z=r(95041);const I=()=>{const[t,e]=(0,s.useState)([]),[r,m]=(0,s.useState)(!1),p=async()=>{m(!0);try{const t=await z.p.list({limit:25,status:"open"});e(t)}catch(t){}finally{m(!1)}};return(0,s.useEffect)((()=>{p()}),[]),(0,v.jsxs)(o.A,{sx:{p:3},children:[(0,v.jsx)(n.A,{elevation:3,sx:{mb:2},children:(0,v.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,v.jsx)(_.A,{color:"primary"}),(0,v.jsx)(i.A,{variant:"h5",fontWeight:"bold",children:"Inbox"}),(0,v.jsx)(l.A,{label:`${t.length} Open Orders`,color:"primary",variant:"outlined"}),(0,v.jsx)(o.A,{sx:{flex:1}}),(0,v.jsx)(c.A,{title:"Refresh",children:(0,v.jsx)("span",{children:(0,v.jsx)(d.A,{onClick:p,disabled:r,children:(0,v.jsx)(L.A,{className:r?"rotating":""})})})})]})}),(0,v.jsx)(n.A,{elevation:2,children:(0,v.jsx)(u.A,{subheader:(0,v.jsx)(M,{children:"Recent Orders"}),children:t.map((t=>(0,v.jsxs)(s.Fragment,{children:[(0,v.jsx)(w.Ay,{alignItems:"flex-start",children:(0,v.jsx)(R.A,{primary:(0,v.jsxs)(o.A,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[(0,v.jsx)(i.A,{variant:"subtitle1",fontWeight:"bold",children:t.name}),(0,v.jsx)(l.A,{size:"small",label:t.financial_status||"n/a"}),t.fulfillment_status&&(0,v.jsx)(l.A,{size:"small",color:"info",label:t.fulfillment_status}),(0,v.jsx)(i.A,{variant:"caption",color:"text.secondary",children:new Date(t.created_at).toLocaleString()})]}),secondary:(0,v.jsxs)(o.A,{children:[t.customer&&(0,v.jsxs)(i.A,{variant:"body2",children:["Customer: ",t.customer.first_name," ",t.customer.last_name," (",t.customer.email,")"]}),(0,v.jsxs)(i.A,{variant:"body2",children:["Total: ",t.currency," ",t.total_price]}),t.line_items&&t.line_items.length>0&&(0,v.jsxs)(o.A,{sx:{mt:1},children:[(0,v.jsx)(i.A,{variant:"caption",color:"text.secondary",children:"Items:"}),t.line_items.map((e=>(0,v.jsxs)(i.A,{variant:"caption",display:"block",children:["\u2022 ",e.title," x",e.quantity," (",e.sku||"SKU n/a",") - ",t.currency," ",e.price]},e.id)))]})]})})}),(0,v.jsx)(N.A,{component:"li"})]},t.id)))})}),(0,v.jsx)("style",{children:"\n .rotating { animation: rotation 1s infinite linear; }\n @keyframes rotation { from { transform: rotate(0deg); } to { transform: rotate(359deg); } }\n "})]})}},47805:(t,e,r)=>{r.d(e,{A:()=>n});var s=r(59662),o=r(70579);const n=(0,s.A)((0,o.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh")},99010:(t,e,r)=>{r.d(e,{A:()=>n});var s=r(59662),o=r(70579);const n=(0,s.A)((0,o.jsx)("path",{d:"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2M1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2"}),"ShoppingCart")},12110:(t,e,r)=>{r.d(e,{A:()=>f});var s=r(58168),o=r(98587),n=r(65043),a=r(58387),i=r(98610),l=r(34535),c=r(98206),d=r(65204),u=r(92532),m=r(72372);function p(t){return(0,m.Ay)("MuiCard",t)}(0,u.A)("MuiCard",["root"]);var h=r(70579);const A=["className","raised"],x=(0,l.Ay)(d.A,{name:"MuiCard",slot:"Root",overridesResolver:(t,e)=>e.root})((()=>({overflow:"hidden"}))),f=n.forwardRef((function(t,e){const r=(0,c.b)({props:t,name:"MuiCard"}),{className:n,raised:l=!1}=r,d=(0,o.A)(r,A),u=(0,s.A)({},r,{raised:l}),m=(t=>{const{classes:e}=t;return(0,i.A)({root:["root"]},p,e)})(u);return(0,h.jsx)(x,(0,s.A)({className:(0,a.A)(m.root,n),elevation:l?8:void 0,ref:e,ownerState:u},d))}))},26494:(t,e,r)=>{r.d(e,{A:()=>x});var s=r(58168),o=r(98587),n=r(65043),a=r(58387),i=r(98610),l=r(34535),c=r(98206),d=r(92532),u=r(72372);function m(t){return(0,u.Ay)("MuiCardContent",t)}(0,d.A)("MuiCardContent",["root"]);var p=r(70579);const h=["className","component"],A=(0,l.Ay)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(t,e)=>e.root})((()=>({padding:16,"&:last-child":{paddingBottom:24}}))),x=n.forwardRef((function(t,e){const r=(0,c.b)({props:t,name:"MuiCardContent"}),{className:n,component:l="div"}=r,d=(0,o.A)(r,h),u=(0,s.A)({},r,{component:l}),x=(t=>{const{classes:e}=t;return(0,i.A)({root:["root"]},m,e)})(u);return(0,p.jsx)(A,(0,s.A)({as:l,className:(0,a.A)(x.root,n),ownerState:u,ref:e},d))}))}}]); 2//# sourceMappingURL=556.3d4a4838.chunk.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.