PageSourceSearch

https://regalflowers.com.ng/_next/static/chunks/pages/dashboard-44fc915531269bdd.js

js regalflowers.com.ng collected 2026-09-29 15:35:58 UTC 4,468 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[26],{6117:function(e,r,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard",function(){return s(2624)}])},2624:function(e,r,s){"use strict";s.r(r),s.d(r,{__N_SSG:function(){return F},default:function(){return S}});var t=s(7568),n=s(92),o=s(5893),a=s(7294),d=s(9008),i=s.n(d),l=s(2563),c=s(1664),u=s.n(c),h=s(4198),_=s.n(h),f=function(e){var r=e.label,s=e.count,t=e.iconBg,n=e.iconColor,a=e.icon,d=e.href;return(0,o.jsx)(u(),{href:d,children:(0,o.jsxs)("a",{className:_()["stat-card"],children:[(0,o.jsx)("div",{className:_().icon,style:{background:t,color:n},children:a}),(0,o.jsxs)("div",{className:_().info,children:[(0,o.jsx)("span",{className:_().label,children:r}),(0,o.jsx)("span",{className:_().count,children:s})]})]})})},b=s(2384),v=s(3350),x=s(9268),j=s(8103),m=s(2159),g=s(3660),p=s(2934),C=s.n(p),y=s(3419),N=s(1010),w={totalCount:0,statusCounts:{},recentOrders:[]},F=!0,S=function(e){var r,s,d=e.pageSections,c=(0,a.useContext)(m.Z),u=c.user,h=c.notify,_=c.confirm,p=(0,a.useState)(!0),F=p[0],S=p[1],O=(0,a.useState)(w),k=O[0],B=O[1],D=((0,N.Z)(),function(){var e=(0,t.Z)((function(){var e;return(0,n.__generator)(this,(function(r){switch(r.label){case 0:return S(!0),[4,(0,g.Jq)({limit:6})];case 1:return(e=r.sent()).error?h("error",e.message||"Failed to load dashboard data"):B(e.data||w),S(!1),[2]}}))}));return function(){return e.apply(this,arguments)}}());(0,a.useEffect)((function(){D()}),[]);var Z=Math.max((null===k||void 0===k?void 0:k.totalCount)-((null===k||void 0===k||null===(r=k.statusCounts)||void 0===r?void 0:r.Delivered)||0),0),E=function(e){_({title:"Delete Order",body:"Are you sure you want to delete this order?",okText:"Delete",cancelText:"Cancel",onOk:(0,t.Z)((function(){var r;return(0,n.__generator)(this,(function(s){switch(s.label){case 0:return[4,(0,g.b6)(e.id)];case 1:return(r=s.sent()).error?(h("error",r.message||"Failed to delete order"),[2]):(D(),h("success","Order deleted successfully"),[2])}}))}))})};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i(),{children:(0,o.jsx)("title",{children:"Dashboard | Regal Flowers"})}),(0,o.jsx)(l.Z,{pageSections:d,children:F?(0,o.jsx)(x.Z,{}):0===k.totalCount?(0,o.jsx)(v.Z,{imageSrc:"/images/dashboard/empty-orders.png",heading:"Hello ".concat(null===u||void 0===u?void 0:u.name,", make someone happy today."),subtext:"Browse from our freshly picked flowers, suitable for any occasion of your choice.",ctaLabel:"Browse Flowers",ctaUrl:"/product-category/flowers-for-love-birthday-anniversary-etc"}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:C().greeting,children:[(0,o.jsxs)("p",{className:C().hello,children:["Hello ",null===u||void 0===u?void 0:u.name,","]}),(0,o.jsx)("p",{className:C().subtext,children:"Nice to have you back \ud83d\ude42"})]}),(0,o.jsxs)("div",{className:C().stats,children:[(0,o.jsx)(f,{label:"Total Orders",count:null===k||void 0===k?void 0:k.totalCount,iconBg:"#F5E5E5",iconColor:"#9B0000",icon:(0,o.jsx)(j.Mu,{}),href:"/dashboard/orders"}),(0,o.jsx)(f,{label:"Pending Orders",count:Z,iconBg:"#FFFBF0",iconColor:"#C9B232",icon:(0,o.jsx)(j.Mu,{}),href:"/dashboard/orders?status=Pending"}),(0,o.jsx)(f,{label:"Delivered Orders",count:(null===k||void 0===k||null===(s=k.statusCounts)||void 0===s?void 0:s.Delivered)||0,iconBg:"#F2FDF6",iconColor:"#15803D",icon:(0,o.jsx)(j.Mu,{}),href:"/dashboard/orders?status=Delivered"})]}),(0,o.jsxs)("div",{className:C().section,children:[(0,o.jsxs)("div",{className:C()["section-header"],children:[(0,o.jsx)("span",{className:C()["section-title"],children:"Recent Orders"}),(0,o.jsx)(y.Z,{url:"/dashboard/orders",type:"transparent",children:"See All"})]}),(0,o.jsx)("div",{className:C()["orders-row"],children:null===k||void 0===k?void 0:k.recentOrders.map((function(e){return(0,o.jsx)(b.Z,{order:e,onDelete:E},e.id)}))})]})]})})]})}},4198:function(e){e.exports={"stat-card":"StatCard_stat-card__d1Quk",icon:"StatCard_icon__LUY1n",info:"StatCard_info__OSj3M",label:"StatCard_label__lLFhh",count:"StatCard_count__uOXTq"}},2934:function(e){e.exports={greeting:"dashboard_greeting__DJP3t",hello:"dashboard_hello__77cK3",subtext:"dashboard_subtext__QSqWm",stats:"dashboard_stats__bBpZ8","section-header":"dashboard_section-header__hBQsy","section-title":"dashboard_section-title__rjyQ6","orders-row":"dashboard_orders-row__Hub8w"}}},function(e){e.O(0,[665,774,888,179],(function(){return r=6117,e(e.s=r);var r}));var r=e.O();_N_E=r}]);

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.