"use strict";(self.webpackChunkwheelsmart_admin_react=self.webpackChunkwheelsmart_admin_react||[]).push([[5593],{35593:(e,a,s)=>{s.r(a),s.d(a,{default:()=>x});var r=s(65043),t=s(68493),n=s(5835),i=s(47419),o=s(11645),l=s(26655),c=s(5397),h=s(83003),d=s(60273),p=s(16876),u=s(20541),g=s(72517),m=s(58045),w=s(70579);const x=function(){const e=(0,h.wA)(),a=(0,d.MD)("masters","warehouse").warehouselist,s=((0,h.d4)((e=>e.masters.warehouse.noofpages)),(0,h.d4)((e=>e.masters.warehouse.listCount))),x=(0,h.d4)((e=>e.masters.warehouse.warehouseParams)),A=(0,h.d4)((e=>e.masters.warehouse.loading)),[f]=((0,h.d4)((e=>e.system.userAccessList)),t.A.useForm());(0,r.useEffect)((()=>{e((0,g.s8)({page:1,search:"",page_size:10}))}),[]);const j=[{title:"S.No",dataIndex:"index",width:"5%"},{title:"Name",render:e=>(0,w.jsx)("span",{children:e.name}),filterMode:"tree",filterSearch:!0,width:"30%"},{title:"Location",render:e=>{var a;return(0,w.jsx)("span",{children:null===(a=e.locations)||void 0===a?void 0:a.name})},filterMode:"tree",filterSearch:!0,width:"30%"}],_=null===a||void 0===a?void 0:a.map(((e,a)=>({...e,index:(x.page-1)*x.page_size+a+1}))),{Search:v}=n.A;return(0,w.jsxs)(i.A,{gutter:[12,12],className:"hp-mt-32",children:[(0,w.jsx)(p.A,{prefix:"Masters",postfix:"warehouse",pageTitle:"Warehouse",goBack:!0}),(0,w.jsx)(o.A,{span:24,children:(0,w.jsx)(l.A,{children:(0,w.jsxs)(i.A,{children:[(0,w.jsx)(o.A,{span:12,xs:24,sm:24,md:12,className:"hp-mb-12",children:(0,w.jsx)(v,{placeholder:"Search...",allowClear:!0,onChange:a=>{""==a.target.value&&(e((0,g.s8)({...x,page:1,search:""})),e((0,m.aA)({...x,page:1,search:""})))},onSearch:a=>{var s;s=a,e((0,m.aA)({...x,page:1,search:s})),e((0,g.s8)({...x,page:1,search:s}))}})}),(0,w.jsx)(o.A,{span:24,children:(0,w.jsx)(c.A,{tip:"Loading...",spinning:A,delay:500,children:(0,w.jsx)(u.A,{page:x.page,count:s,pageSize:x.page_size,columns:j,data:_,loading:A,onPageChange:function(a,s){e((0,m.aA)({...x,page_size:s,page:0==a?1:a})),e((0,g.s8)({...x,page_size:s,page:0==a?1:a}))},showTotal:function(e){return"Total "+e+" items"},scroll:!0})})})]})})})]})}}}]);
//# sourceMappingURL=5593.8792eb6f.chunk.js.map