1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6756],{86413:function(e,n,a){"use strict";a.d(n,{Z:function(){return o}});var r=a(85893),t=a(67294),s=a(41664),i=a.n(s),l=a(25934),c=a(8146),d=a.n(c);function o(e){let{links:n=[],product:a=null}=e,s=(null==a?void 0:a.category)||"",c=s.includes("ШинÑ/ÐегковÑе"),o=s.includes("ÐиÑки/ÐегковÑе"),u=[];if(a){let{category:e,width:n,height:r,diameter:t,title:s,bolts:i,pcd:l,dia:d,model:h,vendor:m}=a;if(e&&u.push(...e.split("/").map(e=>({name:e}))),c||o){let a=null;c&&(e.includes("Ðимние")&&(a="Ðима"),e.includes("ÐеÑние")&&(a="ÐеÑо"));let s=null;if(o&&(e.includes("ÐиÑÑе")&&(s="ÐиÑой"),e.includes("ШÑампованнÑе")&&(s="ШÑампованнÑй")),m&&u.push({name:m,link:"/catalog/".concat(c?"tires":"disks","?brand=").concat(m)}),h&&u.push({name:h,link:"/catalog/".concat(c?"tires":"disks","?model=").concat(h)}),c&&n&&r&&t){let e="?width=".concat(n,"&height=").concat(r,"&dia=").concat(t);a&&(e+="&season=".concat(a)),u.push({name:"".concat(n,"/").concat(r," R").concat(t),link:"/catalog/tires".concat(e)})}if(o&&t&&i&&l&&d){let e="?diameter=".concat(t,"&bolts=").concat(i,"&pcd=").concat(l,"&dia=").concat(d);s&&(e+="&type=".concat(s)),u.push({name:"".concat(t," ").concat(i,"x").concat(l," ").concat(d),link:"/catalog/disks".concat(e)})}}s&&u.push({name:s})}return(0,r.jsx)("div",{className:"container",children:(0,r.jsxs)("div",{className:d().breadcrumbs,children:[(0,r.jsx)(i(),{href:"/",children:"ÐлавнаÑ"},(0,l.Z)()),[...n,...u].map(e=>{var n;let a=(null==e?void 0:null===(n=e.link)||void 0===n?void 0:n.startsWith("/"))?e.link:"/".concat(e.link);return(null==e?void 0:e.link)?(0,r.jsxs)(t.Fragment,{children:[(0,r.jsx)("span",{children:"\xa0>\xa0"}),(0,r.jsx)(i(),{href:a,children:e.name})]},(0,l.Z)()):(0,r.jsxs)(t.Fragment,{children:[(0,r.jsx)("span",{children:"\xa0>\xa0"}),(0,r.jsx)("span",{children:e.name})]},(0,l.Z)())})]})})}},28073:function(e,n,a){"use strict";a.d(n,{Z:function(){return S}});var r=a(85893),t=a(67294),s=a(93454),i=a(76592),l=a(19827),c=a(8863),d=a(25026),o=a(70360),u=a(55355),h=a(46577),m=a(81873),p=a(4336),_=a(41664),f=a.n(_),x=a(15722),v=a(66676),j=a(19781),b=a(67451),k=a.n(b);let y=(e,n,a)=>{if(e.format&&"number"==typeof n)return e.format(n);if("order"===e.id)return(0,r.jsx)(f(),{href:"/panel/orders/".concat(a.id),children:(0,r.jsx)(p.Z,{size:"small",variant:"outlined",children:"СмоÑÑеÑÑ"})});if("status"===e.id||"accepted"===e.id)return n;if("phone"===e.id)return(0,r.jsx)("span",{style:{whiteSpace:"nowrap"},children:n.replace(/[^\d]/g,"").replace(/^(\d{1})(\d{3})(\d{3})(\d{2})(\d{2})$/,"+$1 ($2) $3-$4-$5")});if("date"===e.id){let e=new Date(n);return new Intl.DateTimeFormat("ru-RU",{day:"2-digit",month:"short",year:"numeric"}).format(e)}if("total"===e.id)return new Intl.NumberFormat("ru-RU",{style:"decimal",currency:"RUB"}).format(n);if("stores"===e.id){let e=n.split(",");return(0,r.jsx)("div",{className:k().storesBox,children:e.map((e,n)=>(0,r.jsx)(m.Z,{label:(0,j.Z)(e),variant:"outlined",size:"small"},n))})}return n},g=new Intl.NumberFormat("ru-RU",{style:"decimal",currency:"RUB"});function S(e){let{}=e,[n,a]=(0,t.useState)([]),[m,p]=(0,t.useState)(0),[_,f]=(0,t.useState)(10),[j,b]=(0,t.useState)(0),[S,P]=(0,t.useState)(0),[I,N]=(0,t.useState)(0),[Z,w]=(0,t.useState)(0),[O,R]=(0,t.useState)(0),[M,B]=(0,t.useState)(0),[K,W]=(0,t.useState)(0),[z,U]=(0,t.useState)(0),T=async()=>{let e=await fetch("/api/orders"),n=await e.json(),r=n.filter(e=>"cancelled"!=e.status),t=n.filter(e=>"cancelled"==e.status),s=r.length,i=r.reduce((e,n)=>e+n.count,0),l=r.reduce((e,n)=>e+n.total,0);b(s),P(i),N(l),w(l/s);let c=t.length,d=t.reduce((e,n)=>e+n.count,0),o=t.reduce((e,n)=>e+n.total,0);R(c),B(d),W(o),U(o/c),a(n.map(e=>{let n=Array.from(new Set(e.products.flatMap(e=>e.order.map(e=>e.store)))).join(", ");return{...e,paymentStatus:(0,v.Z)(e.paymentStatus),status:(0,x.Z)(e.status),stores:n,accepted:e.acceptedby_name?e.acceptedby_name:"ÐикÑо"}}))};(0,t.useEffect)(()=>{T()},[]);let D=[{id:"id",label:"â",minWidth:70},{id:"order",label:"ÐейÑÑвие",minWidth:70},{id:"stores",label:"Склад",minWidth:100},{id:"status",label:"СÑаÑÑÑ",minWidth:100},{id:"date",label:"ÐаÑа",minWidth:170},{id:"accepted",label:"ÐÑо взÑл",minWidth:170},{id:"count",label:"ШÑ",minWidth:80},{id:"total",label:"СÑмма",minWidth:100},{id:"firstname",label:"ÐлиенÑ",minWidth:130},{id:"phone",label:"ТелеÑон",minWidth:170}];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h2",{children:"СпиÑок заказов"}),(0,r.jsxs)("div",{className:k().successOrdersInfo,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:"УÑпеÑнÑÑ
заказов"}),": ",j]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:"ÐÑодано ÑоваÑов"}),": ",S]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:"Ðа ÑÑммÑ"}),": ",g.format(Math.round(I))," â½"]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:"СÑедний Ñек"}),": ",g.format(Math.round(Z))," â½"]})]}),(0,r.jsxs)("div",{className:k().cancelledOrdersInfo,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:"ÐÑмененнÑÑ
заказов"}),": ",O]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:"Ðе пÑодано ÑоваÑов"}),": ",M]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:"Ðа ÑÑммÑ"}),": ",g.format(Math.round(K))," ","â½"]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:"СÑедний Ñек"}),": ",g.format(Math.round(z))," ","â½"]})]}),(0,r.jsxs)("div",{className:k().summaryOrdersInfo,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:"ÐÑего заказов"}),": ",O+j]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:"ÐÑего ÑоваÑов"}),":"," ",M+S]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:"Ðа ÑÑммÑ"}),":"," ",g.format(Math.round(K+I)),"â½"]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:"СÑедний Ñек"}),":"," ",g.format(Math.round(z+Z)),"â½"]})]}),(0,r.jsxs)(s.Z,{sx:{width:"100%",overflow:"hidden"},children:[(0,r.jsx)(d.Z,{sx:{},children:(0,r.jsxs)(i.Z,{stickyHeader:!0,"aria-label":"sticky table",children:[(0,r.jsx)(o.Z,{children:(0,r.jsx)(h.Z,{children:D.map((e,n)=>(0,r.jsx)(c.Z,{align:e.align,style:{minWidth:e.minWidth},children:e.label},n))})}),(0,r.jsx)(l.Z,{children:n.slice(m*_,m*_+_).map(e=>
1(0,r.jsx)(h.Z,{hover:!0,role:"checkbox",tabIndex:-1,children:D.map((n,a)=>{let t=e[n.id];return(0,r.jsx)(c.Z,{align:n.align,children:y(n,t,e)},a)})},e.code))})]})}),(0,r.jsx)(u.Z,{rowsPerPageOptions:[10,25,100],component:"div",count:n.length,rowsPerPage:_,labelRowsPerPage:"СÑÑок на ÑÑÑаниÑе",labelDisplayedRows:function(e){let{from:n,to:a,count:r}=e;return"".concat(n,"â").concat(a," из ").concat(-1!==r?r:"> Ñем ".concat(a))},page:m,onPageChange:(e,n)=>{p(n)},onRowsPerPageChange:e=>{f(+e.target.value),p(0)}})]}),n.length<1&&(0,r.jsx)("p",{children:"Ðаказов неÑ"})]})}},40886:function(e,n,a){"use strict";a.d(n,{Z:function(){return d}});var r=a(85893),t=a(41664),s=a.n(t),i=a(11163),l=a(88882),c=a.n(l);function d(){let e=(0,i.useRouter)().pathname;return(0,r.jsxs)("div",{className:c().panelNavbar,children:[(0,r.jsx)("div",{children:(0,r.jsx)(s(),{href:"/panel",className:"/panel"===e?c().active:"",children:"ÐаказÑ"})}),(0,r.jsx)("div",{children:(0,r.jsx)(s(),{href:"/panel/clients",className:"/panel/clients"===e?c().active:"",children:"ÐлиенÑÑ"})}),(0,r.jsx)("div",{children:(0,r.jsx)(s(),{href:"/panel/banners",className:"/panel/banners"===e?c().active:"",children:"ÐаннеÑÑ"})}),(0,r.jsx)("div",{children:(0,r.jsx)(s(),{href:"/panel/labels",className:"/panel/labels"===e?c().active:"",children:"Ценники"})}),(0,r.jsx)("div",{children:(0,r.jsx)(s(),{href:"/panel/tracking",className:"/panel/tracking"===e?c().active:"",children:"ÐÑÑлеживание"})}),(0,r.jsx)("div",{children:(0,r.jsx)(s(),{href:"/panel/monitoring",className:"/panel/monitoring"===e?c().active:"",children:"ÐониÑоÑинг"})}),(0,r.jsx)("div",{children:(0,r.jsx)(s(),{href:"/panel/sellout",className:"/panel/sellout"===e?c().active:"",children:"РаÑпÑодажа"})})]})}},31247:function(e,n,a){"use strict";a.d(n,{Z:function(){return i}});var r=a(85893),t=a(60198),s=a.n(t);function i(e){let{children:n}=e;return(0,r.jsx)("div",{className:s().content,children:n})}},15722:function(e,n,a){"use strict";function r(e){return"process"===e?"Ð\xa0ÑабоÑе":"transported"===e?"Ð\xa0пÑÑи\xa0до\xa0клиенÑа":"completed"===e?"ÐÑполнен":"cancelled"===e?"ÐÑменен":void 0}a.d(n,{Z:function(){return r}})},66676:function(e,n,a){"use strict";function r(e){return"paid"===e?"ÐплаÑен":"prepaid"===e?"ÐплаÑен\xa0ÑаÑÑиÑно":"notpaid"===e?"Ðе\xa0оплаÑен":void 0}a.d(n,{Z:function(){return r}})},19781:function(e,n,a){"use strict";function r(e){var n;return null!==(n=({pauer_samara:"ÐаÑÑÑСамаÑа",pauer_dav:"pauer_dav",pauer_kaz:"pauer_kaz",pauer_kuch:"pauer_kuch",pauer_MSK:"ÐаÑÑÑÐСÐ",pauer_MSK2:"ÐаÑÑÑÐСÐ2",pauer_MSK3:"pauer_MSK3",pauer_MSK15:"pauer_MSK15",SLTLT:"Слик ТÐТ",DSK:"DSK",KDKz:"ÐÐ ÐЧ",KDSM:"ÐРСам",ÐÐÐÐид:"ÐÐ¾Ð»ÐµÐºÑ Ðид",ÐÐÐÐем:"ÐÐ¾Ð»ÐµÐºÑ Ðем",ÐÐÐÐемР:"ÐÐ¾Ð»ÐµÐºÑ Ðем Розн",ÐÐÐФизкР:"ÐÐ¾Ð»ÐµÐºÑ Ð¤Ð¸Ð·Ðº Ñоз",ÐÐÐФизк:"ÐÐ¾Ð»ÐµÐºÑ Ð¤Ð¸Ð·Ðº.",RS:"РимÑкÑ",SeverSam:"Ð¡ÐµÐ²ÐµÑ Ð¡Ð°Ð¼Ð°Ñа",ÐÐÐТ:"ÐÐ¾Ð»Ð¾Ð±Ð¾ÐºÑ Ð¢Ð»Ñ",kievskaya:"ÐиевÑкаÑ",kievskaya_sammb_oh:"ÐиевÑкаÑСевеÑ",kievskaya_pauer_oh:"ÐиевÑкаÑÐаÑÑÑ",kievskaya_kd_oh:"ÐиевÑкаÑÐÐ",antoshka:"ÐнÑоноваÐвÑеенко",antoshka_pauer_oh:"ÐнÑоноваÐвÑеенкоÐаÑÑÑ",antoshka_kd_oh:"ÐнÑоноваÐвÑеенкоÐÐ",demokraticheskaya:"ÐемокÑаÑиÑеÑкаÑ",demokraticheskaya_sammb_oh:"ÐемокÑаÑиÑеÑкаÑСевеÑ",demokraticheskaya_pauer_oh:"ÐемокÑаÑиÑеÑкаÑÐаÑÑÑ",demokraticheskaya_kd_oh:"ÐемокÑаÑиÑеÑкаÑÐÐ",lvovskaya:"ÐÑвовÑкаÑ",lvovskaya_sammb_oh:"ÐÑвовÑкаÑСевеÑ",lvovskaya_pauer_oh:"ÐÑвовÑкаÑÐаÑÑÑ",lvovskaya_kd_oh:"ÐÑвовÑкаÑÐÐ",shinservice_m:"ШинÑеÑÐ²Ð¸Ñ ÐÑк",partizanskaya:"ÐаÑÑизанÑкаÑ",partizanskaya_kd_oh:"ÐаÑÑизанÑкаÑ",oh_glvovsk:"ÐÑвовÑкаÑ",oh_gkievsk:"ÐиевÑкаÑ",Rimz:"Rimzona"})[e.trim()])&&void 0!==n?n:e}a.d(n,{Z:function(){return r}})},8146:function(e){e.exports={breadcrumbs:"Breadcrumbs_breadcrumbs__Eid_1"}},60198:function(e){e.exports={content:"Panel_content__LmDQo",top:"Panel_top__wgHa_",userTypeBadge:"Panel_userTypeBadge__oXb39",switcher:"Panel_switcher__Cv_Hx",active:"Panel_active__hG_B5",personalIn
1put:"Panel_personalInput__zmx3B",afterFormText:"Panel_afterFormText__bHcVj",panelTitle:"Panel_panelTitle__V5dGU"}},67451:function(e){e.exports={panelInfoOrders:"PanelInfoOrders_panelInfoOrders__UREPm",panelInfoOrdersLine:"PanelInfoOrders_panelInfoOrdersLine__zCy18",storesBox:"PanelInfoOrders_storesBox__I_R81",successOrdersInfo:"PanelInfoOrders_successOrdersInfo__SBXlf",cancelledOrdersInfo:"PanelInfoOrders_cancelledOrdersInfo__lqJ5U",summaryOrdersInfo:"PanelInfoOrders_summaryOrdersInfo__qKddm"}},88882:function(e){e.exports={panelNavbar:"PanelNavbar_panelNavbar__br4mC",active:"PanelNavbar_active__cGAaK",logoutBtn:"PanelNavbar_logoutBtn__UlJUk"}}}]);
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.