PageSourceSearch

https://quanlybanhangaseller.com/_next/static/chunks/pages/dashboard/promotion-6180269a0cd85ac7.js

js quanlybanhangaseller.com collected 2026-10-02 01:42:24 UTC 4,747 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1128],{35394:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/promotion",function(){return o(37113)}])},37113:function(e,t,o){"use strict";o.r(t);var r=o(85893),n=o(25079),i=o(11163),s=o(52119);t.default=()=>{let e=(0,i.useRouter)();return e.isReady?(0,r.jsx)(s.ZP,{title:n.Z.promotion.title}):null}},52119:function(e,t,o){"use strict";o.d(t,{lR:function(){return getStatus},nI:function(){return f},uG:function(){return getPromotionType}});var r=o(85893),n=o(80822),i=o(89768),s=o(40017),a=o(25079),l=o(83771),d=o(66630),c=o(39040),h=o(72877),p=o(76547),u=o(58650),m=o(87771),x=o(37224),Z=o(28535),y=o(71141);let f=[{name:a.Z.promotion.order,value:0,type:"order"},{name:a.Z.promotion.product,value:1,type:"product"},{name:a.Z.promotion.orderGift,value:2,type:"ogift"},{name:a.Z.promotion.productGift,value:3,type:"pgift"}],getStatus=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{from:t,to:o,status:r}=e,n=1===r?a.Z.notActive:a.Z.active,i=1===r?"red":s.Z.colorApp;return h.Z.toMillisecond(t)>Date.now()&&(n=a.Z.upcoming,i="blue"),h.Z.toMillisecond(o)<Date.now()&&(n=a.Z.expired,i=s.Z.border),{text:n,color:i}},getPromotionType=e=>f.find(t=>t.type===e);let ListPromotionScreen=class ListPromotionScreen extends Z.S{constructor(e){super(e),this.getData=async()=>{var e;await this.authenticate();let t=await c.Z.get(p.Z.PROMOTION.GET_LIST,{page:this.page});if(200!==t.status)return l.Z.error((null===(e=t.data)||void 0===e?void 0:e.message)||"Lỗi");let{data:o,totalPage:r}=t.data;this.setState({data:null==o?void 0:o.map(e=>{var t;return e.typeName=null===(t=getPromotionType(e.type))||void 0===t?void 0:t.name,e}),totalPage:r,isLoading:!1})},this.onClickAdd=()=>{this.props.router.push("/dashboard/promotion/add")},this.onRowClick=e=>{var t,o;let r=(null===(t=e.originalEvent)||void 0===t?void 0:t.target)||{};r.closest&&(r.closest(".p-checkbox")||r.closest(".p-selection-column")||r.closest("button")||r.closest("input"))||this.props.router.push("/dashboard/promotion/"+(null===(o=e.data)||void 0===o?void 0:o.id))},this.onClickItem=e=>()=>{this.props.router.push("/dashboard/promotion/"+e.id)},this.onClickSetting=()=>{},this.renderSearch=()=>null,this.renderHeaderButton=()=>(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(x.Z,{text:a.Z.promotion.create,icon:(0,r.jsx)(m.QZL,{size:16,color:"white"}),onClick:this.onClickAdd,"data-testid":"button-add"})}),this.renderColumns=()=>[(0,r.jsx)(u.s,{header:(0,r.jsx)("span",{style:g.colHeader,children:a.Z.promotion.name}),body:e=>(0,r.jsx)("span",{children:"[".concat(e.sku,"] - ").concat(e.name)}),style:{width:"25%"}},"sku"),(0,r.jsx)(u.s,{header:(0,r.jsx)("span",{style:g.colHeader,children:a.Z.promotion.type}),body:e=>(0,r.jsx)("span",{children:e.typeName}),style:{width:"15%",textAlign:"center"},headerClassName:"col-center-header"},"typeName"),(0,r.jsx)(u.s,{header:(0,r.jsx)("span",{style:g.colHeader,children:a.Z.from}),body:e=>(0,r.jsxs)("div",{style:{textAlign:"center"},children:[(0,r.jsx)("div",{children:h.Z.format(e.from,"HH:mm")}),(0,r.jsx)("div",{children:h.Z.formatDefault(e.from)})]}),style:{width:"15%",textAlign:"center"},headerClassName:"col-center-header"},"from"),(0,r.jsx)(u.s,{header:(0,r.jsx)("span",{style:g.colHeader,children:a.Z.to}),body:e=>(0,r.jsxs)("div",{style:{textAlign:"center"},children:[(0,r.jsx)("div",{children:h.Z.format(e.to,"HH:mm")}),(0,r.jsx)("div",{children:h.Z.formatDefault(e.to)})]}),style:{width:"15%",textAlign:"center"},headerClassName:"col-center-header"},"to"),(0,r.jsx)(u.s,{header:(0,r.jsx)("span",{style:g.colHeader,children:a.Z.status}),body:e=>{let t=getStatus(e);return(0,r.jsx)("span",{style:{color:t.color,fontWeight:500},children:t.text})},style:{width:"15%",textAlign:"center"},headerClassName:"col-center-header"},"status"),(0,r.jsx)(u.s,{header:(0,r.jsx)("span",{style:g.colHeader,children:a.Z.detail}),body:e=>(0,r.jsx)(n.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,r.jsx)(i.Z,{onClick:()=>{this.props.router.push("/dashboard/promotion/"+(null==e?void 0:e.id))},sx:{padding:"6px 10px",bgcolor:s.Z.colorApp,borderRadius:.5,color:"white"},children:a.Z.detail})}),style:{width:"15%",textAlign:"center"}
1,headerClassName:"col-center-header"},"detail")],this.state={...this.state,data:[]},this.staticData=!1,this.page=1,this.path="/promotion",this.title=a.Z.promotion.title,y.Z.updateBreadCrumbs([{text:a.Z.promotion.title,path:"/dashboard/promotion"}])}};let g={colHeader:{fontSize:"11px",fontWeight:600,color:"#64748b",letterSpacing:"0.05em",textTransform:"uppercase"}};t.ZP=(0,d.Z)(ListPromotionScreen)}},function(e){e.O(0,[3253,8754,9774,2888,179],function(){return e(e.s=35394)}),_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.