1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8704],{91100:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/order",function(){return a(23910)}])},53766:function(e,t,a){"use strict";a.d(t,{X:function(){return i}});var s=a(11527),l=a(50959),r=a(18708),n=a(69730),d=a(56182);let i=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)(r.fC,{ref:t,className:(0,d.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",a),...l,children:(0,s.jsx)(r.z$,{className:(0,d.cn)("flex items-center justify-center text-current"),children:(0,s.jsx)(n.nQG,{className:"h-4 w-4"})})})});i.displayName=r.fC.displayName},4018:function(e,t,a){"use strict";a.d(t,{mY:function(){return f},rb:function(){return g},fu:function(){return j},sZ:function(){return p},di:function(){return v},e8:function(){return h},zz:function(){return N}});var s=a(11527),l=a(50959),r=a(69730),n=a(14833),d=a(56182),i=a(3854);i.fC,i.xz;let o=i.h_,c=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)(i.aV,{ref:t,className:(0,d.cn)("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...l})});c.displayName=i.aV.displayName;let u=l.forwardRef((e,t)=>{let{className:a,children:l,...n}=e;return(0,s.jsxs)(o,{children:[(0,s.jsx)(c,{}),(0,s.jsxs)(i.VY,{ref:t,className:(0,d.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",a),...n,children:[l,(0,s.jsxs)(i.x8,{className:"absolute right-4 top-4 roun
1ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,s.jsx)(r.Pxu,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});u.displayName=i.VY.displayName;let m=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)(i.Dx,{ref:t,className:(0,d.cn)("text-lg font-semibold leading-none tracking-tight",a),...l})});m.displayName=i.Dx.displayName;let x=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)(i.dk,{ref:t,className:(0,d.cn)("text-sm text-muted-foreground",a),...l})});x.displayName=i.dk.displayName;let f=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)(n.mY,{ref:t,className:(0,d.cn)("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",a),...l})});f.displayName=n.mY.displayName;let p=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,s.jsx)(r._Ve,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,s.jsx)(n.mY.Input,{ref:t,className:(0,d.cn)("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",a),...l})]})});p.displayName=n.mY.Input.displayName;let h=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)(n.mY.List,{ref:t,className:(0,d.cn)("max-h-[300px] overflow-y-auto overflow-x-hidden",a),...l})});h.displayName=n.mY.List.displayName;let g=l.forwardRef((e,t)=>(0,s.jsx)(n.mY.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));g.displayName=n.mY.Empty.displayName;let j=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)(n.mY.Group,{ref:t,className:(0,d.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",a),...l})});j.displayName=n.mY.Group.displayName;let N=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)(n.mY.Separator,{ref:t,className:(0,d.cn)("-mx-1 h-px bg-border",a),...l})});N.displayName=n.mY.Separator.displayName;let v=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)(n.mY.Item,{ref:t,className:(0,d.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...l})});v.displayName=n.mY.Item.displayName},90717:function(e,t,a){"use strict";a.d(t,{I:function(){return n}});var s=a(11527),l=a(50959),r=a(56182);let n=l.forwardRef((e,t)=>{let{className:a,type:l,...n}=e;return(0,s.jsx)("input",{type:l,className:(0,r.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",a),ref:t,...n})});n.displayName="Input"},92502:function(e,t,a){"use strict";a.d(t,{J2:function(){return d},xo:function(){return i},yk:function(){return o}});var s=a(11527),l=a(50959),r=a(8379),n=a(56182);let d=r.fC,i=r.xz,o=l.forwardRef((e,t)=>{let{className:a,align:l="center",sideOffset:d=4,...i}=e;return(0,s.jsx)(r.h_,{children:(0,s.jsx)(r.VY,{ref:t,align:l,sideOffset:d,className:(0,n.cn)("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...i})})});o.displayName=r.VY.displayName},69463:function(e,t,a){"use strict";a.d(t,{Bw:function(){return m},DI:function(){return o},Ph:function(){return i},Ql:function(){return f},i4:function(){return u},ki:function(){return c}});var s=a(11527),l=a(50959),r=a(69730),n=a(6478),d=a(56182);let i=n.fC,o=n.ZA,c=n.B4,u=l.forwardRef((e,t)=>
1{let{className:a,children:l,...i}=e;return(0,s.jsxs)(n.xz,{ref:t,className:(0,d.cn)("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",a),...i,children:[l,(0,s.jsx)(n.JO,{asChild:!0,children:(0,s.jsx)(r.jnn,{className:"h-4 w-4 opacity-50"})})]})});u.displayName=n.xz.displayName;let m=l.forwardRef((e,t)=>{let{className:a,children:l,position:r="popper",...i}=e;return(0,s.jsx)(n.h_,{children:(0,s.jsx)(n.VY,{ref:t,className:(0,d.cn)("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:r,...i,children:(0,s.jsx)(n.l_,{className:(0,d.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:l})})})});m.displayName=n.VY.displayName;let x=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)(n.__,{ref:t,className:(0,d.cn)("px-2 py-1.5 text-sm font-semibold",a),...l})});x.displayName=n.__.displayName;let f=l.forwardRef((e,t)=>{let{className:a,children:l,...i}=e;return(0,s.jsxs)(n.ck,{ref:t,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...i,children:[(0,s.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(n.wU,{children:(0,s.jsx)(r.nQG,{className:"h-4 w-4"})})}),(0,s.jsx)(n.eT,{children:l})]})});f.displayName=n.ck.displayName;let p=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)(n.Z0,{ref:t,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",a),...l})});p.displayName=n.Z0.displayName},86081:function(e,t,a){"use strict";a.d(t,{Z:function(){return d}});var s=a(11527),l=a(50959),r=a(85475),n=a(56182);let d=l.forwardRef((e,t)=>{let{className:a,orientation:l="horizontal",decorative:d=!0,...i}=e;return(0,s.jsx)(r.f,{ref:t,decorative:d,orientation:l,className:(0,n.cn)("shrink-0 bg-border","horizontal"===l?"h-[1px] w-full":"h-full w-[1px]",a),...i})});d.displayName=r.f.displayName},65432:function(e,t,a){"use strict";a.d(t,{RM:function(){return i},SC:function(){return c},iA:function(){return n},pj:function(){return m},ss:function(){return u},xD:function(){return d}});var s=a(11527),l=a(50959),r=a(56182);let n=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)("div",{className:"relative w-full overflow-auto",children:(0,s.jsx)("table",{ref:t,className:(0,r.cn)("w-full caption-bottom text-sm",a),...l})})});n.displayName="Table";let d=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)("thead",{ref:t,className:(0,r.cn)("[&_tr]:border-b",a),...l})});d.displayName="TableHeader";let i=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)("tbody",{ref:t,className:(0,r.cn)("[&_tr:last-child]:border-0",a),...l})});i.displayName="TableBody";let o=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)("tfoot",{ref:t,className:(0,r.cn)("bg-primary font-medium text-primary-foreground",a),...l})});o.displayName="TableFooter";let c=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)("tr",{ref:t,className:(0,r.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",a),...l})});c.displayName="TableRow";let u=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)("th",{ref:t,className:(0,r.cn)("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...l})});u.displayName="TableHead";let m=l.forwardRef((e,t)=>
1{let{className:a,...l}=e;return(0,s.jsx)("td",{ref:t,className:(0,r.cn)("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...l})});m.displayName="TableCell";let x=l.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)("caption",{ref:t,className:(0,r.cn)("mt-4 text-sm text-muted-foreground",a),...l})});x.displayName="TableCaption"},32102:function(e,t,a){"use strict";a.d(t,{Do:function(){return l}});var s=a(69730);let l=[{value:"pending",label:"Pending",icon:s.u0k},{value:"success",label:"Success",icon:s.NhS},{value:"failed",label:"Failed",icon:s.xrR},{value:"carrier",label:"Carrier",icon:s.Tk0},{value:"delivered",label:"Delivered",icon:s.NhS},{value:"returned",label:"Returned",icon:s.X5P},{value:"canceled",label:"Canceled",icon:s.xrR},{value:"repeated",label:"Repeated",icon:s.BGW},{value:"completed",label:"Completed",icon:s.NhS}];s.veu,s.LZ3,s.Hf3},62953:function(e,t,a){"use strict";a.d(t,{$2:function(){return r},IK:function(){return i},IT:function(){return o},Rp:function(){return l},Z_:function(){return n},vS:function(){return d}});var s=a(84291);let l=s.Ry({id:s.Rx(),name:s.Z_(),price:s.Rx(),discount:s.Rx(),category:s.Z_()}),r=s.Ry({id:s.Rx(),name:s.Z_(),active:s.O7()}),n=s.Ry({id:s.Rx(),name:s.Z_()}),d=s.Ry({id:s.Rx(),name:s.Z_()}),i=s.Ry({id:s.Z_(),name:s.Z_(),lastName:s.Z_(),email:s.Z_(),phone:s.Z_()}),o=s.Ry({id:s.Rx(),name:s.Z_(),phone:s.Z_(),address:s.Z_(),orderTimeId:s.Z_(),deliveryId:s.Z_(),status:s.Z_(),orderId:s.Z_(),totalPrice:s.Rx(),productCount:s.Rx(),bank:s.Z_()})},23910:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return Y},default:function(){return A},metadata:function(){return O}});var s=a(11527),l=a(26179),r=a(51619),n=a(50959),d=a(74836),i=a(1908),o=a(65432),c=a(69730),u=a(52967),m=a(69463);function x(e){let{table:t}=e;return(0,s.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,s.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:[t.getFilteredSelectedRowModel().rows.length," of"," ",t.getFilteredRowModel().rows.length," row(s) selected."]}),(0,s.jsxs)("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Rows per page"}),(0,s.jsxs)(m.Ph,{value:"".concat(t.getState().pagination.pageSize),onValueChange:e=>{t.setPageSize(Number(e))},children:[(0,s.jsx)(m.i4,{className:"h-8 w-[70px]",children:(0,s.jsx)(m.ki,{placeholder:t.getState().pagination.pageSize})}),(0,s.jsx)(m.Bw,{side:"top",children:[10,20,30,40,50].map(e=>(0,s.jsx)(m.Ql,{value:"".concat(e),children:e},e))})]})]}),(0,s.jsxs)("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:["Page ",t.getState().pagination.pageIndex+1," of"," ",t.getPageCount()]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsxs)(u.z,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>t.setPageIndex(0),disabled:!t.getCanPreviousPage(),children:[(0,s.jsx)("span",{className:"sr-only",children:"Go to first page"}),(0,s.jsx)(c.kRt,{className:"h-4 w-4"})]}),(0,s.jsxs)(u.z,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>t.previousPage(),disabled:!t.getCanPreviousPage(),children:[(0,s.jsx)("span",{className:"sr-only",children:"Go to previous page"}),(0,s.jsx)(c.wyc,{className:"h-4 w-4"})]}),(0,s.jsxs)(u.z,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>t.nextPage(),disabled:!t.getCanNextPage(),children:[(0,s.jsx)("span",{className:"sr-only",children:"Go to next page"}),(0,s.jsx)(c.XCv,{className:"h-4 w-4"})]}),(0,s.jsxs)(u.z,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>t.setPageIndex(t.getPageCount()-1),disabled:!t.getCanNextPage(),children:[(0,s.jsx)("span",{className:"sr-only",children:"Go to last page"}),(0,s.jsx)(c.yr4,{className:"h-4 w-4"})]})]})]})]})}var f=a(59318),p=a(90717),h=a(9745),g=a(5999);function j(e){let{table:t}=e,{t:a}=(0,f.$G)("dashboard");return(0,s.jsxs)(g.h_,{children:[(0,s.jsx)(h.$F,{asChild:!0,children:(0,s.jsxs)(u.z,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[(0,s.jsx)(c.hsZ,{className:"mr-2 h-4 w-4"}),a("database.view")]})}),(0,s.jsxs)(g.AW,{align:"end",className:"w-[150px]",children:[(0,s.jsx)(g.Ju,{children:a("database.toggleColumns")}),(0,s.jsx)(g.VD,{}),t.getAllColumns().filter(e=>void 0!==e.accessorFn&&e.getCanHide()).map(e=>(0,s.jsx)(g.bO,{className:"capitalize",checked:e.getIsVisible(),onCheckedChange:t=>e.toggleVisibility(!!t),children:e.id},e.id))]})]})}var N=a(32102),v=a(56182),b=a(12916),w=a(4018),y=a(92502),C=a(86081);
1function R(e){let{column:t,title:a,options:l}=e,r=null==t?void 0:t.getFacetedUniqueValues(),n=new Set(null==t?void 0:t.getFilterValue());return(0,s.jsxs)(y.J2,{children:[(0,s.jsx)(y.xo,{asChild:!0,children:(0,s.jsxs)(u.z,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[(0,s.jsx)(c.SPS,{className:"mr-2 h-4 w-4"}),a,(null==n?void 0:n.size)>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{orientation:"vertical",className:"mx-2 h-4"}),(0,s.jsx)(b.C,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:n.size}),(0,s.jsx)("div",{className:"hidden space-x-1 lg:flex",children:n.size>2?(0,s.jsxs)(b.C,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[n.size," selected"]}):l.filter(e=>n.has(e.value)).map(e=>(0,s.jsx)(b.C,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:e.label},e.value))})]})]})}),(0,s.jsx)(y.yk,{className:"w-[200px] p-0",align:"start",children:(0,s.jsxs)(w.mY,{children:[(0,s.jsx)(w.sZ,{placeholder:a}),(0,s.jsxs)(w.e8,{children:[(0,s.jsx)(w.rb,{children:"No results found."}),(0,s.jsx)(w.fu,{children:l.map(e=>{let a=n.has(e.value);return(0,s.jsxs)(w.di,{onSelect:()=>{a?n.delete(e.value):n.add(e.value);let s=Array.from(n);null==t||t.setFilterValue(s.length?s:void 0)},children:[(0,s.jsx)("div",{className:(0,v.cn)("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",a?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:(0,s.jsx)(c.nQG,{className:(0,v.cn)("h-4 w-4")})}),e.icon&&(0,s.jsx)(e.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),(0,s.jsx)("span",{children:e.label}),(null==r?void 0:r.get(e.value))&&(0,s.jsx)("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:r.get(e.value)})]},e.value)})}),n.size>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w.zz,{}),(0,s.jsx)(w.fu,{children:(0,s.jsx)(w.di,{onSelect:()=>null==t?void 0:t.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}function S(e){var t,a;let{table:l}=e,{t:r}=(0,f.$G)("dashboard"),n=l.getState().columnFilters.length>0;return(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex flex-1 items-center space-x-2",children:[(0,s.jsx)(p.I,{placeholder:r("database.search"),value:null!==(a=null===(t=l.getColumn("name"))||void 0===t?void 0:t.getFilterValue())&&void 0!==a?a:"",onChange:e=>{var t;return null===(t=l.getColumn("name"))||void 0===t?void 0:t.setFilterValue(e.target.value)},className:"h-8 w-[150px] lg:w-[250px]"}),l.getColumn("status")&&(0,s.jsx)(R,{column:l.getColumn("status"),title:"Status",options:N.Do}),n&&(0,s.jsxs)(u.z,{variant:"ghost",onClick:()=>l.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[r("database.reset"),(0,s.jsx)(c.Pxu,{className:"ml-2 h-4 w-4"})]})]}),(0,s.jsx)("div",{className:"flex flex-1 items-center space-x-2",children:(0,s.jsx)(j,{table:l})})]})}function k(e){var t;let{columns:a,data:l}=e,[r,c]=n.useState({}),[u,m]=n.useState({}),[f,p]=n.useState([]),[h,g]=n.useState([]),j=(0,d.b7)({data:l,columns:a,state:{sorting:h,columnVisibility:u,rowSelection:r,columnFilters:f},enableRowSelection:!0,onRowSelectionChange:c,onSortingChange:g,onColumnFiltersChange:p,onColumnVisibilityChange:m,getCoreRowModel:(0,i.sC)(),getFilteredRowModel:(0,i.vL)(),getPaginationRowModel:(0,i.G_)(),getSortedRowModel:(0,i.tj)(),getFacetedRowModel:(0,i.o6)(),getFacetedUniqueValues:(0,i.JG)()});return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(S,{table:j}),(0,s.jsx)("div",{className:"rounded-md border",children:(0,s.jsxs)(o.iA,{children:[(0,s.jsx)(o.xD,{children:j.getHeaderGroups().map(e=>(0,s.jsx)(o.SC,{children:e.headers.map(e=>(0,s.jsx)(o.ss,{children:e.isPlaceholder?null:(0,d.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,s.jsx)(o.RM,{children:(null===(t=j.getRowModel().rows)||void 0===t?void 0:t.length)?j.getRowModel().rows.map(e=>(0,s.jsx)(o.SC,{"data-state":e.getIsSelected()&&"selected",children:e.getVisibleCells().map(e=>(0,s.jsx)(o.pj,{children:(0,d.ie)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,s.jsx)(o.SC,{children:(0,s.jsx)(o.pj,{colSpan:a.length,className:"h-24 text-center",children:"No results."})})})]})}),(0,s.jsx)(x,{table:j})]})}var _=a(53766);
1function z(e){let{column:t,title:a,className:l}=e;return t.getCanSort()?(0,s.jsx)("div",{className:(0,v.cn)("flex items-center space-x-2",l),children:(0,s.jsxs)(g.h_,{children:[(0,s.jsx)(g.$F,{asChild:!0,children:(0,s.jsxs)(u.z,{variant:"ghost",size:"sm",className:"-ml-3 h-8 data-[state=open]:bg-accent",children:[(0,s.jsx)("span",{children:a}),"desc"===t.getIsSorted()?(0,s.jsx)(c.veu,{className:"ml-2 h-4 w-4"}):"asc"===t.getIsSorted()?(0,s.jsx)(c.Hf3,{className:"ml-2 h-4 w-4"}):(0,s.jsx)(c.jnn,{className:"ml-2 h-4 w-4"})]})}),(0,s.jsxs)(g.AW,{align:"start",children:[(0,s.jsxs)(g.Xi,{onClick:()=>t.toggleSorting(!1),children:[(0,s.jsx)(c.Hf3,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70"}),"Asc"]}),(0,s.jsxs)(g.Xi,{onClick:()=>t.toggleSorting(!0),children:[(0,s.jsx)(c.veu,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70"}),"Desc"]}),(0,s.jsx)(g.VD,{}),(0,s.jsxs)(g.Xi,{onClick:()=>t.toggleVisibility(!1),children:[(0,s.jsx)(c.L52,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70"}),"Hide"]})]})]})}):(0,s.jsx)("div",{className:(0,v.cn)(l),children:a})}var I=a(62953),V=a(55803),P=a(62144);function Z(e){let{row:t}=e,{t:a}=(0,f.$G)("dashboard"),l=I.IT.parse(t.original),r=P.S.useContext(),n=(0,V.useRouter)(),d=P.S.order.delete.useMutation({async onSuccess(){await r.order.all.invalidate()}});return(0,s.jsxs)(g.h_,{children:[(0,s.jsx)(g.$F,{asChild:!0,children:(0,s.jsxs)(u.z,{variant:"ghost",className:"flex h-8 w-8 p-0 data-[state=open]:bg-muted",children:[(0,s.jsx)(c.nWS,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"sr-only",children:"Open menu"})]})}),(0,s.jsxs)(g.AW,{align:"end",className:"w-[160px]",children:[(0,s.jsx)(g.Xi,{onClick:()=>n.push("orders/".concat(l.id)),children:a("database.edit")}),"CASH"!==l.bank&&(0,s.jsx)(g.Xi,{onClick:()=>{var e;return null===(e=navigator.clipboard)||void 0===e?void 0:e.writeText(l.orderId)},children:"Copy payment ID"}),(0,s.jsx)(g.VD,{}),(0,s.jsxs)(g.Xi,{onClick:()=>d.mutate({id:l.id}),children:[a("database.delete"),(0,s.jsx)(g.KM,{children:"ââ«"})]})]})]})}var T=a(51843),D=a.n(T);let G=[{id:"select",header:e=>{let{table:t}=e;return(0,s.jsx)(_.X,{checked:t.getIsAllPageRowsSelected(),onCheckedChange:e=>t.toggleAllPageRowsSelected(!!e),"aria-label":"Select all",className:"translate-y-[2px]"})},cell:e=>{let{row:t}=e;return(0,s.jsx)(_.X,{checked:t.getIsSelected(),onCheckedChange:e=>t.toggleSelected(!!e),"aria-label":"Select row",className:"translate-y-[2px]"})},enableSorting:!1,enableHiding:!1},{accessorKey:"id",header:e=>{let{column:t}=e;return(0,s.jsx)(z,{column:t,title:"id"})},cell:e=>{let{row:t}=e;return(0,s.jsx)("div",{className:"w-[80px]",children:t.getValue("id")})},enableSorting:!1,enableHiding:!1},{accessorKey:"name",header:e=>{let{column:t}=e;return(0,s.jsx)(z,{column:t,title:"name"})},cell:e=>{let{row:t}=e;return(0,s.jsx)("div",{className:"flex space-x-2",children:(0,s.jsx)("span",{className:"max-w-[500px] truncate font-medium",children:t.getValue("name")})})}},{accessorKey:"phone",header:e=>{let{column:t}=e;return(0,s.jsx)(z,{column:t,title:"phone"})},cell:e=>{let{row:t}=e;return(0,s.jsx)("div",{className:"flex space-x-2",children:(0,s.jsx)(D(),{href:"tel:".concat(t.getValue("phone")),children:(0,s.jsx)("span",{className:"max-w-[500px] truncate font-medium",children:t.getValue("phone")})})})}},{accessorKey:"address",header:e=>{let{column:t}=e;return(0,s.jsx)(z,{column:t,title:"address"})},cell:e=>{let{row:t}=e;return(0,s.jsx)("div",{className:"flex space-x-2",children:(0,s.jsx)("span",{className:"max-w-[500px] truncate font-medium",children:t.getValue("address")})})}},{accessorKey:"bank",header:e=>{let{column:t}=e;return(0,s.jsx)(z,{column:t,title:"bank"})},cell:e=>{let{row:t}=e;return(0,s.jsx)("div",{className:"flex space-x-2",children:(0,s.jsx)("span",{className:"max-w-[500px] truncate font-medium",children:t.getValue("bank")})})}},{accessorKey:"orderTimeId",header:e=>{let{column:t}=e;return(0,s.jsx)(z,{column:t,title:"orderTimeId"})},cell:e=>{let{row:t}=e;return(0,s.jsx)("div",{className:"flex space-x-2",children:(0,s.jsx)("span",{className:"max-w-[500px] truncate font-medium",children:t.getValue("orderTimeId")})})}},{accessorKey:"date",header:e=>{let{column:t}=e;return(0,s.jsx)(z,{column:t,title:"date"})},cell:e=>{let{row:t}=e;return(0,s.jsx)("div",{className:"flex space-x-2",children:(0,s.jsx)("span",{className:"max-w-[500px] truncate font-medium",children:t.getValue("date")})})}},{accessorKey:"totalPrice",header:e=>{let{column:t}=e;return(0,s.jsx)(z,{column:t,title:"totalPrice"})},cell:e=>{let{row:t}=e;return(0,s.jsx)("div",{className:"flex space-x-2",children:(0,s.jsx)("span",{className:"max-w-[500px] truncate font-medium",children:t.getValue("totalPrice")})})}}
1,{accessorKey:"productCount",header:e=>{let{column:t}=e;return(0,s.jsx)(z,{column:t,title:"productCount"})},cell:e=>{let{row:t}=e;return(0,s.jsx)("div",{className:"flex space-x-2",children:(0,s.jsx)("span",{className:"max-w-[500px] truncate font-medium",children:t.getValue("productCount")})})}},{accessorKey:"status",header:e=>{let{column:t}=e;return(0,s.jsx)(z,{column:t,title:"Status"})},cell:e=>{let{row:t}=e,a=N.Do.find(e=>e.value===t.getValue("status"));return a?(0,s.jsxs)("div",{className:"flex w-[100px] items-center",children:[a.icon&&(0,s.jsx)(a.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),(0,s.jsx)("span",{children:a.label})]}):null},filterFn:(e,t,a)=>a.includes(e.getValue(t))},{id:"actions",cell:e=>{let{row:t}=e;return(0,s.jsx)(Z,{row:t})}}];var F=a(76960),Y=!0;let O={title:"Dashboard",description:"Example dashboard app built using the components."};var A=(0,l.withSuperJSONPage)(function(e){var t;let{DataOrders:a}=e,{data:l,status:n}=(0,F.useSession)(),{t:d}=(0,f.$G)("dashboard"),i=null==a?void 0:a.map(e=>{var t,a,s,l,r,n,d,i,o,c,u,m;return{id:e.id,name:e.name||e.lastName?e.name+" "+e.lastName:"",phone:e.phone?e.phone:"",address:e.address?e.address:"",userId:e.userId?e.userId:"",orderTimeId:(null===(t=e.GzOrderTime)||void 0===t?void 0:t.name)=="fastDelivery"?(null===(a=e.GzOrderTime)||void 0===a?void 0:a.gzOrderTimeDetails[0].name)?null===(s=e.GzOrderTime)||void 0===s?void 0:s.gzOrderTimeDetails[0].name:null===(l=e.GzOrderTime)||void 0===l?void 0:l.name:(null===(r=e.GzOrderTime)||void 0===r?void 0:r.timeStart)+" - "+(null===(n=e.GzOrderTime)||void 0===n?void 0:n.timeEnd),deliveryId:(null===(d=e.GzDelivery)||void 0===d?void 0:d.name)||(null===(i=e.GzDelivery)||void 0===i?void 0:i.lastName)?(null===(o=e.GzDelivery)||void 0===o?void 0:o.name)+" "+(null===(c=e.GzDelivery)||void 0===c?void 0:c.lastName):"",status:null===(u=e.status)||void 0===u?void 0:u.toLowerCase(),orderId:e.orderId?e.orderId:"",totalPrice:e.totalPrice?e.totalPrice:0,productCount:e.productsOrder.length,bank:e.bank,date:null===(m=e.date)||void 0===m?void 0:m.toLocaleDateString("en-US",{timeZone:"Asia/Yerevan"})}});return"loading"===n?(0,s.jsx)("p",{children:"Loading..."}):"unauthenticated"===n?(0,s.jsx)("p",{children:"Access Denied"}):(null==l?void 0:null===(t=l.user)||void 0===t?void 0:t.role)!=="ADMIN"?(0,s.jsx)("p",{children:"You are not a admin"}):(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(r.Z,{children:(0,s.jsxs)("div",{className:"flex-1 space-y-4 p-8 pt-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between space-y-2",children:[(0,s.jsx)("h2",{className:"text-3xl font-bold tracking-tight",children:d("orders.title")}),(0,s.jsx)("div",{className:"flex items-center space-x-2"})]}),i&&(0,s.jsx)(k,{data:i,columns:G})]})})})})}},function(e){e.O(0,[6815,1843,871,7329,308,2453,8516,6478,1909,7870,3537,1619,9774,2888,179],function(){return e(e.s=91100)}),_N_E=e.O()}]);
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.