PageSourceSearch

https://disktyre.ru/_next/static/chunks/pages/panel/tracking-5ccca0ffb1cc05eb.js

js disktyre.ru collected 2026-10-08 14:06:34 UTC 12,887 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2487],{25353:function(e,a,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/panel/tracking",function(){return n(69402)}])},86413:function(e,a,n){"use strict";n.d(a,{Z:function(){return o}});var t=n(85893),i=n(67294),s=n(41664),l=n.n(s),r=n(25934),c=n(8146),d=n.n(c);function o(e){let{links:a=[],product:n=null}=e,s=(null==n?void 0:n.category)||"",c=s.includes("Шины/Легковые"),o=s.includes("Диски/Легковые"),u=[];if(n){let{category:e,width:a,height:t,diameter:i,title:s,bolts:l,pcd:r,dia:d,model:p,vendor:h}=n;if(e&&u.push(...e.split("/").map(e=>({name:e}))),c||o){let n=null;c&&(e.includes("Зимние")&&(n="Зима"),e.includes("Летние")&&(n="Лето"));let s=null;if(o&&(e.includes("Литые")&&(s="Литой"),e.includes("Штампованные")&&(s="Штампованный")),h&&u.push({name:h,link:"/catalog/".concat(c?"tires":"disks","?brand=").concat(h)}),p&&u.push({name:p,link:"/catalog/".concat(c?"tires":"disks","?model=").concat(p)}),c&&a&&t&&i){let e="?width=".concat(a,"&height=").concat(t,"&dia=").concat(i);n&&(e+="&season=".concat(n)),u.push({name:"".concat(a,"/").concat(t," R").concat(i),link:"/catalog/tires".concat(e)})}if(o&&i&&l&&r&&d){let e="?diameter=".concat(i,"&bolts=").concat(l,"&pcd=").concat(r,"&dia=").concat(d);s&&(e+="&type=".concat(s)),u.push({name:"".concat(i," ").concat(l,"x").concat(r," ").concat(d),link:"/catalog/disks".concat(e)})}}s&&u.push({name:s})}return(0,t.jsx)("div",{className:"container",children:(0,t.jsxs)("div",{className:d().breadcrumbs,children:[(0,t.jsx)(l(),{href:"/",children:"Главная"},(0,r.Z)()),[...a,...u].map(e=>{var a;let n=(null==e?void 0:null===(a=e.link)||void 0===a?void 0:a.startsWith("/"))?e.link:"/".concat(e.link);return(null==e?void 0:e.link)?(0,t.jsxs)(i.Fragment,{children:[(0,t.jsx)("span",{children:"\xa0>\xa0"}),(0,t.jsx)(l(),{href:n,children:e.name})]},(0,r.Z)()):(0,t.jsxs)(i.Fragment,{children:[(0,t.jsx)("span",{children:"\xa0>\xa0"}),(0,t.jsx)("span",{children:e.name})]},(0,r.Z)())})]})})}},40886:function(e,a,n){"use strict";n.d(a,{Z:function(){return d}});var t=n(85893),i=n(41664),s=n.n(i),l=n(11163),r=n(88882),c=n.n(r);function d(){let e=(0,l.useRouter)().pathname;return(0,t.jsxs)("div",{className:c().panelNavbar,children:[(0,t.jsx)("div",{children:(0,t.jsx)(s(),{href:"/panel",className:"/panel"===e?c().active:"",children:"Заказы"})}),(0,t.jsx)("div",{children:(0,t.jsx)(s(),{href:"/panel/clients",className:"/panel/clients"===e?c().active:"",children:"Клиенты"})}),(0,t.jsx)("div",{children:(0,t.jsx)(s(),{href:"/panel/banners",className:"/panel/banners"===e?c().active:"",children:"Баннеры"})}),(0,t.jsx)("div",{children:(0,t.jsx)(s(),{href:"/panel/labels",className:"/panel/labels"===e?c().active:"",children:"Ценники"})}),(0,t.jsx)("div",{children:(0,t.jsx)(s(),{href:"/panel/tracking",className:"/panel/tracking"===e?c().active:"",children:"Отслеживание"})}),(0,t.jsx)("div",{children:(0,t.jsx)(s(),{href:"/panel/monitoring",className:"/panel/monitoring"===e?c().active:"",children:"Мониторинг"})}),(0,t.jsx)("div",{children:(0,t.jsx)(s(),{href:"/panel/sellout",className:"/panel/sellout"===e?c().active:"",children:"Распродажа"})})]})}},31247:function(e,a,n){"use strict";n.d(a,{Z:function(){return l}});var t=n(85893),i=n(60198),s=n.n(i);function l(e){let{children:a}=e;return(0,t.jsx)("div",{className:s().content,children:a})}},97535:function(e,a,n){"use strict";var t=n(64836);a.Z=void 0;var i=t(n(33651)),s=n(85893);a.Z=(0,i.default)((0,s.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline")},69402:function(e,a,n){"use strict";n.r(a),n.d(a,{__N_SSP:function(){return w},default:function(){return I}});var t=n(85893),i=n(86413),s=n(40886),l=n(31247),r=n(67294),c=n(25934),d=n(11163),o=n(4336),u=n(36051),p=n(61287),h=n(99731),m=n(64347),x=n(93454),f=n(76592),g=n(19827),j=n(8863),v=n(25026),k=n(70360),b=n(55355),_=n(46577),Z=n(97535),T=n(69588),N=n.n(T);function P(e){let{trackingList:a}=e,n=(0,d.useRouter)(),[i,s]=(0,r.useState)(),[l,T]=(0,r.useState)(!1),[P,y]=(0,r.useState)(!1),[C,w]=(0,r.useState)({width:"",height:"",diametr:"",season:"",brand:"",quantity:0}),[I,B]=(0,r.useState)({diameter:"",bolts:"",dia:"",quantity:0,diskType:""}),[W,z]=(0,r.useState)(!1),[S,R]=(0,r.useState)(0),[E,H]=(0,r.useState)(10),O
1=async()=>{let e=await fetch("/api/products/filters");s({data:await e.json()}),T(!0)},D=e=>{"tires"===e&&fetch("/api/tracking",{method:"post",body:JSON.stringify({type:"tires",...C})}),"disks"===e&&fetch("/api/tracking",{method:"post",body:JSON.stringify({type:"disks",...I})}),y(!0)},q=(e,a,n)=>{"tires"===e?(C[a]=n,w(C)):(I[a]=n,B(I))},F=e=>{fetch("/api/tracking/"+e,{method:"delete"}).then(e=>e.json()).then(()=>{z(!0)})},A=[{id:"id",label:"ID",minWidth:70},{id:"type",label:"Тип",minWidth:100},{id:"brand",label:"Бренд",minWidth:100},{id:"quantity",label:"Кол-во",minWidth:100},{id:"data",label:"Отслеживается",minWidth:100},{id:"button",label:"Действие",minWidth:100}],M=(e,a,n)=>{if(a.format&&"number"==typeof n)return a.format(n);if("type"===a.id)return"tires"===e.type?"Шины":"Диски";if("data"===a.id){if("tires"===e.params.type)return[e.params.width?"Ширина: ".concat(e.params.width):"",e.params.height?"Высота: ".concat(e.params.height):"",e.params.season?"Сезон: ".concat(e.params.season):"",e.params.diametr?"Диаметр: ".concat(e.params.diametr):""].filter(e=>""!==e).join(", ");if("disks"===e.params.type)return[e.params.diskType?"Тип: ".concat(e.params.diskType):"",e.params.diameter?"Диаметр: ".concat(e.params.diameter):"",e.params.bolts?"Отверстий: ".concat(e.params.bolts):"",e.params.dia?"Ступица: ".concat(e.params.dia):""].filter(e=>""!==e).join(", ")}return"button"===a.id?(0,t.jsx)(o.Z,{size:"small",variant:"outlined",color:"error",onClick:()=>F(e.id),children:(0,t.jsx)(Z.Z,{})}):n};return(0,r.useEffect)(()=>{P&&setTimeout(()=>{y(!1),n.reload()},3e3)},[P]),(0,r.useEffect)(()=>{O()},[]),(0,r.useEffect)(()=>{W&&setTimeout(()=>{z(!1),n.reload()},3e3)},[W]),(0,t.jsxs)("div",{className:N().panelTracking,children:[(0,t.jsxs)("div",{className:N().panelTrackingTires,children:[(0,t.jsx)("h2",{children:"Шины"}),!l&&(0,t.jsx)("div",{className:N().panelTrackingBox,children:[...Array(6)].map(e=>(0,t.jsx)(m.Z,{variant:"rectangular",width:170,height:42,style:{margin:"0 0 15px 0",borderRadius:"4px"}},(0,c.Z)()))}),l&&i&&(0,t.jsxs)("div",{className:N().panelTrackingBox,children:[(0,t.jsx)(p.Z,{disablePortal:!0,options:i.data.tires.width,onInputChange:(e,a)=>q("tires","width",a),renderInput:e=>(0,t.jsx)(u.Z,{...e,size:"small",fullWidth:!0,label:"Ширина",autoComplete:"off"})}),(0,t.jsx)(p.Z,{disablePortal:!0,options:i.data.tires.height,onInputChange:(e,a)=>q("tires","height",a),renderInput:e=>(0,t.jsx)(u.Z,{...e,size:"small",fullWidth:!0,label:"Высота",autoComplete:"off"})}),(0,t.jsx)(p.Z,{disablePortal:!0,options:i.data.tires.diametr,onInputChange:(e,a)=>q("tires","diametr",a),renderInput:e=>(0,t.jsx)(u.Z,{...e,size:"small",fullWidth:!0,label:"Диаметр",autoComplete:"off"})}),(0,t.jsx)(p.Z,{disablePortal:!0,options:["Лето","Зима","Зима (шип)","Зима (не шип)"],onInputChange:(e,a)=>q("tires","season",a),renderInput:e=>(0,t.jsx)(u.Z,{...e,size:"small",fullWidth:!0,label:"Сезон",autoComplete:"off"})}),(0,t.jsx)(p.Z,{disablePortal:!0,options:i.data.tires.brand,onInputChange:(e,a)=>q("tires","brand",a),renderInput:e=>(0,t.jsx)(u.Z,{...e,size:"small",fullWidth:!0,label:"Бренд",autoComplete:"off"})}),(0,t.jsx)(u.Z,{size:"small",onChange:e=>q("tires","quantity",e.target.value),label:"Кол-во",autoComplete:"off"})]})]}),(0,t.jsxs)("div",{className:N().panelTrackingButton,children:[!l&&(0,t.jsx)(m.Z,{variant:"rectangular",width:170,height:42,style:{margin:"0 0 15px 0",borderRadius:"4px"}},(0,c.Z)()),l&&i&&(0,t.jsx)(o.Z,{variant:"outlined",onClick:()=>D("tires"),children:"Отслеживать"})]}),(0,t.jsxs)("div",{className:N().panelTrackingDisks,children:[(0,t.jsx)("h2",{children:"Диски"}),!l&&(0,t.jsx)("div",{className:N().panelTrackingBox,children:[void 0,void 0,void 0,void 0,void 0].map(e=>(0,t.jsx)(m.Z,{variant:"rectangular",width:170,height:42,style:{margin:"0 0 15px 0",borderRadius:"4px"}},(0,c.Z)()))}),i&&i&&(0,t.jsxs)("div",{className:N().panelTrackingBox,children:[(0,t.jsx)(p.Z,{disablePortal:!0,options:["Литой","Штампованный"],onInputChange:(e,a)=>q("disks","diskType",a),renderInput:e=>(0,t.jsx)(u.Z,{...e,size:"small",fullWidth:!0,label:"Тип диска",autoComplete:"off"})}),(0,t.jsx)(p.Z,{disablePortal:!0,options:i.data.disks.diameter,onInputChange:(e,a)=>q("disks","diameter",a),renderInput:e=>(0,t.jsx)(u.Z,{...e,size:"small",fullWidth:!0,label:"Диаметр",autoComplete:"off"})}),(0,t.jsx)(p.Z,{disablePortal:!0,options:i.data.disks.bolts,onInputChange:(e,a)=>q("disks","bolts",a),renderInput:e=>(0,t.jsx)(u.Z,{...e,size:"small",fullWidth:!0,label:"Отверстия",autoComplete:"off"})}),(0,t.jsx)(p.Z,{disablePortal:!0,options:i.data.disks.dia,onInputChange:(e,a)=>q("disks","dia",a),renderInput:e=>(0,t.jsx)(u.Z,{...e,size:"small",fullWidth:!0,label:"Ступица (Ц.О)",autoComplete:"off"})}),(0,t.jsx)(u.Z,{size:"small",onChange:e=>q("disks","quantity",e.target.value),label:"Кол-во",autoComplete:"off"})]})]}),(0,t.jsxs)("div",{className:N().panelTrackingButton,children:[!l&&(0,t.jsx)(m.Z,{variant:"rectangular",width:170,height:42,style:{margin:"0 0 15px 0",borderRadius:"4px"}},(0,c.Z)()),l&&i&&(0,t.jsx)(o.Z,{variant:"outlined",onClick:()=>D("disks"),children:"Отслеживать"})]}),P&&(0,t.jsx)("div",{className:N().panelTrackingAlert,children:(0,t.jsx)(h.Z,{variant:"filled",severity:"success",children:"Ок, босс, сохранили!"})}),(0,t.jsxs)("div",{className:N().panelTrackingTrack,children:[(0,t.jsx)("h2",{children:"Уже отслеживаем:"}),(0,t.jsxs)(x.Z,{sx:{width:"100%",overflow:"hidden"},children:[(0,t.jsx)(v.Z,{sx:{maxHeight:440},children:(0,t.jsxs)(f.Z,{stickyHeader:!0,"aria-label":"sticky table",children:[(0,t.jsx)(k.Z,{children:(0,t.jsx)(_.Z,{children:A.map(e=>(0,t.jsx)(j.Z,{align:e.align,style:{minWidth:e.minWidth},children:e.label},e.id))})}),(0,t.jsx)(g.Z,{children:a.slice(S*E,S*E+E).map(e=>
1(0,t.jsx)(_.Z,{hover:!0,role:"checkbox",tabIndex:-1,children:A.map(a=>{let n="id"==a.id?e.id:e.params[a.id]||"-";return(0,t.jsx)(j.Z,{align:a.align,children:M(e,a,n)},a.id)})},e.code))})]})}),(0,t.jsx)(b.Z,{rowsPerPageOptions:[10,25,100],component:"div",count:a.length,rowsPerPage:E,labelRowsPerPage:"Строк на странице",labelDisplayedRows:function(e){let{from:a,to:n,count:t}=e;return"".concat(a,"–").concat(n," из ").concat(-1!==t?t:"> чем ".concat(n))},page:S,onPageChange:(e,a)=>{R(a)},onRowsPerPageChange:e=>{H(+e.target.value),R(0)}})]}),W&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("br",{}),(0,t.jsx)(h.Z,{variant:"filled",severity:"success",children:"Ок, босс, перестали отслеживать!"})]})]})]})}var y=n(9008),C=n.n(y),w=!0;function I(e){let{trackingList:a}=e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(C(),{children:[(0,t.jsx)("title",{children:"Панель управления | Отслеживание"}),(0,t.jsx)("meta",{name:"description",content:"Панель управления"})]}),(0,t.jsx)(i.Z,{links:[{name:"Панель управления",link:"panel"},{name:"Отслеживание"}]}),(0,t.jsx)("div",{className:"container",children:(0,t.jsx)("div",{className:"",children:(0,t.jsxs)("div",{className:"",children:[(0,t.jsx)(s.Z,{}),(0,t.jsx)(l.Z,{children:(0,t.jsx)(P,{trackingList:a})})]})})})]})}},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",personalInput:"Panel_personalInput__zmx3B",afterFormText:"Panel_afterFormText__bHcVj",panelTitle:"Panel_panelTitle__V5dGU"}},88882:function(e){e.exports={panelNavbar:"PanelNavbar_panelNavbar__br4mC",active:"PanelNavbar_active__cGAaK",logoutBtn:"PanelNavbar_logoutBtn__UlJUk"}},69588:function(e){e.exports={panelTracking:"PanelTracking_panelTracking__M1lov",panelTrackingTires:"PanelTracking_panelTrackingTires__z4sLH",panelTrackingBox:"PanelTracking_panelTrackingBox__OtcUO",panelTrackingDisks:"PanelTracking_panelTrackingDisks__1MBbO",panelTrackingButton:"PanelTracking_panelTrackingButton__Zb27l",panelTrackingAlert:"PanelTracking_panelTrackingAlert__TSqw1"}}},function(e){e.O(0,[2,5527,1287,2116,4347,2888,9774,179],function(){return e(e.s=25353)}),_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.